mirror of
https://github.com/danog/ytop.git
synced 2024-11-26 12:04:50 +01:00
Fix disk I/O usage metrics
This commit is contained in:
parent
89a210f0e5
commit
0222dd8e4f
@ -82,8 +82,8 @@ impl UpdatableWidget for DiskWidget<'_> {
|
|||||||
.remove(&partition.device().replace("/dev/", ""))
|
.remove(&partition.device().replace("/dev/", ""))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let bytes_read = io_counters.read_count();
|
let bytes_read = io_counters.read_bytes();
|
||||||
let bytes_written = io_counters.read_count();
|
let bytes_written = io_counters.write_bytes();
|
||||||
// Here we use an `unwrap_or_default` for when we are adding a new disk partition
|
// Here we use an `unwrap_or_default` for when we are adding a new disk partition
|
||||||
// that is loaded when on ytop is already running.
|
// that is loaded when on ytop is already running.
|
||||||
let (bytes_read_recently, bytes_written_recently) = self
|
let (bytes_read_recently, bytes_written_recently) = self
|
||||||
|
Loading…
Reference in New Issue
Block a user