diff options
author | ivanzhukov <[email protected]> | 2022-02-10 16:49:40 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:40 +0300 |
commit | 0892d79ab411592ad25175c4bdadbcb09b466cf5 (patch) | |
tree | 98dfdd45463c9bd747101748a9ca25d2917390fd /library/cpp/monlib/metrics/log_histogram_snapshot.cpp | |
parent | 1b7466cb957659079ebebbb5d76e64e51f3306f0 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/log_histogram_snapshot.cpp')
-rw-r--r-- | library/cpp/monlib/metrics/log_histogram_snapshot.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/monlib/metrics/log_histogram_snapshot.cpp b/library/cpp/monlib/metrics/log_histogram_snapshot.cpp index 21cf2ca2bbc..ee2f99973c4 100644 --- a/library/cpp/monlib/metrics/log_histogram_snapshot.cpp +++ b/library/cpp/monlib/metrics/log_histogram_snapshot.cpp @@ -2,16 +2,16 @@ #include <util/stream/output.h> -#include <iostream> +#include <iostream> - -namespace { - -template <typename TStream> -auto& Output(TStream& o, const NMonitoring::TLogHistogramSnapshot& hist) { + +namespace { + +template <typename TStream> +auto& Output(TStream& o, const NMonitoring::TLogHistogramSnapshot& hist) { o << TStringBuf("{"); - - for (auto i = 0u; i < hist.Count(); ++i) { + + for (auto i = 0u; i < hist.Count(); ++i) { o << hist.UpperBound(i) << TStringBuf(": ") << hist.Bucket(i); o << TStringBuf(", "); } @@ -19,17 +19,17 @@ auto& Output(TStream& o, const NMonitoring::TLogHistogramSnapshot& hist) { o << TStringBuf("zeros: ") << hist.ZerosCount(); o << TStringBuf("}"); - - return o; -} - -} // namespace - -std::ostream& operator<<(std::ostream& os, const NMonitoring::TLogHistogramSnapshot& hist) { - return Output(os, hist); -} - -template <> -void Out<NMonitoring::TLogHistogramSnapshot>(IOutputStream& os, const NMonitoring::TLogHistogramSnapshot& hist) { - Output(os, hist); + + return o; } + +} // namespace + +std::ostream& operator<<(std::ostream& os, const NMonitoring::TLogHistogramSnapshot& hist) { + return Output(os, hist); +} + +template <> +void Out<NMonitoring::TLogHistogramSnapshot>(IOutputStream& os, const NMonitoring::TLogHistogramSnapshot& hist) { + Output(os, hist); +} |