Increase precision of benchmarking results summary (#6092)

Co-authored-by: Matt Rutherford <mattrutherford@users.noreply.github.com>
This commit is contained in:
mattrutherford
2020-05-21 12:55:00 +01:00
committed by GitHub
parent 5bf9e63181
commit a90c4232e3
+3 -3
View File
@@ -75,14 +75,14 @@ impl fmt::Display for NsFormatter {
}
if self.0 < 1_000_000 {
return write!(f, "{:.2} ms", v as f64 / 1_000_000.0)
return write!(f, "{:.4} ms", v as f64 / 1_000_000.0)
}
if self.0 < 100_000_000 {
return write!(f, "{} ms", v as f64 / 1_000_000.0)
return write!(f, "{:.1} ms", v as f64 / 1_000_000.0)
}
write!(f, "{:.2} s", v as f64 / 1_000_000_000.0)
write!(f, "{:.4} s", v as f64 / 1_000_000_000.0)
}
}