artdaq_utilities
v1_07_01
|
TestMetric writes metric data to a statically-allocated memory block. More...
Public Member Functions | |
TestMetricImpl (fhicl::ParameterSet const &config, std::string const &app_name, std::string const &metric_name) | |
TestMetric Constructor. More... | |
~TestMetricImpl () override | |
TestMetricImpl Destructor. Calls stopMetrics. | |
std::string | getLibName () const override |
Get the library name for the Test metric. More... | |
void | sendMetric_ (const std::string &name, const std::string &value, const std::string &unit, const std::chrono::system_clock::time_point &time) override |
Write metric data to memory. More... | |
void | sendMetric_ (const std::string &name, const int &value, const std::string &unit, const std::chrono::system_clock::time_point &time) override |
Write metric data to memory. More... | |
void | sendMetric_ (const std::string &name, const double &value, const std::string &unit, const std::chrono::system_clock::time_point &time) override |
Write metric data to memory. More... | |
void | sendMetric_ (const std::string &name, const float &value, const std::string &unit, const std::chrono::system_clock::time_point &time) override |
Write metric data to memory. More... | |
void | sendMetric_ (const std::string &name, const uint64_t &value, const std::string &unit, const std::chrono::system_clock::time_point &time) override |
Write metric data to memory. More... | |
void | startMetrics_ () override |
Perform startup actions. | |
void | stopMetrics_ () override |
Perform shutdown actions. | |
![]() | |
MetricPlugin (fhicl::ParameterSet const &ps, std::string const &app_name, std::string const &metric_name) | |
MetricPlugin Constructor. More... | |
virtual | ~MetricPlugin ()=default |
Default virtual Desctructor. | |
void | addMetricData (std::unique_ptr< MetricData > const &data) |
Send a metric value to the MetricPlugin. More... | |
void | sendMetrics (bool forceSend=false, std::chrono::steady_clock::time_point interval_end=std::chrono::steady_clock::now()) |
For each known metric, determine whether the reporting interval has elapsed, and if so, report a value to the underlying metric storage. More... | |
void | startMetrics () |
Perform startup actions. Simply calls the virtual startMetrics_ function. | |
void | stopMetrics () |
Perform shutdown actions. Zeroes out all accumulators, and sends zeros for each metric. Calls stopMetrics_() for any plugin-defined shutdown actions. | |
bool | IsLevelEnabled (int level) |
Determine if the given level is enabled for this MetricPlugin instance. More... | |
bool | metricsPending () |
Determine if metrics are waiting to be sent. More... | |
Additional Inherited Members | |
![]() | |
using | Parameters = fhicl::WrappedTable< Config > |
Used for ParameterSet validation (if desired) | |
![]() | |
fhicl::ParameterSet | pset |
The ParameterSet used to configure the MetricPlugin. | |
double | accumulationTime_ |
The amount of time to average metric values; except for accumulate=false metrics, will be the interval at which each metric is sent. | |
std::string | app_name_ |
Name of the application which is sending metrics to this plugin. | |
std::string | metric_name_ |
Name of this MetricPlugin instance. | |
bool | inhibit_ |
Flag to indicate that the MetricPlugin is being stopped, and any metric back-ends which do not have a persistent state (i.e. file) should not report further metrics. | |
std::bitset< 64 > | level_mask_ |
Bitset indicating for each possible metric level, whether this plugin will receive those metrics. | |
bool | sendZeros_ |
Whether zeros should be sent to this metric backend when metric instances are missing or at the end of the run. | |
TestMetric writes metric data to a statically-allocated memory block.
Definition at line 23 of file test_metric.cc.
|
inlineexplicit |
TestMetric Constructor.
config | ParameterSet used to configure TestMetric |
app_name | Name of the application sending metrics |
metric_name | Name of this MetricPlugin instance |
Definition at line 32 of file test_metric.cc.
|
inlineoverridevirtual |
Get the library name for the Test metric.
Reimplemented from artdaq::MetricPlugin.
Definition at line 50 of file test_metric.cc.
|
inlineoverridevirtual |
Write metric data to memory.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
time | Time the metric was sent |
Implements artdaq::MetricPlugin.
Definition at line 59 of file test_metric.cc.
|
inlineoverridevirtual |
Write metric data to memory.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
time | Time the metric was sent |
Implements artdaq::MetricPlugin.
Definition at line 77 of file test_metric.cc.
|
inlineoverridevirtual |
Write metric data to memory.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
time | Time the metric was sent |
Implements artdaq::MetricPlugin.
Definition at line 89 of file test_metric.cc.
|
inlineoverridevirtual |
Write metric data to memory.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
time | Time the metric was sent |
Implements artdaq::MetricPlugin.
Definition at line 101 of file test_metric.cc.
|
inlineoverridevirtual |
Write metric data to memory.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
time | Time the metric was sent |
Implements artdaq::MetricPlugin.
Definition at line 113 of file test_metric.cc.