PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::monitoring::metrics_snapshot Struct Reference

Complete snapshot of metrics at a point in time. More...

#include <pacs_monitor.h>

Collaboration diagram for kcenon::pacs::monitoring::metrics_snapshot:
Collaboration graph

Public Member Functions

 metrics_snapshot ()
 
void add_metric (const std::string &name, double value, metric_type type=metric_type::gauge)
 

Public Attributes

std::vector< metric_valuemetrics
 
std::chrono::system_clock::time_point capture_time
 
std::string source_id
 

Detailed Description

Complete snapshot of metrics at a point in time.

Definition at line 101 of file pacs_monitor.h.

Constructor & Destructor Documentation

◆ metrics_snapshot()

kcenon::pacs::monitoring::metrics_snapshot::metrics_snapshot ( )
inline
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/pacs_monitor.h.

Definition at line 106 of file pacs_monitor.h.

107 : capture_time(std::chrono::system_clock::now()) {}
std::chrono::system_clock::time_point capture_time

Member Function Documentation

◆ add_metric()

void kcenon::pacs::monitoring::metrics_snapshot::add_metric ( const std::string & name,
double value,
metric_type type = metric_type::gauge )
inline
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/pacs_monitor.h.

Definition at line 109 of file pacs_monitor.h.

111 {
112 metrics.emplace_back(name, value, type);
113 }
std::vector< metric_value > metrics
std::string_view name

References metrics, and name.

Referenced by kcenon::pacs::monitoring::pacs_monitor::collect_all_metrics().

Here is the caller graph for this function:

Member Data Documentation

◆ capture_time

std::chrono::system_clock::time_point kcenon::pacs::monitoring::metrics_snapshot::capture_time

◆ metrics

std::vector<metric_value> kcenon::pacs::monitoring::metrics_snapshot::metrics

◆ source_id

std::string kcenon::pacs::monitoring::metrics_snapshot::source_id

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