The metric class is a conceptual superclass that represents all metrics in NES. Currently existing metrics are Counter, GaugeCollectors, Histogram and Meter.
More...
#include <Metric.hpp>
|
nlohmann::json | asJson (const Metric &metric) |
| This method returns the value of the metric as a JSON. More...
|
|
void | writeToBuffer (const Metric &x, Runtime::TupleBuffer &buf, uint64_t tupleIndex) |
| This method returns the type of the stored metric. Note that the according function needs to be defined, otherwise it will be categorized as UnknownType. More...
|
|
void | readFromBuffer (const Metric &x, Runtime::TupleBuffer &buf, uint64_t tupleIndex) |
| This method returns the type of the stored metric. Note that the according function needs to be defined, otherwise it will be categorized as UnknownType. More...
|
|
The metric class is a conceptual superclass that represents all metrics in NES. Currently existing metrics are Counter, GaugeCollectors, Histogram and Meter.
◆ Metric() [1/4]
template<typename T >
NES::Monitoring::Metric::Metric |
( |
T |
x | ) |
|
|
inlineexplicit |
◆ Metric() [2/4]
template<typename T >
NES::Monitoring::Metric::Metric |
( |
T |
x, |
|
|
MetricType |
type |
|
) |
| |
|
inlineexplicit |
◆ ~Metric()
NES::Monitoring::Metric::~Metric |
( |
| ) |
|
|
default |
◆ Metric() [3/4]
NES::Monitoring::Metric::Metric |
( |
const Metric & |
x | ) |
|
|
inline |
copy ctor to properly handle the templated values
- Parameters
-
◆ Metric() [4/4]
NES::Monitoring::Metric::Metric |
( |
Metric && |
| ) |
|
|
defaultnoexcept |
◆ getMetricType()
MetricType NES::Monitoring::Metric::getMetricType |
( |
| ) |
const |
|
inline |
This method returns the type of the stored metric. Note that the according function needs to be defined, otherwise it will be categorized as UnknownType.
- Parameters
-
- Returns
- the type of the metric
◆ getValue()
template<typename T >
T& NES::Monitoring::Metric::getValue |
( |
| ) |
const |
|
inline |
This method returns the originally stored metric value, e.g. int, string, GaugeCollectors.
- Template Parameters
-
- Returns
- the value
References data.
◆ operator=() [1/2]
Metric& NES::Monitoring::Metric::operator= |
( |
const Metric & |
x | ) |
|
|
inline |
assign operator for metrics to avoid unnecessary copies
References Metric().
◆ operator=() [2/2]
◆ asJson
nlohmann::json asJson |
( |
const Metric & |
metric | ) |
|
|
friend |
This method returns the value of the metric as a JSON.
- Parameters
-
- Returns
- The metric represented as JSON.
◆ readFromBuffer
This method returns the type of the stored metric. Note that the according function needs to be defined, otherwise it will be categorized as UnknownType.
- Parameters
-
- Returns
- the type of the metric
◆ writeToBuffer
This method returns the type of the stored metric. Note that the according function needs to be defined, otherwise it will be categorized as UnknownType.
- Parameters
-
- Returns
- the type of the metric
The documentation for this class was generated from the following file:
- /nebulastream/nes-runtime/include/Monitoring/Metrics/Metric.hpp