-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add a "cargo bench --debug" option #6445
Comments
It builds the benchmarks in debug mode and then runs them. It's useful in a CI context where it's important that the benches aren't broken, but it's not important how fast they run. Fixes rust-lang#6445
Any chance there is a workaround on this yet? I've got a bug that shows up only in my benchmark, and it'd be far easier to find with debug symbols enabled. |
You can turn on debug symbols when building benchmarks. |
Try |
You can now run |
@ehuss that's a perfect solution! |
A mere
cargo test
neither compiles nor runs the benchmarks. In order to keep them from bitrotting, they must be built and run in CI. But release builds take much more time and RAM than debug builds. In a CI situation, the benchmark results aren't important; only the fact that they can run without errors. So it would be very helpful if there were acargo bench --debug
optionThe closest that can be done right now is to do
cargo build --benches && target/debug/<my_benchmark>-*
. That usage is problematic becauseInstead, it would be great if cargo had a single
cargo bench --debug
command that would build the benchmarks in debug mode and then run them.The text was updated successfully, but these errors were encountered: