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

A counter metric to represent a monotonically increasing value. More...

#include <metrics.hpp>

Inheritance diagram for kagome::metrics::Counter:
Collaboration diagram for kagome::metrics::Counter:

Public Member Functions

virtual ~Counter ()=default
 
virtual void inc ()=0
 Increment the counter by 1. More...
 
virtual void inc (double val)=0
 

Detailed Description

A counter metric to represent a monotonically increasing value.

This class represents the metric type counter: https://prometheus.io/docs/concepts/metric_types/#counter

Definition at line 27 of file metrics.hpp.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Increment the counter by 1.

Implemented in kagome::metrics::PrometheusCounter.

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

The counter will not change if the given amount is negative.

Implemented in kagome::metrics::PrometheusCounter.


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