From 460fa62290279ef729ba6bb22e9eee3bb9500e14 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sun, 14 Jan 2018 15:15:33 +0100 Subject: [PATCH] Subtract the initial run --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a8e8553..a4a042b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -169,14 +169,16 @@ fn run_benchmark( options.min_runs }; + let count_remaining = count - 1; + // Save the first result results.push(res); // Re-configure the progress bar - bar.set_length(count); + bar.set_length(count_remaining); // Gather statistics - for _ in 0..count { + for _ in 0..count_remaining { let msg = { let execution_times = results.iter().map(&get_execution_time); let mean = format!("{:.3} s", mean(execution_times));