Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bheisler/criterion.rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 759475a539bccb607cea1cbce14fe25b6328e234
Choose a base ref
..
head repository: bheisler/criterion.rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bdf88244a9c976825ff7b615cff4253601007513
Choose a head ref
Showing with 3 additions and 0 deletions.
  1. +3 −0 tests/criterion_tests.rs
3 changes: 3 additions & 0 deletions tests/criterion_tests.rs
Original file line number Diff line number Diff line change
@@ -274,6 +274,9 @@ fn test_timing_loops() {
let dir = temp_dir();
let mut c = short_benchmark(&dir);
let mut group = c.benchmark_group("test_timing_loops");
group.bench_function("iter_reuse", |b| {
b.iter_reuse(vec![10], |v| v);
});
group.bench_function("iter_with_setup", |b| {
b.iter_with_setup(|| vec![10], |v| v[0]);
});