aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/metrics/histogram_snapshot.h
diff options
context:
space:
mode:
authorSergey Polovko <sergey@polovko.me>2022-02-10 16:47:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:02 +0300
commit3e0b762a82514bac89c1dd6ea7211e381d8aa248 (patch)
treec2d1b379ecaf05ca8f11ed0b5da9d1a950e6e554 /library/cpp/monlib/metrics/histogram_snapshot.h
parentab3783171cc30e262243a0227c86118f7080c896 (diff)
downloadydb-3e0b762a82514bac89c1dd6ea7211e381d8aa248.tar.gz
Restoring authorship annotation for Sergey Polovko <sergey@polovko.me>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/histogram_snapshot.h')
-rw-r--r--library/cpp/monlib/metrics/histogram_snapshot.h92
1 files changed, 46 insertions, 46 deletions
diff --git a/library/cpp/monlib/metrics/histogram_snapshot.h b/library/cpp/monlib/metrics/histogram_snapshot.h
index e8acf6ac2b..1f092a60d5 100644
--- a/library/cpp/monlib/metrics/histogram_snapshot.h
+++ b/library/cpp/monlib/metrics/histogram_snapshot.h
@@ -1,50 +1,50 @@
-#pragma once
-
+#pragma once
+
#include <util/generic/array_ref.h>
-#include <util/generic/ptr.h>
-#include <util/generic/vector.h>
+#include <util/generic/ptr.h>
+#include <util/generic/vector.h>
#include <util/generic/yexception.h>
-
+
#include <cmath>
-#include <limits>
-
-
-namespace NMonitoring {
-
- using TBucketBound = double;
- using TBucketValue = ui64;
-
- using TBucketBounds = TVector<TBucketBound>;
- using TBucketValues = TVector<TBucketValue>;
-
- constexpr ui32 HISTOGRAM_MAX_BUCKETS_COUNT = 51;
- constexpr TBucketBound HISTOGRAM_INF_BOUND = std::numeric_limits<TBucketBound>::max();
-
- ///////////////////////////////////////////////////////////////////////////
- // IHistogramSnapshot
- ///////////////////////////////////////////////////////////////////////////
- class IHistogramSnapshot: public TAtomicRefCount<IHistogramSnapshot> {
- public:
- virtual ~IHistogramSnapshot() = default;
-
- /**
- * @return buckets count.
- */
- virtual ui32 Count() const = 0;
-
- /**
- * @return upper bound for the bucket with particular index.
- */
- virtual TBucketBound UpperBound(ui32 index) const = 0;
-
- /**
- * @return value stored in the bucket with particular index.
- */
- virtual TBucketValue Value(ui32 index) const = 0;
- };
-
- using IHistogramSnapshotPtr = TIntrusivePtr<IHistogramSnapshot>;
-
+#include <limits>
+
+
+namespace NMonitoring {
+
+ using TBucketBound = double;
+ using TBucketValue = ui64;
+
+ using TBucketBounds = TVector<TBucketBound>;
+ using TBucketValues = TVector<TBucketValue>;
+
+ constexpr ui32 HISTOGRAM_MAX_BUCKETS_COUNT = 51;
+ constexpr TBucketBound HISTOGRAM_INF_BOUND = std::numeric_limits<TBucketBound>::max();
+
+ ///////////////////////////////////////////////////////////////////////////
+ // IHistogramSnapshot
+ ///////////////////////////////////////////////////////////////////////////
+ class IHistogramSnapshot: public TAtomicRefCount<IHistogramSnapshot> {
+ public:
+ virtual ~IHistogramSnapshot() = default;
+
+ /**
+ * @return buckets count.
+ */
+ virtual ui32 Count() const = 0;
+
+ /**
+ * @return upper bound for the bucket with particular index.
+ */
+ virtual TBucketBound UpperBound(ui32 index) const = 0;
+
+ /**
+ * @return value stored in the bucket with particular index.
+ */
+ virtual TBucketValue Value(ui32 index) const = 0;
+ };
+
+ using IHistogramSnapshotPtr = TIntrusivePtr<IHistogramSnapshot>;
+
///////////////////////////////////////////////////////////////////////////////
// TLinearHistogramSnapshot
///////////////////////////////////////////////////////////////////////////////
@@ -85,9 +85,9 @@ namespace NMonitoring {
TBucketValues Values_;
};
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////
// TExponentialHistogramSnapshot
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////
class TExponentialHistogramSnapshot: public IHistogramSnapshot {
public:
TExponentialHistogramSnapshot(