-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration via env variables #738
Comments
PLEASE offer an alternative to the command-line arguments. They are fundamentally broken and unfixable. For example, https://github.com/gfx-rs/wgpu/blob/trunk/benches/Cargo.toml does everything right, and still doesn't work:
|
I would also like the ability to specify the options here via command line args or env variables. In my case I'd simply like to globally configure every benchmark without needing to add @kornelski regarding criterion-specific command line arguments breaking things, I believe you must set |
In large/complex workspaces it's frustratingly difficult to find all the places that need the So I know a solution exists, but to me it's not usable. I'd rather avoid using command line args entirely than fight with the Cargo/rustc harness. |
100% agree, was just pointing out the (annoying but guaranteed to work) fix. |
For other readers - after struggling with the harness argument handling I've ended up just putting my benchmarks in a cargo example. This also lets me do some global initialisation.
|
I need to git bisect a performance regression, and too late after the fact I've realized that the default of benchmark with 100 iterations takes way too long to finish the bisect in a reasonable timeframe. The difference I'm measuring will be measurable with just a handful of iterations, so I would be beneficial if I could lower it for the bisect operation. The problem is that change of Criterion's configuration requires significant source code changes. This is especially inconvenient when measuring past commits that can't be simply modified without some git wrangling.
My second use-case is setting a baseline without running into #193. In bigger workspaces it's hard to track down all the places that break the custom command-line arguments. Setting extra criterion options via env vars would easily bypass the picky test runner.
The text was updated successfully, but these errors were encountered: