userver: userver/utils/statistics/min_max_avg.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
min_max_avg.hpp File Reference

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

#include <atomic>
#include <chrono>
#include <cstddef>
#include <type_traits>
#include <userver/formats/json/inline.hpp>
#include <userver/formats/serialize/to.hpp>
#include <userver/utils/assert.hpp>
#include <userver/utils/statistics/writer.hpp>
+ Include dependency graph for min_max_avg.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  utils::statistics::MinMaxAvg< ValueType, AverageType >
 Class for concurrent safe calculation of minimum, maximum and average over series of values. More...
 
struct  utils::statistics::MinMaxAvg< ValueType, AverageType >::Current
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename ValueType , typename AverageType >
auto utils::statistics::Serialize (const MinMaxAvg< ValueType, AverageType > &mma, formats::serialize::To< formats::json::Value >)
 
template<typename ValueType , typename AverageType >
void utils::statistics::DumpMetric (Writer &writer, const MinMaxAvg< ValueType, AverageType > &value)
 

Detailed Description

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

Definition in file min_max_avg.hpp.

Function Documentation

◆ DumpMetric()

template<typename ValueType , typename AverageType >
void utils::statistics::DumpMetric ( Writer writer,
const MinMaxAvg< ValueType, AverageType > &  value 
)

Definition at line 145 of file min_max_avg.hpp.

◆ Serialize()

template<typename ValueType , typename AverageType >
auto utils::statistics::Serialize ( const MinMaxAvg< ValueType, AverageType > &  mma,
formats::serialize::To< formats::json::Value  
)

Definition at line 137 of file min_max_avg.hpp.