Further simplification of the API

This commit is contained in:
David Peter authored and David Peter committed 2026-10-05 16:00:08 +02:00
1 parent 4badeb6312
commit ebf127338c
4 files changed
+51 -95

No files matched your search

+6 -3
View File
@@ -365,9 +365,12 @@ impl<'a> Benchmark<'a> {
}
// Formatting and console output
let (mean_str, time_unit) = measurements
.time_wall_clock_mean()
.format_auto_with_unit(self.options.time_unit);
let t_wall_clock_mean = measurements.time_wall_clock_mean();
let time_unit = self
.options
.time_unit
.unwrap_or(t_wall_clock_mean.suitable_unit());
let mean_str = t_wall_clock_mean.format_auto(Some(time_unit));
let min_str = measurements.min().format_auto(Some(time_unit));
let max_str = measurements.max().format_auto(Some(time_unit));
let num_str = format!("{num_runs} runs", num_runs = measurements.len());