diff options
author | Vitalii Gridnev <gridnevvvit@gmail.com> | 2022-02-10 16:47:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:25 +0300 |
commit | dc5feacd15e76abe98d23fe0d4ea3c02cb8de60f (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/monlib/metrics/metric_registry.cpp | |
parent | 30ed3937ab02d1b3c4dec4d93fb86c683217d9be (diff) | |
download | ydb-dc5feacd15e76abe98d23fe0d4ea3c02cb8de60f.tar.gz |
Restoring authorship annotation for Vitalii Gridnev <gridnevvvit@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/metric_registry.cpp')
-rw-r--r-- | library/cpp/monlib/metrics/metric_registry.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/monlib/metrics/metric_registry.cpp b/library/cpp/monlib/metrics/metric_registry.cpp index 58b5c024c3..b083163a7b 100644 --- a/library/cpp/monlib/metrics/metric_registry.cpp +++ b/library/cpp/monlib/metrics/metric_registry.cpp @@ -160,7 +160,7 @@ namespace NMonitoring { template <typename TMetric, EMetricType type, typename TLabelsType, typename... Args> TMetric* TMetricRegistry::Metric(TLabelsType&& labels, Args&&... args) { { - TReadGuard g{Lock_}; + TReadGuard g{Lock_}; auto it = Metrics_.find(labels); if (it != Metrics_.end()) { @@ -174,7 +174,7 @@ namespace NMonitoring { { IMetricPtr metric = MakeHolder<TMetric>(std::forward<Args>(args)...); - TWriteGuard g{Lock_}; + TWriteGuard g{Lock_}; // decltype(Metrics_)::iterator breaks build on windows THashMap<ILabelsPtr, IMetricPtr>::iterator it; if constexpr (!std::is_convertible_v<TLabelsType, ILabelsPtr>) { @@ -188,7 +188,7 @@ namespace NMonitoring { } void TMetricRegistry::RemoveMetric(const ILabels& labels) noexcept { - TWriteGuard g{Lock_}; + TWriteGuard g{Lock_}; Metrics_.erase(labels); } @@ -216,7 +216,7 @@ namespace NMonitoring { } void TMetricRegistry::Append(TInstant time, IMetricConsumer* consumer) const { - TReadGuard g{Lock_}; + TReadGuard g{Lock_}; for (const auto& it: Metrics_) { ILabels* labels = it.first.Get(); |