-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo bench --no-run uses release profile #4240
Comments
cc @matklad, more oddness with profiles! |
@joliss Thank you!! My blood pressure were approaching rage quit levels here right before finding this 😆
|
@alexcrichton I hadn't really thought of it, but it does seem surprising that dependencies use dev/release profiles even when benching/testing. Is that really intended? @anderejd I'm surprised that |
@ehuss It seems like I was mistaken. It was a silent failure of my dtrace script that produced empty output, nothing related to cargo. Sorry for the noise. |
@ehuss I believe that was done historically to ensure that |
Use "test" profile for `cargo build` benchmarks. When using `cargo build` (without `--release`), build benchmarks using the "test" profile. This was causing some confusion where the benchmark is placed in the `target/debug` directory, and also causing some duplicates that may not be expected. It also makes it easier to debug benchmarks (previously you had to edit the `[profile.bench]` profile). Closes #5575, closes #6301, closes #4240, closes #4929.
This is the closest thing I could find to my current problem. Running
produces bench binaries without debug symbols. Running
produces bench binaries with debug symbols. I'm using |
I have the following snippet in my
Cargo.toml
:However, when I run
cargo bench --no-run
, the binary that is placed intarget/release/benches-*
does not seem to contain debug information.Only when I add the following snippet do I get debug information:
The text was updated successfully, but these errors were encountered: