Skip to content

Commit 5d1ac55

Browse files
committed
Display min value when running runtime benchmarks locally
The mean is, despite my best efforts, often quite noisy, and we will probably display the min in the frontend anyway, so it should be the "default" value for gauging changes in benchmarks.
1 parent b8c1747 commit 5d1ac55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

collector/src/runtime/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ fn print_stats(result: &BenchmarkResult) {
221221
.map(|v| (v as f64 - mean).powf(2.0)),
222222
)
223223
.sqrt();
224+
let min = result.stats.iter().map(&f).min().unwrap_or(0);
224225

225226
println!(
226-
"{name:>18}: {:>16} (+/- {:>11})",
227+
"{name:>18}: min:{:>16} mean: {:>16} stddev: {:>11}",
228+
min.separate_with_commas(),
227229
(mean as u64).separate_with_commas(),
228230
(stddev as u64).separate_with_commas()
229231
);

0 commit comments

Comments
 (0)