-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix "Unrecognized Option" error when using Criterion-specific arguments in benchmarks #17222
Conversation
|
Looks like the warning if because |
Benchmarks and their dependencies are compiled with release mode. In the affected code, `warn!()` was only used when debug assertions were toggled. Instead of gating the `warn!()` import specifically, I chose to fully qualify the macro. (I also made the `error!()` call qualified, for consistency.)
@BD103 still not recognizing the option |
Ah, I know! You need to Edit: I updated the original PR description with the better version of the command. |
Oh yeah! Oops, lol. Stand by while I try benching the benches. |
much better! |
Tried this, but it's still not saving the baselines. There's no |
The benchmarks were recently added to the Cargo workspace, so it would be What error message are you getting? |
I didn't know that the benches were added to the workspace. I was running |
Objective
cargo bench -- --save-baseline before
do not work because the defaultlibtest
is intercepting Criterion-specific CLI arguments.Solution
libtest
benchmark harness for the library crate, as per the Criterion book.Testing
cargo bench -p benches -- --save-baseline before