|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Immutable snapshot of histogram state for export. More...
#include <histogram.h>

Public Member Functions | |
| auto | to_prometheus (const std::string &name) const -> std::string |
| Export histogram in Prometheus format. | |
| auto | to_json () const -> std::string |
| Export histogram as JSON. | |
Public Attributes | |
| uint64_t | count |
| Total number of observations. | |
| double | sum |
| Sum of all observed values. | |
| double | min_value |
| Minimum observed value. | |
| double | max_value |
| Maximum observed value. | |
| std::map< double, double > | percentiles |
| Percentile -> value mapping. | |
| std::vector< std::pair< double, uint64_t > > | buckets |
| Boundary -> cumulative count. | |
| std::map< std::string, std::string > | labels |
| Additional metric labels. | |
Immutable snapshot of histogram state for export.
Definition at line 59 of file histogram.h.
|
nodiscard |
Export histogram as JSON.
Definition at line 82 of file histogram.cpp.
References buckets, count, labels, max_value, min_value, percentiles, and sum.
|
nodiscard |
Export histogram in Prometheus format.
| name | Metric name |
Definition at line 19 of file histogram.cpp.
| std::vector<std::pair<double, uint64_t> > kcenon::network::metrics::histogram_snapshot::buckets |
Boundary -> cumulative count.
Definition at line 66 of file histogram.h.
Referenced by kcenon::network::metrics::sliding_histogram::aggregate(), kcenon::network::metrics::histogram::snapshot(), and to_json().
| uint64_t kcenon::network::metrics::histogram_snapshot::count |
Total number of observations.
Definition at line 61 of file histogram.h.
Referenced by kcenon::network::metrics::sliding_histogram::aggregate(), kcenon::network::metrics::histogram::snapshot(), and to_json().
| std::map<std::string, std::string> kcenon::network::metrics::histogram_snapshot::labels |
Additional metric labels.
Definition at line 67 of file histogram.h.
Referenced by kcenon::network::metrics::histogram::snapshot(), and to_json().
| double kcenon::network::metrics::histogram_snapshot::max_value |
Maximum observed value.
Definition at line 64 of file histogram.h.
Referenced by kcenon::network::metrics::sliding_histogram::aggregate(), kcenon::network::metrics::histogram::snapshot(), and to_json().
| double kcenon::network::metrics::histogram_snapshot::min_value |
Minimum observed value.
Definition at line 63 of file histogram.h.
Referenced by kcenon::network::metrics::sliding_histogram::aggregate(), kcenon::network::metrics::histogram::snapshot(), and to_json().
| std::map<double, double> kcenon::network::metrics::histogram_snapshot::percentiles |
Percentile -> value mapping.
Definition at line 65 of file histogram.h.
Referenced by kcenon::network::metrics::sliding_histogram::aggregate(), kcenon::network::metrics::histogram::snapshot(), and to_json().
| double kcenon::network::metrics::histogram_snapshot::sum |
Sum of all observed values.
Definition at line 62 of file histogram.h.
Referenced by kcenon::network::metrics::sliding_histogram::aggregate(), kcenon::network::metrics::histogram::snapshot(), and to_json().