userver: utils::statistics::MinMaxAvg< ValueType, AverageType > Class Template Reference
Loading...
Searching...
No Matches
utils::statistics::MinMaxAvg< ValueType, AverageType > Class Template Referencefinal

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

Detailed Description

template<typename ValueType, typename AverageType = ValueType>
class utils::statistics::MinMaxAvg< ValueType, AverageType >

Class for concurrent safe calculation of minimum, maximum and average over series of values.

Definition at line 23 of file min_max_avg.hpp.

Classes

struct  Current
 

Public Member Functions

 MinMaxAvg (const MinMaxAvg &other) noexcept
 
MinMaxAvgoperator= (const MinMaxAvg &rhs) noexcept
 
Current GetCurrent () const
 
void Account (ValueType value)
 
template<class Duration = std::chrono::seconds>
void Add (const MinMaxAvg &other, Duration this_epoch_duration=Duration(), Duration before_this_epoch_duration=Duration())
 
void Reset ()
 
bool IsEmpty () const noexcept
 

Constructor & Destructor Documentation

◆ MinMaxAvg() [1/2]

template<typename ValueType , typename AverageType = ValueType>
constexpr utils::statistics::MinMaxAvg< ValueType, AverageType >::MinMaxAvg ( )
inlineconstexprnoexcept

Definition at line 45 of file min_max_avg.hpp.

◆ MinMaxAvg() [2/2]

template<typename ValueType , typename AverageType = ValueType>
utils::statistics::MinMaxAvg< ValueType, AverageType >::MinMaxAvg ( const MinMaxAvg< ValueType, AverageType > & other)
inlinenoexcept

Definition at line 48 of file min_max_avg.hpp.

Member Function Documentation

◆ Account()

template<typename ValueType , typename AverageType = ValueType>
void utils::statistics::MinMaxAvg< ValueType, AverageType >::Account ( ValueType value)
inline

Definition at line 74 of file min_max_avg.hpp.

◆ Add()

template<typename ValueType , typename AverageType = ValueType>
template<class Duration = std::chrono::seconds>
void utils::statistics::MinMaxAvg< ValueType, AverageType >::Add ( const MinMaxAvg< ValueType, AverageType > & other,
Duration this_epoch_duration = Duration(),
Duration before_this_epoch_duration = Duration() )
inline

Definition at line 92 of file min_max_avg.hpp.

◆ GetCurrent()

template<typename ValueType , typename AverageType = ValueType>
Current utils::statistics::MinMaxAvg< ValueType, AverageType >::GetCurrent ( ) const
inline

Definition at line 61 of file min_max_avg.hpp.

◆ IsEmpty()

template<typename ValueType , typename AverageType = ValueType>
bool utils::statistics::MinMaxAvg< ValueType, AverageType >::IsEmpty ( ) const
inlinenoexcept

Definition at line 126 of file min_max_avg.hpp.

◆ operator=()

template<typename ValueType , typename AverageType = ValueType>
MinMaxAvg & utils::statistics::MinMaxAvg< ValueType, AverageType >::operator= ( const MinMaxAvg< ValueType, AverageType > & rhs)
inlinenoexcept

Definition at line 50 of file min_max_avg.hpp.

◆ Reset()

template<typename ValueType , typename AverageType = ValueType>
void utils::statistics::MinMaxAvg< ValueType, AverageType >::Reset ( )
inline

Definition at line 119 of file min_max_avg.hpp.


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