Skip to content

Commit

Permalink
zcache iostat -l buckets start at 1us (openzfs#824)
Browse files Browse the repository at this point in the history
In `zcache iostat -l`, the buckets are labeled starting at 1024ns (and
doubling from there), when in reality the first bucket is 1000ns (1us
exactly).
  • Loading branch information
ahrens authored Apr 27, 2023
1 parent 0765234 commit fc6cebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/zfs_object_agent/zcache/src/iostat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl IoStatDisplay {
for j in 0..LatencyHistogram::BUCKETS {
// First display each bucket name
// Use ending range of bucket for latency (first bucket is 1us)
let nice_value = nice_number_time(Duration::from_nanos((1024 << j) - 1));
let nice_value = nice_number_time(Duration::from_micros(1u64 << j));
write_stdout!("{:>1$} ", nice_value, self.max_name_length);

// Then display bucket values for each disk io type (total of 5)
Expand Down

0 comments on commit fc6cebe

Please sign in to comment.