1
0
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:
Daniil Gentili 2020-07-08 21:33:55 +02:00
parent 89a210f0e5
commit 0222dd8e4f
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -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