#include "log_histogram_snapshot.h" #include #include namespace { template auto& Output(TStream& o, const NMonitoring::TLogHistogramSnapshot& hist) { o << TStringBuf("{"); for (auto i = 0u; i < hist.Count(); ++i) { o << hist.UpperBound(i) << TStringBuf(": ") << hist.Bucket(i); o << TStringBuf(", "); } 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(IOutputStream& os, const NMonitoring::TLogHistogramSnapshot& hist) { Output(os, hist); }