Mercurial > hg > orthanc
comparison Core/MetricsRegistry.h @ 4026:05a363186da6
ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Jun 2020 16:26:57 +0200 |
parents | f9863630ec7f |
children |
comparison
equal
deleted
inserted
replaced
4019:bf35c4628777 | 4026:05a363186da6 |
---|---|
111 | 111 |
112 // https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format | 112 // https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format |
113 void ExportPrometheusText(std::string& s); | 113 void ExportPrometheusText(std::string& s); |
114 | 114 |
115 | 115 |
116 class SharedMetrics : public boost::noncopyable | 116 class ORTHANC_PUBLIC SharedMetrics : public boost::noncopyable |
117 { | 117 { |
118 private: | 118 private: |
119 boost::mutex mutex_; | 119 boost::mutex mutex_; |
120 MetricsRegistry& registry_; | 120 MetricsRegistry& registry_; |
121 std::string name_; | 121 std::string name_; |
133 | 133 |
134 void Add(float delta); | 134 void Add(float delta); |
135 }; | 135 }; |
136 | 136 |
137 | 137 |
138 class ActiveCounter : public boost::noncopyable | 138 class ORTHANC_PUBLIC ActiveCounter : public boost::noncopyable |
139 { | 139 { |
140 private: | 140 private: |
141 SharedMetrics& metrics_; | 141 SharedMetrics& metrics_; |
142 | 142 |
143 public: | 143 public: |
152 metrics_.Add(-1); | 152 metrics_.Add(-1); |
153 } | 153 } |
154 }; | 154 }; |
155 | 155 |
156 | 156 |
157 class Timer : public boost::noncopyable | 157 class ORTHANC_PUBLIC Timer : public boost::noncopyable |
158 { | 158 { |
159 private: | 159 private: |
160 MetricsRegistry& registry_; | 160 MetricsRegistry& registry_; |
161 std::string name_; | 161 std::string name_; |
162 MetricsType type_; | 162 MetricsType type_; |