aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/metrics/metric_registry.h
diff options
context:
space:
mode:
authork-vukolov <k-vukolov@yandex-team.ru>2022-03-17 17:29:32 +0300
committerk-vukolov <k-vukolov@yandex-team.ru>2022-03-17 17:29:32 +0300
commit26d5a0024c9e3a3c14756599c5dd0ddda71c672b (patch)
tree39127a6a02de8e14843149118c3789f3e788dc22 /library/cpp/monlib/metrics/metric_registry.h
parentb94d94d54d13127426fd034d04c428edd9d2e40a (diff)
downloadydb-26d5a0024c9e3a3c14756599c5dd0ddda71c672b.tar.gz
Do not create buckets on each metric access
ref:23778046ec41d633f28df9e49ac776b31db22afe
Diffstat (limited to 'library/cpp/monlib/metrics/metric_registry.h')
-rw-r--r--library/cpp/monlib/metrics/metric_registry.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/cpp/monlib/metrics/metric_registry.h b/library/cpp/monlib/metrics/metric_registry.h
index 6d5a59f04d..06e61d9991 100644
--- a/library/cpp/monlib/metrics/metric_registry.h
+++ b/library/cpp/monlib/metrics/metric_registry.h
@@ -44,6 +44,7 @@ namespace NMonitoring {
public:
virtual const TLabels& CommonLabels() const noexcept = 0;
virtual void RemoveMetric(const ILabels& labels) noexcept = 0;
+ virtual bool HasMetric(const ILabels& labels) noexcept = 0;
};
@@ -101,6 +102,7 @@ namespace NMonitoring {
}
void RemoveMetric(const ILabels& labels) noexcept override;
+ bool HasMetric(const ILabels &labels) noexcept override;
private:
TGauge* Gauge(ILabelsPtr labels) override;