Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::profiler::Histogram< NumBuckets > Class Template Reference

Statically bucketed latency distribution histogram. More...

#include <Metrics.hpp>

+ Collaboration diagram for corium::profiler::Histogram< NumBuckets >:

Public Member Functions

double bucketBound (size_t index) const noexcept
 
uint64_t bucketCount (size_t index) const noexcept
 
uint64_t count () const noexcept
 
std::string_view help () const noexcept
 
constexpr Histogram (std::string_view name, std::array< double, NumBuckets > bounds, std::string_view help="") noexcept
 
std::string_view name () const noexcept
 
void observe (double val) noexcept
 Record an observed value.
 

Detailed Description

template<size_t NumBuckets = 8>
class corium::profiler::Histogram< NumBuckets >

Statically bucketed latency distribution histogram.

Template Parameters
NumBucketsNumber of upper boundary buckets (default: 8).

Constructor & Destructor Documentation

◆ Histogram()

template<size_t NumBuckets = 8>
constexpr corium::profiler::Histogram< NumBuckets >::Histogram ( std::string_view  name,
std::array< double, NumBuckets >  bounds,
std::string_view  help = "" 
)
inlineconstexprnoexcept

Member Function Documentation

◆ bucketBound()

template<size_t NumBuckets = 8>
double corium::profiler::Histogram< NumBuckets >::bucketBound ( size_t  index) const
inlinenoexcept

◆ bucketCount()

template<size_t NumBuckets = 8>
uint64_t corium::profiler::Histogram< NumBuckets >::bucketCount ( size_t  index) const
inlinenoexcept

◆ count()

template<size_t NumBuckets = 8>
uint64_t corium::profiler::Histogram< NumBuckets >::count ( ) const
inlinenoexcept

◆ help()

template<size_t NumBuckets = 8>
std::string_view corium::profiler::Histogram< NumBuckets >::help ( ) const
inlinenoexcept

◆ name()

template<size_t NumBuckets = 8>
std::string_view corium::profiler::Histogram< NumBuckets >::name ( ) const
inlinenoexcept

◆ observe()

template<size_t NumBuckets = 8>
void corium::profiler::Histogram< NumBuckets >::observe ( double  val)
inlinenoexcept

Record an observed value.

Parameters
valObservation (e.g. latency in milliseconds or microseconds).

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