Skip to content

Allow benchmarking and profiling stable benchmarks #1780

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

Merged
merged 1 commit into from
Dec 24, 2023

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Dec 20, 2023

By adding a --category flag to bench_local and profile_local.

Fixes: #1777

@Nadrieril
Copy link
Member

Thanks for making this! This solves my problem nicely

@nnethercote
Copy link
Contributor

Should it be Primary,Secondary to match e.g. Debug and Full? Otherwise, looks good.

@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 20, 2023

Yes, that would be a bit better match, but for that we'd have to rename the categories in the compile benchmarks JSON files on disk (since these use the lowercase name), and I didn't want to do that in this PR, seemed like an unnecessarily invasive change.

@nnethercote
Copy link
Contributor

Is there some way to change this:

#[arg(long, value_parser = EnumArgParser::<Category>::default(), default_value = "primary,secondary")]

so that we can use upper case on the command line but then it gets converted to lower case internally to match the existing JSON?

@Kobzol Kobzol force-pushed the bench-local-category branch from 6e2448d to f21168d Compare December 23, 2023 13:22
@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 23, 2023

Turns out that there is :) I thought that we use serde for parsing the CLI values, but that is not the case, so it was easy to change the field naming for serde/clap separately. Thanks!

@nnethercote
Copy link
Contributor

👍

@Kobzol Kobzol merged commit 179e845 into rust-lang:master Dec 24, 2023
@Kobzol Kobzol deleted the bench-local-category branch December 24, 2023 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stable-only benchmarks don't run locally
3 participants