mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 01:00:31 +00:00
1 parent
fe041df718
commit
d78c33b864
5 files changed
+110
-28
No files matched your search
@@ -1,3 +1,4 @@
|
||||
use std::cmp;
|
||||
use std::io;
|
||||
use std::process::Stdio;
|
||||
|
||||
@@ -187,7 +188,7 @@ pub fn run_benchmark(
|
||||
|
||||
// Set up progress bar (and spinner for initial measurement)
|
||||
let progress_bar = get_progress_bar(
|
||||
options.min_runs,
|
||||
options.runs.min,
|
||||
"Initial time measurement",
|
||||
&options.output_style,
|
||||
);
|
||||
@@ -215,11 +216,10 @@ pub fn run_benchmark(
|
||||
/ (res.time_real + prepare_res.time_real + shell_spawning_time.time_real))
|
||||
as u64;
|
||||
|
||||
let count = if runs_in_min_time >= options.min_runs {
|
||||
runs_in_min_time
|
||||
} else {
|
||||
options.min_runs
|
||||
};
|
||||
let count = cmp::min(
|
||||
cmp::max(runs_in_min_time, options.runs.min),
|
||||
options.runs.max
|
||||
);
|
||||
|
||||
let count_remaining = count - 1;
|
||||
|
||||
|
||||
Reference in new issue
Block a user