We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0cb27e commit 7a92590Copy full SHA for 7a92590
collector/benchlib/src/benchmark.rs
@@ -80,6 +80,13 @@ impl BenchmarkGroup {
80
81
for (name, benchmark_fn) in items {
82
let mut stats: Vec<BenchmarkStats> = Vec::with_capacity(args.iterations as usize);
83
+ // Warm-up
84
+ for _ in 0..3 {
85
+ let benchmark_stats = benchmark_fn()?;
86
+ black_box(benchmark_stats);
87
+ }
88
+
89
+ // Actual measurement
90
for i in 0..args.iterations {
91
let benchmark_stats = benchmark_fn()?;
92
log::info!("Benchmark (run {i}) `{name}` completed: {benchmark_stats:?}");
0 commit comments