Skip to content

Commit

Permalink
Use uint64_t for disk IO accumulated values
Browse files Browse the repository at this point in the history
Change the data type from unsigned long long to uint64_t.

Co-authored-by: Benny Baumann <[email protected]>
  • Loading branch information
Explorer09 and BenBE committed Dec 14, 2024
1 parent e99d0da commit becb032
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions darwin/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ bool Platform_getDiskIO(DiskIOData* data) {
if (IOServiceGetMatchingServices(iokit_port, IOServiceMatching("IOBlockStorageDriver"), &drive_list))
return false;

unsigned long long int read_sum = 0, write_sum = 0, timeSpend_sum = 0;
uint64_t read_sum = 0, write_sum = 0, timeSpend_sum = 0;
uint64_t numDisks = 0;

io_registry_entry_t drive;
Expand Down Expand Up @@ -437,7 +437,7 @@ bool Platform_getDiskIO(DiskIOData* data) {
numDisks++;

CFNumberRef number;
unsigned long long int value;
uint64_t value;

/* Get bytes read */
number = (CFNumberRef) CFDictionaryGetValue(statistics, CFSTR(kIOBlockStorageDriverStatisticsBytesReadKey));
Expand Down
2 changes: 1 addition & 1 deletion freebsd/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ bool Platform_getDiskIO(DiskIOData* data) {

int count = current.dinfo->numdevs;

unsigned long long int bytesReadSum = 0, bytesWriteSum = 0, timeSpendSum = 0;
uint64_t bytesReadSum = 0, bytesWriteSum = 0, timeSpendSum = 0;
uint64_t numDisks = 0;

// get data
Expand Down
2 changes: 1 addition & 1 deletion linux/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ bool Platform_getDiskIO(DiskIOData* data) {

char lastTopDisk[32] = { '\0' };

unsigned long long int read_sum = 0, write_sum = 0, timeSpend_sum = 0;
uint64_t read_sum = 0, write_sum = 0, timeSpend_sum = 0;
uint64_t numDisks = 0;

char lineBuffer[256];
Expand Down

0 comments on commit becb032

Please sign in to comment.