mirror of
https://github.com/sharkdp/hyperfine.git
synced 2024-08-17 01:40:28 +03:00
Reset elapsed every time the progress bar is increased.
This commit is contained in:
parent
4e8cb3fec0
commit
c83b4126ea
@ -215,7 +215,8 @@ impl<'a> Executor for ShellExecutor<'a> {
|
||||
}
|
||||
|
||||
if let Some(bar) = progress_bar.as_ref() {
|
||||
bar.inc(1)
|
||||
bar.inc(1);
|
||||
bar.reset_elapsed();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,8 @@ impl<'a> Benchmark<'a> {
|
||||
let _ = run_preparation_command()?;
|
||||
let _ = self.executor.run_command_and_measure(self.command, None)?;
|
||||
if let Some(bar) = progress_bar.as_ref() {
|
||||
bar.inc(1)
|
||||
bar.inc(1);
|
||||
bar.reset_elapsed();
|
||||
}
|
||||
}
|
||||
if let Some(bar) = progress_bar.as_ref() {
|
||||
@ -224,7 +225,8 @@ impl<'a> Benchmark<'a> {
|
||||
bar.set_length(count)
|
||||
}
|
||||
if let Some(bar) = progress_bar.as_ref() {
|
||||
bar.inc(1)
|
||||
bar.inc(1);
|
||||
bar.reset_elapsed();
|
||||
}
|
||||
|
||||
// Gather statistics (perform the actual benchmark)
|
||||
@ -251,7 +253,8 @@ impl<'a> Benchmark<'a> {
|
||||
all_succeeded = all_succeeded && success;
|
||||
|
||||
if let Some(bar) = progress_bar.as_ref() {
|
||||
bar.inc(1)
|
||||
bar.inc(1);
|
||||
bar.reset_elapsed();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user