|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Memory-efficient metric value storage. More...
#include <metric_types.h>

Public Types | |
| using | value_type |
Public Member Functions | |
| compact_metric_value () noexcept | |
| compact_metric_value (const metric_metadata &meta, double val) noexcept | |
| compact_metric_value (const metric_metadata &meta, int64_t val) noexcept | |
| compact_metric_value (const metric_metadata &meta, std::string val) noexcept | |
| double | as_double () const |
| Get value as double. | |
| int64_t | as_int64 () const |
| Get value as integer. | |
| std::string | as_string () const |
| Get value as string. | |
| std::chrono::system_clock::time_point | get_timestamp () const |
| Get timestamp as time_point. | |
| bool | is_numeric () const noexcept |
| Check if metric is numeric. | |
| size_t | memory_footprint () const noexcept |
| Get memory footprint in bytes. | |
Public Attributes | |
| metric_metadata | metadata |
| value_type | value |
| uint64_t | timestamp_us |
Memory-efficient metric value storage.
Definition at line 95 of file metric_types.h.
Definition at line 96 of file metric_types.h.
|
inlinenoexcept |
Definition at line 106 of file metric_types.h.
|
inlinenoexcept |
Definition at line 109 of file metric_types.h.
References timestamp_us.
|
inlinenoexcept |
Definition at line 115 of file metric_types.h.
References timestamp_us.
|
inlinenoexcept |
Definition at line 121 of file metric_types.h.
References timestamp_us.
|
inline |
Get value as double.
Definition at line 130 of file metric_types.h.
References value.
Referenced by demonstrate_metric_metadata(), and TEST_F().

|
inline |
Get value as integer.
Definition at line 142 of file metric_types.h.
References value.
Referenced by TEST_F().

|
inline |
Get value as string.
Definition at line 154 of file metric_types.h.
References value.
Referenced by TEST_F().

|
inline |
Get timestamp as time_point.
Definition at line 168 of file metric_types.h.
References timestamp_us.
|
inlinenoexcept |
|
inlinenoexcept |
Get memory footprint in bytes.
Definition at line 184 of file metric_types.h.
References timestamp_us, and value.
Referenced by demonstrate_metric_metadata().

| metric_metadata kcenon::monitoring::compact_metric_value::metadata |
Definition at line 102 of file metric_types.h.
| uint64_t kcenon::monitoring::compact_metric_value::timestamp_us |
Definition at line 104 of file metric_types.h.
Referenced by compact_metric_value(), compact_metric_value(), compact_metric_value(), get_timestamp(), and memory_footprint().
| value_type kcenon::monitoring::compact_metric_value::value |
Definition at line 103 of file metric_types.h.
Referenced by as_double(), as_int64(), as_string(), is_numeric(), and memory_footprint().