Trie integrated benchmark (#5616)

This commit is contained in:
Nikolay Volf
2020-04-16 16:18:16 +03:00
committed by GitHub
parent 240b304b4c
commit 9a60df2c56
8 changed files with 5216 additions and 4 deletions
+3 -3
View File
@@ -68,12 +68,12 @@ impl fmt::Display for NsFormatter {
return write!(f, "{} ns", v)
}
if self.0 < 10_000 {
if self.0 < 100_000 {
return write!(f, "{:.1} µs", v as f64 / 1000.0)
}
if self.0 < 1_000_000 {
return write!(f, "{:.1} ms", v as f64 / 1_000_000.0)
return write!(f, "{:.2} ms", v as f64 / 1_000_000.0)
}
if self.0 < 100_000_000 {
@@ -105,7 +105,7 @@ impl fmt::Display for BenchmarkOutput {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"({}: avg {}, w_avg {})",
"{}: avg {}, w_avg {}",
self.name,
NsFormatter(self.raw_average),
NsFormatter(self.average),