From 90118e76b3340a3b8f0f6877f27eebde7315fea0 Mon Sep 17 00:00:00 2001 From: Damien Deville Date: Thu, 18 Apr 2024 11:01:49 +0200 Subject: [PATCH] perf: change throughput units from MiB/s into Mb/s. --- perf/src/stats.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perf/src/stats.rs b/perf/src/stats.rs index e9591187c..af258c013 100644 --- a/perf/src/stats.rs +++ b/perf/src/stats.rs @@ -95,13 +95,13 @@ impl Stats { let print_metric = |label: &'static str, get_metric: fn(&Histogram) -> u64| { println!( - " {} │ {:>15.2?} │ {:>17.2?} │ {:>9.2?} │ {:11.2} MiB/s │ {:13.2} MiB/s", + " {} │ {:>15.2?} │ {:>17.2?} │ {:>9.2?} │ {:12.2} Mb/s │ {:13.2} Mb/s", label, Duration::from_micros(get_metric(&self.upload_duration)), Duration::from_micros(get_metric(&self.download_duration)), Duration::from_micros(get_metric(&self.fbl)), - get_metric(&self.upload_throughput) as f64 / 1024.0 / 1024.0, - get_metric(&self.download_throughput) as f64 / 1024.0 / 1024.0, + get_metric(&self.upload_throughput) as f64 * 8.0 / 1000.0 / 1000.0, + get_metric(&self.download_throughput) as f64 * 8.0 / 1000.0 / 1000.0, ); };