|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Collection of metrics. More...
#include <monitoring_interface.h>

Public Member Functions | |
| monitoring_data () | |
| void | add_metric (const std::string &name, double value, metric_type type=metric_type::gauge) |
| Add a metric to the collection. | |
| void | add_metric (const metric_value &metric) |
| Add a pre-built metric. | |
| const std::vector< metric_value > & | get_metrics () const |
| Get all metrics. | |
| std::chrono::system_clock::time_point | get_collection_time () const |
| Get collection timestamp. | |
| void | clear () |
| Clear all metrics. | |
| size_t | size () const |
| Get number of metrics. | |
Private Attributes | |
| std::vector< metric_value > | metrics_ |
| std::chrono::system_clock::time_point | collection_time_ |
Collection of metrics.
Definition at line 65 of file monitoring_interface.h.
|
inline |
Definition at line 71 of file monitoring_interface.h.
|
inline |
Add a pre-built metric.
| metric | The metric to add |
Definition at line 88 of file monitoring_interface.h.
References metrics_.
|
inline |
Add a metric to the collection.
| name | Metric name |
| value | Metric value |
| type | Metric type |
Definition at line 79 of file monitoring_interface.h.
References metrics_.
Referenced by kcenon::logger::basic_monitor::collect_metrics(), and kcenon::logger::thread_system_monitor_adapter::collect_metrics().

|
inline |
|
inline |
Get collection timestamp.
Definition at line 104 of file monitoring_interface.h.
References collection_time_.
|
inline |
Get all metrics.
Definition at line 96 of file monitoring_interface.h.
References metrics_.
|
inline |
Get number of metrics.
Definition at line 119 of file monitoring_interface.h.
References metrics_.
|
private |
Definition at line 68 of file monitoring_interface.h.
Referenced by get_collection_time().
|
private |
Definition at line 67 of file monitoring_interface.h.
Referenced by add_metric(), add_metric(), clear(), get_metrics(), and size().