feat(disk): add disk read/write latency measurement and display#32
Conversation
Introduce disk I/O latency tracking using psutil's read_time and write_time counters. The widget now shows per-operation latency for both reads and writes, alongside existing throughput, max, and total metrics. This improves observability of slow disk operations and addresses feature request anistark#6.
|
All linters, formatters, and type checks pass (just format, just lint, just type). |
|
Thanks for the PR @Rahul2512Chauhan 🙌🏼 The "Free, Used, Total" line is repeating. Can you also fix that so it only appears once? It's a diff issue(#8) from your PR. But would be great to have it fixed. |
Hi @anistark 👋 I checked the duplication issue for the Free / Used / Total rows , it happens only on macOS (APFS) because multiple volumes point to the same physical disk and report identical stats. So I applied filtering only for Darwin, showing just the / mount, while keeping full behaviour on Linux/Windows where partitions are real and distinct. { Before I push the fix , can you please confirm if this OS-specific approach sounds good to you? Thanks! 🙌 |
Sounds good. Thanks 🙌🏼 |
|
Thanks @anistark for your guidance 🙌 |

Summary
This PR adds support for measuring and displaying disk read and write
latency in the Disk widget.
What’s Added
read_time/ read operations)write_time/ write operations)Why This Is Needed
Latency is an important metric for understanding disk performance.
Even when throughput looks normal, high latency can indicate slow I/O,
filesystem issues, or aging hardware.
This implements the requested functionality from Issue #6.
Testing
Related Issue
Closes #6