Seastar
High performance C++ framework for concurrent servers
Public Member Functions | Public Attributes | List of all members
seastar::metrics::impl::metric_value Class Reference

Detailed Description

A helper class that used to return metrics value.

Do not use directly

See also
metrics_creation

#include <seastar/core/metrics.hh>

Public Member Functions

data_type type () const
 
double d () const
 
uint64_t ui () const
 
int64_t i () const
 
 metric_value (histogram &&h, data_type t=data_type::HISTOGRAM)
 
 metric_value (const histogram &h, data_type t=data_type::HISTOGRAM)
 
 metric_value (double d, data_type t)
 
metric_valueoperator+= (const metric_value &c)
 
metric_value operator+ (const metric_value &c)
 
const histogramget_histogram () const
 
bool is_empty () const noexcept
 return true if this metric was never used More...
 

Public Attributes

std::variant< double, histogramu
 
data_type _type
 

Member Function Documentation

◆ is_empty()

bool seastar::metrics::impl::metric_value::is_empty ( ) const
inlinenoexcept

return true if this metric was never used

Histograms, Summaries and counters are ever growing by nature, so it is possible to check if they have been used or not.


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