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

Add option to wrap benchmark target command #7

Open
bheisler opened this issue Jun 29, 2020 · 0 comments
Open

Add option to wrap benchmark target command #7

bheisler opened this issue Jun 29, 2020 · 0 comments

Comments

@bheisler
Copy link
Owner

Criterion.rs benchmarks support a --profile-time option for doing profiling. However, cargo bench offers no way to run the benchmarks in a profiler, so users have to do that manually.

cargo-criterion could allow the user to provide a command template. For example:
cargo criterion --run-with 'perf record -o %TARGET%-perf.data -g %ARGS%' -- --profile-time 120 my_benchmark_name

This would replace %TARGET% with the benchmark target name and %ARGS% with the benchmark target executable and its arguments, then invoke the resulting command.

@bheisler bheisler changed the title Add option to wrap benchmark target command. Add option to wrap benchmark target command Jun 29, 2020
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

No branches or pull requests

1 participant