Skip to content

Commit

Permalink
perf: change throughput units from MiB/s into Mb/s.
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-damiend authored and djc committed Apr 18, 2024
1 parent 52c285d commit 90118e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions perf/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ impl Stats {

let print_metric = |label: &'static str, get_metric: fn(&Histogram<u64>) -> 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,
);
};

Expand Down

0 comments on commit 90118e7

Please sign in to comment.