3#include <prometheus/gauge.h>
4#include <prometheus/registry.h>
98 ProcessMetrics(std::shared_ptr<std::atomic_flag> checkFlag, const std::shared_ptr<prometheus::Registry> ®);
prometheus::Gauge * _pMemory
Pointer to the memory usage gauge.
clock_t _oldCpuTime
Variable to store the old CPU time.
prometheus::Gauge * _pInitTime
Pointer to initialization time gauge.
prometheus::Gauge * _pCurrentTime
Pointer to the current time gauge.
size_t _oldWriteBytes
Variable to store the old write bytes.
std::atomic_flag _shouldStop
Flag to stop monitoring.
prometheus::Gauge * _pCpuUsage
Pointer to the CPU usage gauge.
void threadRunner() noexcept
prometheus::Gauge * _pPageFaults
Pointer to the page faults gauge.
prometheus::Gauge * _pFileDescriptorCount
Pointer to the file descriptor count gauge.
std::pair< size_t, size_t > getDiskIO()
prometheus::Gauge * _pDiskRead
Pointer to the disk read gauge.
size_t _oldReadBytes
Variable to store the old read bytes.
prometheus::Gauge * _pThreadCount
Pointer to the thread count gauge.
static size_t countDirectoryEntries(const std::string &path)
static long int getMemoryUsage()
std::shared_ptr< std::atomic_flag > _checkFlag
Runtime check flag.
std::unique_ptr< std::thread > _thread
Thread handler.
static size_t getThreadCount()
static long int getPageFaults()
static size_t getFileDescriptorCount()
prometheus::Gauge * _pDiskWrite
Pointer to the disk write gauge.
Structure to store the old CPU times.