actor-framework
Public Types | Public Member Functions | Static Public Attributes | List of all members
caf::telemetry::int_gauge Class Reference

A metric that represents a single integer value that can arbitrarily go up and down. More...

#include <int_gauge.hpp>

Public Types

using value_type = int64_t
 
using family_setting = unit_t
 

Public Member Functions

 int_gauge (int64_t value) noexcept
 
 int_gauge (span< const label >) noexcept
 
void inc () noexcept
 Increments the gauge by 1.
 
void inc (int64_t amount) noexcept
 Increments the gauge by amount.
 
void dec () noexcept
 Decrements the gauge by 1.
 
void dec (int64_t amount) noexcept
 Decrements the gauge by amount.
 
void value (int64_t x) noexcept
 Sets the gauge to x.
 
int64_t operator++ () noexcept
 Increments the gauge by 1. More...
 
int64_t operator++ (int) noexcept
 Increments the gauge by 1. More...
 
int64_t operator-- () noexcept
 Decrements the gauge by 1. More...
 
int64_t operator-- (int) noexcept
 Decrements the gauge by 1. More...
 
int64_t value () const noexcept
 Returns the current value of the gauge.
 

Static Public Attributes

static constexpr metric_type runtime_type = metric_type::int_gauge
 

Detailed Description

A metric that represents a single integer value that can arbitrarily go up and down.

Member Function Documentation

◆ operator++() [1/2]

int64_t caf::telemetry::int_gauge::operator++ ( )
inlinenoexcept

Increments the gauge by 1.

Returns
The new value of the gauge.

◆ operator++() [2/2]

int64_t caf::telemetry::int_gauge::operator++ ( int  )
inlinenoexcept

Increments the gauge by 1.

Returns
The old value of the gauge.

◆ operator--() [1/2]

int64_t caf::telemetry::int_gauge::operator-- ( )
inlinenoexcept

Decrements the gauge by 1.

Returns
The new value of the gauge.

◆ operator--() [2/2]

int64_t caf::telemetry::int_gauge::operator-- ( int  )
inlinenoexcept

Decrements the gauge by 1.

Returns
The old value of the gauge.

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