|
Common System 0.2.0
Common interfaces and patterns for system integration
|
Point-in-time snapshot of component statistics. More...
#include <stats_snapshot.h>

Public Member Functions | |
| auto | to_json () const -> std::string |
| Serialize snapshot to JSON string. | |
Public Attributes | |
| std::string | component_name |
| Component identifier. | |
| std::chrono::system_clock::time_point | timestamp |
| Snapshot capture time. | |
| std::unordered_map< std::string, stats_value > | values |
| Metric key-value pairs. | |
Point-in-time snapshot of component statistics.
Immutable value type that captures statistics with metadata. Designed for serialization, logging, and transmission to monitoring systems.
Usage Example:
Definition at line 52 of file stats_snapshot.h.
|
inlinenodiscard |
Serialize snapshot to JSON string.
Format: { "component": "component_name", "timestamp": "2025-01-30T12:34:56Z", "metrics": { "metric1": value1, "metric2": value2 } }
Definition at line 72 of file stats_snapshot.h.
References component_name, timestamp, and values.
| std::string kcenon::common::interfaces::stats_snapshot::component_name |
| std::chrono::system_clock::time_point kcenon::common::interfaces::stats_snapshot::timestamp |
| std::unordered_map<std::string, stats_value> kcenon::common::interfaces::stats_snapshot::values |