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 overriding criterion configs #71

Open
pedantic79 opened this issue Dec 15, 2020 · 0 comments
Open

Allow overriding criterion configs #71

pedantic79 opened this issue Dec 15, 2020 · 0 comments

Comments

@pedantic79
Copy link

On Advent of Code 2020, Day 15, part 2. I'm trying to benchmark things in the 1s range in performance

runner: 1.159830989s

With the default criterion config that produces an estimate of:

Benchmarking Day15 - Part2/alt: Collecting 100 samples in estimated 6081.4 s (5050 iterations)

This is quite a long time to wait. Ideally, we would be able to annotate the individual test to override the default criterion config.

I'm able to work around this issue by editing target/aoc/aoc-autobench/benches/aoc_benchmark.rs and changing:

criterion_group!(benches, aoc_benchmark);

into

criterion_group! {
    name = benches;
    config = Criterion::default().significance_level(0.05).sample_size(15);
    targets = aoc_benchmark
}
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