Kagome
Polkadot Runtime Engine in C++17
kagome::metrics::Gauge Class Referenceabstract

A gauge metric to represent a value that can arbitrarily go up and down. More...

#include <metrics.hpp>

Inheritance diagram for kagome::metrics::Gauge:
Collaboration diagram for kagome::metrics::Gauge:

Public Member Functions

virtual ~Gauge ()=default
 
virtual void inc ()=0
 Increment the gauge by 1. More...
 
virtual void inc (double val)=0
 Increment the gauge by the given amount. More...
 
virtual void dec ()=0
 Decrement the gauge by 1. More...
 
virtual void dec (double val)=0
 Decrement the gauge by the given amount. More...
 
virtual void set (double val)=0
 Set the gauge to the given value. More...
 
template<typename T >
void set (T val)
 

Detailed Description

A gauge metric to represent a value that can arbitrarily go up and down.

The class represents the metric type gauge: https://prometheus.io/docs/concepts/metric_types/#gauge

Definition at line 49 of file metrics.hpp.

Constructor & Destructor Documentation

virtual kagome::metrics::Gauge::~Gauge ( )
virtualdefault

Member Function Documentation

virtual void kagome::metrics::Gauge::dec ( )
pure virtual

Decrement the gauge by 1.

Implemented in kagome::metrics::PrometheusGauge.

virtual void kagome::metrics::Gauge::dec ( double  val)
pure virtual

Decrement the gauge by the given amount.

Implemented in kagome::metrics::PrometheusGauge.

virtual void kagome::metrics::Gauge::inc ( )
pure virtual

Increment the gauge by 1.

Implemented in kagome::metrics::PrometheusGauge.

virtual void kagome::metrics::Gauge::inc ( double  val)
pure virtual

Increment the gauge by the given amount.

Implemented in kagome::metrics::PrometheusGauge.

virtual void kagome::metrics::Gauge::set ( double  val)
pure virtual

Set the gauge to the given value.

Implemented in kagome::metrics::PrometheusGauge.

template<typename T >
void kagome::metrics::Gauge::set ( val)
inline

Definition at line 79 of file metrics.hpp.


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