1 #ifndef ARTDAQ_UTILITIES_PLUGINS_METRICDATA_HH
2 #define ARTDAQ_UTILITIES_PLUGINS_METRICDATA_HH
4 #include "fhiclcpp/fwd.h"
5 #include "messagefacility/MessageLogger/MessageLogger.h"
9 #include <condition_variable>
129 MetricData(std::string
const& name, std::string
const& value, std::string
const& unit,
int level,
MetricMode mode, std::string
const& metricPrefix,
bool useNameOverride)
151 MetricData(std::string
const& name,
int const& value, std::string
const& unit,
int level,
MetricMode mode, std::string
const& metricPrefix,
bool useNameOverride)
173 MetricData(std::string
const& name,
double const& value, std::string
const& unit,
int level,
MetricMode mode, std::string
const& metricPrefix,
bool useNameOverride)
195 MetricData(std::string
const& name,
float const& value, std::string
const& unit,
int level,
MetricMode mode, std::string
const& metricPrefix,
bool useNameOverride)
217 MetricData(std::string
const& name,
long unsigned int const& value, std::string
const& unit,
int level,
MetricMode mode, std::string
const& metricPrefix,
bool useNameOverride)
std::string StringValue
Value of the metric, if it is a MetricType::StringMetric
std::string MetricPrefix
Name prefix for the metric
int IntValue
Value of the metric, if it is a MetricType::IntMetric.
double DoubleValue
Value of the metric, if it is a MetricType::DoubleMetric.
Report the average of all values. Use for rates to report accurate results.
size_t DataPointCount
Number of data points accumulated in this MetricData
MetricMode
The Mode of the metric indicates how multiple metric values should be combined within a reporting int...
std::string Unit
Units of the metric
float FloatValue
Value of the metric, if it is a MetricType::FloatMetric.
Metric is a std::string (not in union)
std::string Name
Name of the metric
MetricData(std::string const &name, std::string const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride)
Construct a MetricData point using a string value
Reports the sum of all values, divided by the length of the time interval they were accumulated over...
bool UseNameOverride
Whether to override the default naming convention for this metric
MetricMode Mode
Accumulation mode of the metric
MetricType
This enumeration is used to identify the type of the metric instance (which value should be extraced ...
MetricData(std::string const &name, double const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride)
Construct a MetricData point using a double value
Metric is a long unsigned int.
MetricData(std::string const &name, float const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride)
Construct a MetricData point using a float value
Sends both the Accumulate mode and Rate mode metric. (Rate mode metric will append "/s" to metric uni...
MetricType Type
Type of the metric
Report the sum of all values. Use for counters to report accurate results.
MetricData()
Default constructor, constructs an MetricType::InvalidMetric
MetricData(std::string const &name, long unsigned int const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride)
Construct a MetricData point using a unsigned long int value
MetricData & operator=(const MetricData &r)=default
Default copy assignment operator
Small structure used to hold a metric data point before sending to the metric plugins ...
MetricData(std::string const &name, int const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride)
Construct a MetricData point using a int value
Report only the last value recorded. Useful for event counters, run numbers, etc. ...
long unsigned int UnsignedValue
Value of the metric, if it is a MetricType::UnsignedMetric.
int Level
Reporting level of the metric