artdaq_utilities  v1_05_00
TestMetric.hh
1 // TestMetric.hh: Static storage for testing Metric system
2 
3 #ifndef __ARTDAQ_UTILITIES_PLUGINS_TESTMETRIC_HH_
4 #define __ARTDAQ_UTILITIES_PLUGINS_TESTMETRIC_HH_
5 
6 #include <chrono>
7 #include <list>
8 #include <mutex>
9 #include <string>
10 
11 namespace artdaq {
13 {
14 public:
15  struct MetricPoint
16  {
17  std::chrono::steady_clock::time_point sent_time;
18  std::string metric;
19  std::string value;
20  std::string unit;
21  };
22 
23  static std::mutex received_metrics_mutex;
24  static std::list<MetricPoint> received_metrics;
25 };
26 } // namespace artdaq
27 
28 #endif // __ARTDAQ_UTILITIES_PLUGINS_TESTMETRIC_HH_