#include <HasMetrics.h>
|
template<typename T > |
void | registerMetric (const std::string &name, T &value) |
|
template<typename T > |
void | registerMetric (const std::string &name, boost::atomic< T > &value) |
|
Helper class which allows its subclasses to use the registerMetric() method.
fesa::HasMetrics::HasMetrics |
( |
const std::string & |
componentName | ) |
|
The component name given to this constructor will be used when registering metrics.
- Parameters
-
componentName | the component name to use |
template<typename T >
void fesa::HasMetrics::registerMetric |
( |
const std::string & |
name, |
|
|
T & |
value |
|
) |
| |
|
protected |
Registers a metric on a primitive data type. It is recommended that the value be atomically updated; otherwise, consistency in metric values cannot be guaranteed. Implementations read the value atomically when updating metrics.
- Parameters
-
name | name of the metric |
value | reference to the value that will be monitored |
template<typename T >
void fesa::HasMetrics::registerMetric |
( |
const std::string & |
name, |
|
|
boost::atomic< T > & |
value |
|
) |
| |
|
protected |
Registers an atomic metric, that is, a metric which monitors a value of type boost::atomic<T>.
- Parameters
-
name | name of the metric |
value | reference to the value that will be monitored |
The documentation for this class was generated from the following files:
- HasMetrics.h
- HasMetrics.cpp