Skip to content
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

Allow selecting different profiles #48

Closed
Dekker1 opened this issue Sep 2, 2024 · 3 comments · Fixed by #49
Closed

Allow selecting different profiles #48

Dekker1 opened this issue Sep 2, 2024 · 3 comments · Fixed by #49
Assignees

Comments

@Dekker1
Copy link

Dekker1 commented Sep 2, 2024

Currently the cargo codspeed build command requests the release profile:

compile_opts.build_config.requested_profile = "release".into();
. However, there is a standard bench profile that is used by cargo bench. Note that this bench by default is the same as the release 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 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.

@art049 art049 changed the title Use bench compilation profile (or selecting different profiles) Allow selecting different profiles Sep 4, 2024
@art049
Copy link
Member

art049 commented Sep 4, 2024

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

@art049 art049 self-assigned this Sep 4, 2024
@art049
Copy link
Member

art049 commented Sep 4, 2024

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.

rustflags.push_str(" -g --cfg codspeed");

@Dekker1
Copy link
Author

Dekker1 commented Sep 5, 2024

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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants