Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::resource_metrics Struct Reference

Metrics for resource usage tracking. More...

#include <resource_manager.h>

Collaboration diagram for kcenon::monitoring::resource_metrics:
Collaboration graph

Public Member Functions

 resource_metrics ()=default
 
 resource_metrics (const resource_metrics &other)
 
resource_metricsoperator= (const resource_metrics &other)
 

Public Attributes

std::atomic< size_t > current_usage {0}
 
std::atomic< size_t > total_allocations {0}
 
std::atomic< size_t > peak_usage {0}
 
std::atomic< size_t > rejected_operations {0}
 
std::atomic< size_t > delayed_operations {0}
 

Detailed Description

Metrics for resource usage tracking.

Definition at line 52 of file resource_manager.h.

Constructor & Destructor Documentation

◆ resource_metrics() [1/2]

kcenon::monitoring::resource_metrics::resource_metrics ( )
default

◆ resource_metrics() [2/2]

kcenon::monitoring::resource_metrics::resource_metrics ( const resource_metrics & other)
inline

Definition at line 60 of file resource_manager.h.

61 : current_usage(other.current_usage.load())
62 , total_allocations(other.total_allocations.load())
63 , peak_usage(other.peak_usage.load())
64 , rejected_operations(other.rejected_operations.load())
65 , delayed_operations(other.delayed_operations.load()) {}
std::atomic< size_t > rejected_operations

Member Function Documentation

◆ operator=()

resource_metrics & kcenon::monitoring::resource_metrics::operator= ( const resource_metrics & other)
inline

Definition at line 67 of file resource_manager.h.

67 {
68 if (this != &other) {
69 current_usage.store(other.current_usage.load());
70 total_allocations.store(other.total_allocations.load());
71 peak_usage.store(other.peak_usage.load());
72 rejected_operations.store(other.rejected_operations.load());
73 delayed_operations.store(other.delayed_operations.load());
74 }
75 return *this;
76 }

References current_usage, delayed_operations, kcenon::monitoring::other, peak_usage, rejected_operations, and total_allocations.

Member Data Documentation

◆ current_usage

◆ delayed_operations

std::atomic<size_t> kcenon::monitoring::resource_metrics::delayed_operations {0}

Definition at line 57 of file resource_manager.h.

57{0};

Referenced by operator=().

◆ peak_usage

std::atomic<size_t> kcenon::monitoring::resource_metrics::peak_usage {0}

Definition at line 55 of file resource_manager.h.

55{0};

Referenced by kcenon::monitoring::memory_quota_manager::allocate(), and operator=().

◆ rejected_operations

std::atomic<size_t> kcenon::monitoring::resource_metrics::rejected_operations {0}

Definition at line 56 of file resource_manager.h.

56{0};

Referenced by kcenon::monitoring::memory_quota_manager::allocate(), and operator=().

◆ total_allocations

std::atomic<size_t> kcenon::monitoring::resource_metrics::total_allocations {0}

The documentation for this struct was generated from the following file: