artdaq_utilities
v1_04_08
|
PeriodicReportMetric writes metric data to a file on disk. More...
Public Member Functions | |
PeriodicReportMetric (fhicl::ParameterSet const &config, std::string const &app_name) | |
PeriodicReportMetric Constructor. More... | |
virtual | ~PeriodicReportMetric () |
PeriodicReportMetric Destructor. Calls stopMetrics and then closes the file. | |
std::string | getLibName () const override |
Get the library name for the PeriodicReport metric. More... | |
void | sendMetric_ (const std::string &name, const std::string &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const int &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const double &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const float &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const unsigned long int &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | startMetrics_ () override |
Perform startup actions. | |
void | stopMetrics_ () override |
Perform shutdown actions. | |
![]() | |
MetricPlugin (fhicl::ParameterSet const &ps, std::string const &app_name) | |
void | addMetricData (MetricData data) |
void | sendMetrics (bool forceSend=false, std::chrono::steady_clock::time_point interval_end=std::chrono::steady_clock::now()) |
void | startMetrics () |
void | stopMetrics () |
void | setRunLevel (int level) |
int | getRunLevel () const |
Additional Inherited Members | |
![]() | |
using | Parameters = fhicl::WrappedTable< Config > |
![]() | |
virtual void | sendMetric_ (const std::string &name, const long unsigned int &value, const std::string &unit)=0 |
![]() | |
int | runLevel_ |
The threshold for sending metrics to the underlying storage. Metrics with level <= to runLevel_ will be sent. | |
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. | |
bool | inhibit_ |
Whether to inhibit all metric sending. | |
PeriodicReportMetric writes metric data to a file on disk.
Definition at line 24 of file report_metric.cc.
|
inlineexplicit |
PeriodicReportMetric Constructor.
config | ParameterSet used to configure PeriodicReportMetric |
app_name | Name of the application sending metrics |
* PeriodicReportMetric accepts no parameters. *
Definition at line 42 of file report_metric.cc.
|
inlineoverridevirtual |
Get the library name for the PeriodicReport metric.
Reimplemented from artdaq::MetricPlugin.
Definition at line 61 of file report_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 69 of file report_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 84 of file report_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 95 of file report_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 106 of file report_metric.cc.
|
inlineoverride |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Definition at line 117 of file report_metric.cc.