aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorEvgeniy Ivanov <i@eivanov.com>2022-04-15 15:51:58 +0300
committerEvgeniy Ivanov <i@eivanov.com>2022-04-15 15:51:58 +0300
commit798d0697ce54b4160e1e0a164cc88b4124a7c843 (patch)
tree9517a0b31fa0cb21040ab726f1a755e0baad57bd /library/cpp
parentbb1523598e756290b6e6888596c13320857d5dab (diff)
downloadydb-798d0697ce54b4160e1e0a164cc88b4124a7c843.tar.gz
KIKIMR-14646: aggregate tablet histograms; avoid overflow in hist buckets
ref:e2fc7b63e94a6f21fc05b425213586bd6c4d0115
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/monlib/dynamic_counters/counters.h4
-rw-r--r--library/cpp/monlib/metrics/atomics_array.h2
-rw-r--r--library/cpp/monlib/metrics/histogram_collector.h2
-rw-r--r--library/cpp/monlib/metrics/histogram_collector_explicit.cpp2
-rw-r--r--library/cpp/monlib/metrics/histogram_collector_exponential.cpp2
-rw-r--r--library/cpp/monlib/metrics/histogram_collector_linear.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/monlib/dynamic_counters/counters.h b/library/cpp/monlib/dynamic_counters/counters.h
index dc178cfbe0..3bf89c5098 100644
--- a/library/cpp/monlib/dynamic_counters/counters.h
+++ b/library/cpp/monlib/dynamic_counters/counters.h
@@ -141,11 +141,11 @@ namespace NMonitoring {
Collector_->Collect(value);
}
- void Collect(i64 value, ui32 count) {
+ void Collect(i64 value, ui64 count) {
Collector_->Collect(value, count);
}
- void Collect(double value, ui32 count) {
+ void Collect(double value, ui64 count) {
Collector_->Collect(value, count);
}
diff --git a/library/cpp/monlib/metrics/atomics_array.h b/library/cpp/monlib/metrics/atomics_array.h
index f19aebf291..4a26c8186a 100644
--- a/library/cpp/monlib/metrics/atomics_array.h
+++ b/library/cpp/monlib/metrics/atomics_array.h
@@ -26,7 +26,7 @@ namespace NMonitoring {
return Size_;
}
- void Add(size_t index, ui32 count) noexcept {
+ void Add(size_t index, ui64 count) noexcept {
Y_VERIFY_DEBUG(index < Size_);
Values_[index].fetch_add(count, std::memory_order_relaxed);
}
diff --git a/library/cpp/monlib/metrics/histogram_collector.h b/library/cpp/monlib/metrics/histogram_collector.h
index 9f6bbbdfb7..177d779634 100644
--- a/library/cpp/monlib/metrics/histogram_collector.h
+++ b/library/cpp/monlib/metrics/histogram_collector.h
@@ -14,7 +14,7 @@ namespace NMonitoring {
/**
* Store {@code count} times given {@code value} in this collector.
*/
- virtual void Collect(double value, ui32 count) = 0;
+ virtual void Collect(double value, ui64 count) = 0;
/**
* Store given {@code value} in this collector.
diff --git a/library/cpp/monlib/metrics/histogram_collector_explicit.cpp b/library/cpp/monlib/metrics/histogram_collector_explicit.cpp
index 377fc233ef..11368525cb 100644
--- a/library/cpp/monlib/metrics/histogram_collector_explicit.cpp
+++ b/library/cpp/monlib/metrics/histogram_collector_explicit.cpp
@@ -21,7 +21,7 @@ namespace NMonitoring {
Bounds_.push_back(Max<TBucketBound>());
}
- void Collect(double value, ui32 count) override {
+ void Collect(double value, ui64 count) override {
auto it = LowerBound(Bounds_.begin(), Bounds_.end(), value);
auto index = std::distance(Bounds_.begin(), it);
Values_.Add(index, count);
diff --git a/library/cpp/monlib/metrics/histogram_collector_exponential.cpp b/library/cpp/monlib/metrics/histogram_collector_exponential.cpp
index 2f8a50a5f9..c6bbfcfc69 100644
--- a/library/cpp/monlib/metrics/histogram_collector_exponential.cpp
+++ b/library/cpp/monlib/metrics/histogram_collector_exponential.cpp
@@ -22,7 +22,7 @@ namespace NMonitoring {
{
}
- void Collect(double value, ui32 count) override {
+ void Collect(double value, ui64 count) override {
ui32 index = Max<ui32>();
if (value <= MinValue_) {
index = 0;
diff --git a/library/cpp/monlib/metrics/histogram_collector_linear.cpp b/library/cpp/monlib/metrics/histogram_collector_linear.cpp
index f8ad86f3a4..8342485320 100644
--- a/library/cpp/monlib/metrics/histogram_collector_linear.cpp
+++ b/library/cpp/monlib/metrics/histogram_collector_linear.cpp
@@ -23,7 +23,7 @@ namespace NMonitoring {
{
}
- void Collect(double value, ui32 count) override {
+ void Collect(double value, ui64 count) override {
ui32 index = Max<ui32>();
if (value <= StartValue_) {
index = 0;