diff options
author | kbalakirev <kbalakirev@yandex-team.ru> | 2022-02-10 16:48:58 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:58 +0300 |
commit | 498a47e48d41e5ec64ee3aa622a76a80274f35bd (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/monlib/metrics/histogram_snapshot.cpp | |
parent | 1906a186042870fd03a12180acd1a6fcee045e42 (diff) | |
download | ydb-498a47e48d41e5ec64ee3aa622a76a80274f35bd.tar.gz |
Restoring authorship annotation for <kbalakirev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/histogram_snapshot.cpp')
-rw-r--r-- | library/cpp/monlib/metrics/histogram_snapshot.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/monlib/metrics/histogram_snapshot.cpp b/library/cpp/monlib/metrics/histogram_snapshot.cpp index 7df9762c1a..75b5811546 100644 --- a/library/cpp/monlib/metrics/histogram_snapshot.cpp +++ b/library/cpp/monlib/metrics/histogram_snapshot.cpp @@ -1,7 +1,7 @@ #include "histogram_snapshot.h" -#include <util/stream/output.h> - +#include <util/stream/output.h> + #include <iostream> @@ -23,16 +23,16 @@ namespace NMonitoring { } } // namespace NMonitoring - + namespace { - + template <typename TStream> auto& Output(TStream& os, const NMonitoring::IHistogramSnapshot& hist) { os << TStringBuf("{"); - + ui32 i = 0; ui32 count = hist.Count(); - + if (count > 0) { for (; i < count - 1; ++i) { os << hist.UpperBound(i) << TStringBuf(": ") << hist.Value(i); @@ -44,12 +44,12 @@ auto& Output(TStream& os, const NMonitoring::IHistogramSnapshot& hist) { } else { os << hist.UpperBound(i) << TStringBuf(": ") << hist.Value(i); } - } - + } + os << TStringBuf("}"); return os; -} +} } // namespace |