Skip to content

Commit

Permalink
renders the speed in bytes per second using SI prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WankkoRee authored and djc committed Jan 24, 2024
1 parent 2a8b2ea commit 1b855e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ impl ProgressStyle {
"bytes_per_sec" => buf
.write_fmt(format_args!("{}/s", HumanBytes(state.per_sec() as u64)))
.unwrap(),
"decimal_bytes_per_sec" => buf
.write_fmt(format_args!(
"{}/s",
DecimalBytes(state.per_sec() as u64)
))
.unwrap(),
"binary_bytes_per_sec" => buf
.write_fmt(format_args!(
"{}/s",
Expand Down

0 comments on commit 1b855e6

Please sign in to comment.