aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/metrics/metric_registry.cpp
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-21 11:31:57 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-21 11:31:57 +0300
commit444fb65b1a79c2c2ce6753cdfe18372203e1b44f (patch)
tree4314c153eff2e535c91c373cde41d486546514e3 /library/cpp/monlib/metrics/metric_registry.cpp
parent184eb704ed3f6064598640cc8cf23ab5af942a97 (diff)
downloadydb-444fb65b1a79c2c2ce6753cdfe18372203e1b44f.tar.gz
intermediate changes
ref:98c26ee2d3cd643aba98b8222f9f8a4c1773449a
Diffstat (limited to 'library/cpp/monlib/metrics/metric_registry.cpp')
-rw-r--r--library/cpp/monlib/metrics/metric_registry.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/library/cpp/monlib/metrics/metric_registry.cpp b/library/cpp/monlib/metrics/metric_registry.cpp
index 2c64a23ead..9a09a78d6b 100644
--- a/library/cpp/monlib/metrics/metric_registry.cpp
+++ b/library/cpp/monlib/metrics/metric_registry.cpp
@@ -124,6 +124,14 @@ namespace NMonitoring {
return Metric<THistogram, EMetricType::HIST>(std::move(labels), std::move(collector), false);
}
+ THistogram* TMetricRegistry::HistogramCounter(TLabels labels, std::function<IHistogramCollectorPtr()> supplier) {
+ return Metric<THistogram, EMetricType::HIST>(std::move(labels), std::move(supplier), false);
+ }
+
+ THistogram* TMetricRegistry::HistogramCounter(TLabels labels, nullptr_t) {
+ return HistogramCounter(std::move(labels), IHistogramCollectorPtr(nullptr));
+ }
+
THistogram* TMetricRegistry::HistogramRate(TLabels labels, IHistogramCollectorPtr collector) {
return Metric<THistogram, EMetricType::HIST_RATE>(std::move(labels), std::move(collector), true);
}
@@ -132,6 +140,14 @@ namespace NMonitoring {
return Metric<THistogram, EMetricType::HIST_RATE>(std::move(labels), std::move(collector), true);
}
+ THistogram* TMetricRegistry::HistogramRate(TLabels labels, std::function<IHistogramCollectorPtr()> supplier) {
+ return Metric<THistogram, EMetricType::HIST_RATE>(std::move(labels), std::move(supplier), true);
+ }
+
+ THistogram* TMetricRegistry::HistogramRate(TLabels labels, nullptr_t) {
+ return HistogramRate(std::move(labels), IHistogramCollectorPtr(nullptr));
+ }
+
void TMetricRegistry::Reset() {
TWriteGuard g{*Lock_};
for (auto& [label, metric] : Metrics_) {