mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Make stddev fields optional, hide "± σ" for 1 run
This commit is contained in:
1 parent
bffd476128
commit
abd0d335ab
7 files changed
+106
-79
No files matched your search
+6
-2
@@ -61,9 +61,13 @@ pub fn write_benchmark_comparison(results: &[BenchmarkResult]) {
|
||||
|
||||
for item in others {
|
||||
println!(
|
||||
"{} ± {} times faster than '{}'",
|
||||
"{}{} times faster than '{}'",
|
||||
format!("{:8.2}", item.relative_speed).bold().green(),
|
||||
format!("{:.2}", item.relative_speed_stddev).green(),
|
||||
if let Some(stddev) = item.relative_speed_stddev {
|
||||
format!(" ± {}", format!("{:.2}", stddev).green())
|
||||
} else {
|
||||
"".into()
|
||||
},
|
||||
&item.result.command.magenta()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user