aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevgeniy-kozev <evgeniy-kozev@yandex-team.ru>2022-02-10 16:52:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:52:27 +0300
commitf8dc1232dbc628e4d654e3cd5fe25c4473cae3b5 (patch)
tree6b0b02faf07676ffeadce53c5eea085126a01a0b
parent175cd301442afbed0644b8908e65247547bd9071 (diff)
downloadydb-f8dc1232dbc628e4d654e3cd5fe25c4473cae3b5.tar.gz
Restoring authorship annotation for <evgeniy-kozev@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--ydb/core/tablet/tablet_metrics.cpp22
-rw-r--r--ydb/core/tablet/tablet_metrics.h26
2 files changed, 24 insertions, 24 deletions
diff --git a/ydb/core/tablet/tablet_metrics.cpp b/ydb/core/tablet/tablet_metrics.cpp
index 182c7c566e..fb0fe1c42f 100644
--- a/ydb/core/tablet/tablet_metrics.cpp
+++ b/ydb/core/tablet/tablet_metrics.cpp
@@ -4,17 +4,17 @@
namespace NKikimr {
namespace NMetrics {
-void TDecayingAverageWithSum::Increment(std::make_signed_t<ui64> value, TInstant now)
-{
- RawValue += value;
- return TDecayingAverageValue::Increment(value, now);
-}
-
-ui64 TDecayingAverageWithSum::GetRawValue() const
-{
- return RawValue;
-}
-
+void TDecayingAverageWithSum::Increment(std::make_signed_t<ui64> value, TInstant now)
+{
+ RawValue += value;
+ return TDecayingAverageValue::Increment(value, now);
+}
+
+ui64 TDecayingAverageWithSum::GetRawValue() const
+{
+ return RawValue;
+}
+
void TResourceMetricsValues::Fill(NKikimrTabletBase::TMetrics& metrics) const {
if (CPU.IsValueReady()) {
metrics.SetCPU(CPU.GetValue());
diff --git a/ydb/core/tablet/tablet_metrics.h b/ydb/core/tablet/tablet_metrics.h
index b426284d33..e8146631a8 100644
--- a/ydb/core/tablet/tablet_metrics.h
+++ b/ydb/core/tablet/tablet_metrics.h
@@ -15,23 +15,23 @@ enum EResource { // DO NOT REORDER, DO NOT REMOVE ITEMS
Counter, // ALWAYS 1
};
-class TDecayingAverageWithSum
- : public TDecayingAverageValue<ui64, DurationPerMinute, DurationPerSecond>
-{
-public:
- void Increment(std::make_signed_t<ui64> value, TInstant now = TInstant::Now());
- ui64 GetRawValue() const;
-
-private:
- ui64 RawValue = 0;
-};
-
+class TDecayingAverageWithSum
+ : public TDecayingAverageValue<ui64, DurationPerMinute, DurationPerSecond>
+{
+public:
+ void Increment(std::make_signed_t<ui64> value, TInstant now = TInstant::Now());
+ ui64 GetRawValue() const;
+
+private:
+ ui64 RawValue = 0;
+};
+
using TChannel = ui8;
using TGroupId = ui32;
-using TGroupThroughputValue = TDecayingAverageWithSum;
+using TGroupThroughputValue = TDecayingAverageWithSum;
using TTabletThroughputValue = std::unordered_map<std::pair<TChannel, TGroupId>, TGroupThroughputValue>;
using TTabletThroughputRawValue = std::unordered_map<std::pair<TChannel, TGroupId>, ui64>; // TStackYHash ?
-using TGroupIopsValue = TDecayingAverageWithSum;
+using TGroupIopsValue = TDecayingAverageWithSum;
using TTabletIopsValue = std::unordered_map<std::pair<TChannel, TGroupId>, TGroupIopsValue>;
using TTabletIopsRawValue = std::unordered_map<std::pair<TChannel, TGroupId>, ui64>;