A metric that represents a single value that can only go up.
More...
#include <counter.hpp>
|
using | value_type = ValueType |
|
using | family_setting = unit_t |
|
|
| counter (value_type initial_value) noexcept |
|
| counter (span< const label >) noexcept |
|
void | inc () noexcept |
| Increments the counter by 1.
|
|
void | inc (value_type amount) noexcept |
| Increments the counter by amount . More...
|
|
template<class T = ValueType> |
std::enable_if_t< std::is_same_v< T, int64_t >, T > | operator++ () noexcept |
| Increments the counter by 1. More...
|
|
template<class T = ValueType> |
std::enable_if_t< std::is_same_v< T, int64_t >, T > | operator++ (int) noexcept |
| Increments the counter by 1. More...
|
|
value_type | value () const noexcept |
| Returns the current value of the counter.
|
|
|
static constexpr metric_type | runtime_type |
|
template<class ValueType>
class caf::telemetry::counter< ValueType >
A metric that represents a single value that can only go up.
◆ inc()
template<class ValueType>
Increments the counter by amount
.
- Precondition
amount >= 0
◆ operator++() [1/2]
template<class ValueType>
template<class T = ValueType>
Increments the counter by 1.
- Returns
- The new value of the counter.
◆ operator++() [2/2]
template<class ValueType>
template<class T = ValueType>
Increments the counter by 1.
- Returns
- The old value of the counter.
◆ runtime_type
template<class ValueType>
Initial value:= std::is_same_v<value_type, double>
? metric_type::dbl_counter
: metric_type::int_counter
The documentation for this class was generated from the following files: