userver: utils::statistics::HistogramAggregator Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
utils::statistics::HistogramAggregator Class Referencefinal

Your opinion will help to improve our service

Leave a feedback >

#include <userver/utils/statistics/histogram_aggregator.hpp>

Detailed Description

Used to aggregate multiple utils::statistics::Histogram metrics.

Usage example:

Definition at line 20 of file histogram_aggregator.hpp.

Public Member Functions

 HistogramAggregator (utils::span< const double > upper_bounds)
 
 HistogramAggregator (HistogramAggregator &&) noexcept
 
HistogramAggregatoroperator= (HistogramAggregator &&) noexcept
 
void Add (HistogramView other)
 Add the other histogram to the current one.
 
void AccountAt (std::size_t bucket_index, std::uint64_t count=1) noexcept
 Non-atomically increment the bucket corresponding to the given index.
 
void AccountInf (std::uint64_t count=1) noexcept
 Non-atomically increment the "infinity" bucket.
 
void Reset () noexcept
 Reset all buckets to zero.
 
HistogramView GetView () const &noexcept
 Allows reading the histogram.
 

Member Function Documentation

◆ Add()

void utils::statistics::HistogramAggregator::Add ( HistogramView  other)

Add the other histogram to the current one.

Bucket borders in this and other must be either identical, or bucket borders in this must be a strict subset of bucket borders in other.

Writes to *this are non-atomic.


The documentation for this class was generated from the following file: