Skip to content
Snippets Groups Projects
Unverified Commit 4b583682 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

compute the width of loading bar dynamically

parent 18b73ee7
No related branches found
No related tags found
No related merge requests found
Pipeline #4930 passed
......@@ -40,11 +40,12 @@ where
let mut times = vec![];
for i in 0..b.nb_measurements {
eprint!(
"bencher: {}, label: {} [{:>5}/{}]\r",
"bencher: {}, label: {} [{:>width$}/{}]\r",
b.name,
label,
i + 1,
b.nb_measurements
b.nb_measurements,
width = format!("{}", b.nb_measurements).len()
);
times.push(f().as_nanos());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment