diff options
author | evgeniy-kozev <evgeniy-kozev@yandex-team.ru> | 2022-02-10 16:52:28 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:52:28 +0300 |
commit | a2cb79ca42d04c9ec2b240028472eaab1639738c (patch) | |
tree | ab7fbbf3253d4c0e2793218f09378908beb025fb | |
parent | f8dc1232dbc628e4d654e3cd5fe25c4473cae3b5 (diff) | |
download | ydb-a2cb79ca42d04c9ec2b240028472eaab1639738c.tar.gz |
Restoring authorship annotation for <evgeniy-kozev@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | ydb/core/tablet/tablet_metrics.cpp | 22 | ||||
-rw-r--r-- | ydb/core/tablet/tablet_metrics.h | 26 |
2 files changed, 24 insertions, 24 deletions
diff --git a/ydb/core/tablet/tablet_metrics.cpp b/ydb/core/tablet/tablet_metrics.cpp index fb0fe1c42f..182c7c566e 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 e8146631a8..b426284d33 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>; |