summaryrefslogtreecommitdiffstats
path: root/unsupported
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-02-14 00:23:22 +0100
committercgzones <cgzones@googlemail.com>2023-02-19 17:56:50 +0100
commit3519b383c705de6c41bdec7b87367d5e3c88ec02 (patch)
treec5f4d16dddcd344d4239d5a42c0b48ce89d84718 /unsupported
parente0229b205c5dceb10447457c8f78acb16c96505a (diff)
Implement File Descriptor Meter support for the Unsupported (demo platform)
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Platform.c7
-rw-r--r--unsupported/Platform.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/unsupported/Platform.c b/unsupported/Platform.c
index 27bc560b..df7f3600 100644
--- a/unsupported/Platform.c
+++ b/unsupported/Platform.c
@@ -16,6 +16,7 @@ in the source distribution for its full text.
#include "ClockMeter.h"
#include "DateMeter.h"
#include "DateTimeMeter.h"
+#include "FileDescriptorMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
@@ -70,6 +71,7 @@ const MeterClass* const Platform_meterTypes[] = {
&RightCPUs4Meter_class,
&LeftCPUs8Meter_class,
&RightCPUs8Meter_class,
+ &FileDescriptorMeter_class,
&BlankMeter_class,
NULL
};
@@ -134,6 +136,11 @@ FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) {
return NULL;
}
+void Platform_getFileDescriptors(double* used, double* max) {
+ *used = 1337;
+ *max = 4711;
+}
+
bool Platform_getDiskIO(DiskIOData* data) {
(void)data;
return false;
diff --git a/unsupported/Platform.h b/unsupported/Platform.h
index f475dda4..a718ca09 100644
--- a/unsupported/Platform.h
+++ b/unsupported/Platform.h
@@ -52,6 +52,8 @@ char* Platform_getProcessEnv(pid_t pid);
FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid);
+void Platform_getFileDescriptors(double* used, double* max);
+
bool Platform_getDiskIO(DiskIOData* data);
bool Platform_getNetworkIO(NetworkIOData* data);

© 2014-2024 Faster IT GmbH | imprint | privacy policy