mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Further simplification of the API
This commit is contained in:
1 parent
4badeb6312
commit
ebf127338c
4 files changed
+51
-95
No files matched your search
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user