aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/metrics/log_histogram_collector.h
diff options
context:
space:
mode:
authorSergey Polovko <sergey@polovko.me>2022-02-10 16:47:03 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:03 +0300
commit2e714b5ebd40a1f4cc31c27f1ad6e49ca6d895f5 (patch)
treeb83306b6e37edeea782e9eed673d89286c4fef35 /library/cpp/monlib/metrics/log_histogram_collector.h
parent3e0b762a82514bac89c1dd6ea7211e381d8aa248 (diff)
downloadydb-2e714b5ebd40a1f4cc31c27f1ad6e49ca6d895f5.tar.gz
Restoring authorship annotation for Sergey Polovko <sergey@polovko.me>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/log_histogram_collector.h')
-rw-r--r--library/cpp/monlib/metrics/log_histogram_collector.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/monlib/metrics/log_histogram_collector.h b/library/cpp/monlib/metrics/log_histogram_collector.h
index 13b656af35..b81f84ebf3 100644
--- a/library/cpp/monlib/metrics/log_histogram_collector.h
+++ b/library/cpp/monlib/metrics/log_histogram_collector.h
@@ -25,9 +25,9 @@ namespace NMonitoring {
Merge(logHist);
}
- bool Collect(double value) {
+ bool Collect(double value) {
std::lock_guard guard(Mutex_);
- return CollectDouble(value);
+ return CollectDouble(value);
}
TLogHistogramSnapshotPtr Snapshot() const {
@@ -64,16 +64,16 @@ namespace NMonitoring {
++Buckets_[idx];
}
- bool CollectDouble(double value) {
- if (Y_UNLIKELY(std::isnan(value) || std::isinf(value))) {
- return false;
- }
+ bool CollectDouble(double value) {
+ if (Y_UNLIKELY(std::isnan(value) || std::isinf(value))) {
+ return false;
+ }
if (value <= 0.0) {
++CountZero_;
} else {
CollectPositiveDouble(value);
}
- return true;
+ return true;
}
void Merge(TLogHistogramSnapshot* logHist) {