C++ Actor Framework  0.18
Public Types | Public Member Functions | Static Public Attributes | List of all members
caf::telemetry::histogram< ValueType > Class Template Reference

Represent aggregatable distributions of events. More...

#include <histogram.hpp>

Collaboration diagram for caf::telemetry::histogram< ValueType >:
Collaboration graph

Public Types

using value_type = ValueType
 
using gauge_type = gauge< value_type >
 
using counter_type = counter< value_type >
 
using family_setting = std::vector< value_type >
 

Public Member Functions

 histogram (span< const label > labels, const settings *cfg, span< const value_type > upper_bounds)
 
 histogram (std::initializer_list< value_type > upper_bounds)
 
 histogram (const histogram &)=delete
 
histogramoperator= (const histogram &)=delete
 
void observe (value_type value)
 Increments the bucket where the observed value falls into and increments the sum of all observed values. More...
 
span< const bucket_type > buckets () const noexcept
 Returns the counter objects with the configured upper bounds.
 
value_type sum () const noexcept
 Returns the sum of all observed values.
 

Static Public Attributes

static constexpr metric_type runtime_type
 

Detailed Description

template<class ValueType>
class caf::telemetry::histogram< ValueType >

Represent aggregatable distributions of events.

Member Function Documentation

◆ observe()

template<class ValueType >
void caf::telemetry::histogram< ValueType >::observe ( value_type  value)

Increments the bucket where the observed value falls into and increments the sum of all observed values.

Member Data Documentation

◆ runtime_type

template<class ValueType >
constexpr metric_type caf::telemetry::histogram< ValueType >::runtime_type
static
Initial value:
= std::is_same<value_type, double>::value ? metric_type::dbl_histogram
: metric_type::int_histogram

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