Improve handling of no data in Disk and Network IO Meters

This commit is contained in:
Christian Göttsche
2020-10-20 21:40:51 +02:00
committed by cgzones
parent 167adc0a2b
commit f757810f48
18 changed files with 119 additions and 61 deletions

View File

@ -264,12 +264,15 @@ char* Platform_getProcessEnv(pid_t pid) {
return envBuilder.env;
}
void Platform_getDiskIO(unsigned long int *bytesRead, unsigned long int *bytesWrite, unsigned long int *msTimeSpend) {
bool Platform_getDiskIO(unsigned long int *bytesRead,
unsigned long int *bytesWrite,
unsigned long int *msTimeSpend) {
// TODO
*bytesRead = *bytesWrite = *msTimeSpend = 0;
return false;
}
void Platform_getNetworkIO(unsigned long int *bytesReceived,
bool Platform_getNetworkIO(unsigned long int *bytesReceived,
unsigned long int *packetsReceived,
unsigned long int *bytesTransmitted,
unsigned long int *packetsTransmitted) {
@ -278,4 +281,5 @@ void Platform_getNetworkIO(unsigned long int *bytesReceived,
*packetsReceived = 0;
*bytesTransmitted = 0;
*packetsTransmitted = 0;
return false;
}

View File

@ -63,9 +63,11 @@ void Platform_setZfsCompressedArcValues(Meter* this);
char* Platform_getProcessEnv(pid_t pid);
void Platform_getDiskIO(unsigned long int *bytesRead, unsigned long int *bytesWrite, unsigned long int *msTimeSpend);
bool Platform_getDiskIO(unsigned long int *bytesRead,
unsigned long int *bytesWrite,
unsigned long int *msTimeSpend);
void Platform_getNetworkIO(unsigned long int *bytesReceived,
bool Platform_getNetworkIO(unsigned long int *bytesReceived,
unsigned long int *packetsReceived,
unsigned long int *bytesTransmitted,
unsigned long int *packetsTransmitted);