From 0222dd8e4fcee882a5f864879425db7d887a3a99 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 8 Jul 2020 21:33:55 +0200 Subject: [PATCH] Fix disk I/O usage metrics --- src/widgets/disk.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/disk.rs b/src/widgets/disk.rs index 46b23a2..3762ffc 100644 --- a/src/widgets/disk.rs +++ b/src/widgets/disk.rs @@ -82,8 +82,8 @@ impl UpdatableWidget for DiskWidget<'_> { .remove(&partition.device().replace("/dev/", "")) .unwrap_or_default(); - let bytes_read = io_counters.read_count(); - let bytes_written = io_counters.read_count(); + let bytes_read = io_counters.read_bytes(); + let bytes_written = io_counters.write_bytes(); // 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. let (bytes_read_recently, bytes_written_recently) = self