diff options
author | msherbakov <msherbakov@yandex-team.ru> | 2022-02-10 16:49:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:17 +0300 |
commit | a0ffafe83b7d6229709a32fa942c71d672ac989c (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/monlib/encode/text/text_encoder.cpp | |
parent | c224a621661ddd69699f9476922eb316607ef57e (diff) | |
download | ydb-a0ffafe83b7d6229709a32fa942c71d672ac989c.tar.gz |
Restoring authorship annotation for <msherbakov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/text/text_encoder.cpp')
-rw-r--r-- | library/cpp/monlib/encode/text/text_encoder.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/monlib/encode/text/text_encoder.cpp b/library/cpp/monlib/encode/text/text_encoder.cpp index 8917152f56..10336261f0 100644 --- a/library/cpp/monlib/encode/text/text_encoder.cpp +++ b/library/cpp/monlib/encode/text/text_encoder.cpp @@ -99,9 +99,9 @@ namespace NMonitoring { TimeSeries_.Add(time, snapshot.Get()); } - void OnLogHistogram(TInstant ts, TLogHistogramSnapshotPtr snapshot) override { + void OnLogHistogram(TInstant ts, TLogHistogramSnapshotPtr snapshot) override { State_.Expect(TEncoderState::EState::METRIC); - TimeSeries_.Add(ts, snapshot.Get()); + TimeSeries_.Add(ts, snapshot.Get()); } void Close() override { @@ -135,7 +135,7 @@ namespace NMonitoring { (*Out_) << *value.AsSummaryDouble(); break; case EMetricValueType::LOGHISTOGRAM: - (*Out_) << *value.AsLogHistogram(); + (*Out_) << *value.AsLogHistogram(); break; case EMetricValueType::UNKNOWN: ythrow yexception() << "unknown metric value type"; @@ -143,21 +143,21 @@ namespace NMonitoring { } void WriteLabels() { - auto& out = *Out_; - const auto size = Labels_.Size(); - size_t i = 0; - - out << '{'; - for (auto&& l : Labels_) { + auto& out = *Out_; + const auto size = Labels_.Size(); + size_t i = 0; + + out << '{'; + for (auto&& l : Labels_) { out << l.Name() << TStringBuf("='") << l.Value() << '\''; - - ++i; - if (i < size) { + + ++i; + if (i < size) { out << TStringBuf(", "); } - }; - - out << '}'; + }; + + out << '}'; } void WriteMetric() { |