Closed Dekker1 closed 2 months ago
It would definitely make sense to allow custom profiles. However, if I remember correctly, it's not possible to use the bench
profile with a custom benchmarking process. I'll give it a try and eventually document that if that's not working.
Edit: in the end it seem possible to use the bench profile and it works perfectly fine
I was hoping to use this profile as I would like to set debug = true to receive better traces in CodSpeed, but would not like to do this for the release profile. At the moment there doesn't seem to be a way to override the build profile that is used by the cargo codspeed build command.
You shouldn't need to add the debug configuration to your release profile manually since we pass it to rustc. So normally you should have the debug symbols already in your codspeed builds. https://github.com/CodSpeedHQ/codspeed-rust/blob/f91abc79aa86e1def9084fcee78236bcb5eee96c/crates/cargo-codspeed/src/app.rs#L59
Thank you for the quick work! After making the issue, I did indeed find that it was my stripping settings, and not the debug = true
settings that were the problem. Either way the new changes will resolve the problem 😄
Currently the
cargo codspeed build
command requests therelease
profile: https://github.com/CodSpeedHQ/codspeed-rust/blob/ac3dae836b115cb972ce3d5f31cb7e55cb69cdd7/crates/cargo-codspeed/src/build.rs#L36. However, there is a standardbench
profile that is used bycargo bench
. Note that thisbench
by default is the same as therelease
profile, but can be overwritten by users to enable different build options for benchmarking.I was hoping to use this profile as I would like to set
debug = true
to receive better traces in CodSpeed, but would not like to do this for therelease
profile. At the moment there doesn't seem to be a way to override the build profile that is used by thecargo codspeed build
command.