8#include <userver/utils/span.hpp>
9#include <userver/utils/statistics/fwd.hpp>
10#include <userver/utils/statistics/histogram_view.hpp>
12USERVER_NAMESPACE_BEGIN
14namespace utils::statistics {
20class HistogramAggregator
final {
28 HistogramAggregator(HistogramAggregator&&)
noexcept;
29 HistogramAggregator& operator=(HistogramAggregator&&)
noexcept;
30 ~HistogramAggregator();
38 void Add(HistogramView other);
41 void AccountAt(std::size_t bucket_index, std::uint64_t count = 1)
noexcept;
54 HistogramView GetView() &&
noexcept =
delete;
58 std::unique_ptr<impl::histogram::Bucket[]> buckets_;
62void DumpMetric(Writer& writer,
const HistogramAggregator& histogram);