Fix integer sizing issues in the DiskIO Meter

On Linux kernels the size of the values exported for block
device bytes has used a 64 bit integer for quite some time
(2.6+ IIRC).  Make the procfs value extraction use correct
types and change internal types used to rate convert these
counters (within the DiskIO Meter) 64 bit integers, where
appropriate.
This commit is contained in:
Nathan Scott
2021-03-01 12:10:18 +11:00
parent 379421d3b2
commit 00339087b0
4 changed files with 25 additions and 19 deletions

View File

@ -289,7 +289,7 @@ bool Platform_getDiskIO(DiskIOData* data) {
int count = current.dinfo->numdevs;
unsigned long int bytesReadSum = 0, bytesWriteSum = 0, timeSpendSum = 0;
unsigned long long int bytesReadSum = 0, bytesWriteSum = 0, timeSpendSum = 0;
// get data
for (int i = 0; i < count; i++) {