Monitoring  3.3.4
O2 Monitoring library
DerivedMetrics.h
Go to the documentation of this file.
1 // Copyright CERN and copyright holders of ALICE O2. This software is
2 // distributed under the terms of the GNU General Public License v3 (GPL
3 // Version 3), copied verbatim in the file "COPYING".
4 //
5 // See http://alice-o2.web.cern.ch/license for full licensing information.
6 //
7 // In applying this license CERN does not waive the privileges and immunities
8 // granted to it by virtue of its status as an Intergovernmental Organization
9 // or submit itself to any jurisdiction.
10 
15 
16 #ifndef ALICEO2_MONITORING_CORE_DERIVED_METRICS_H
17 #define ALICEO2_MONITORING_CORE_DERIVED_METRICS_H
18 
19 #include <unordered_map>
20 #include <memory>
21 #include <string>
22 #include <vector>
23 
24 #include "Monitoring/Metric.h"
25 
26 namespace o2
27 {
29 namespace monitoring
30 {
31 
33 enum class DerivedMetricMode { RATE,
34  INCREMENT,
35  NONE };
36 
42 {
43  public:
45  DerivedMetrics() = default;
46 
48  ~DerivedMetrics() = default;
49 
51  std::unordered_map<std::string, Metric> mStorage;
52 
55  void process(Metric& metric, DerivedMetricMode mode);
56 };
57 
58 } // namespace monitoring
59 } // namespace o2
60 
61 #endif // ALICEO2_MONITORING_CORE_DERIVED_METRICS_H
Definition: Backend.h:23
DerivedMetricMode
Available derived metric modes.
Definition: DerivedMetrics.h:33
Enables Calculation of derived metrics.
Definition: DerivedMetrics.h:41
Represents a metric including value, type of the value, name, timestamp and tags. ...
Definition: Metric.h:37
std::unordered_map< std::string, Metric > mStorage
Metrics store necessary for derived metrics.
Definition: DerivedMetrics.h:51