Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::profiler::Counter Class Reference

Atomic 64-bit monotonically increasing counter. More...

#include <Metrics.hpp>

+ Collaboration diagram for corium::profiler::Counter:

Public Member Functions

constexpr Counter (std::string_view name, std::string_view help="") noexcept
 
uint64_t get () const noexcept
 Current counter value.
 
std::string_view help () const noexcept
 
void increment (uint64_t val=1) noexcept
 Increment counter value.
 
std::string_view name () const noexcept
 
void reset () noexcept
 Reset counter to zero.
 

Detailed Description

Atomic 64-bit monotonically increasing counter.

Constructor & Destructor Documentation

◆ Counter()

constexpr corium::profiler::Counter::Counter ( std::string_view  name,
std::string_view  help = "" 
)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ get()

uint64_t corium::profiler::Counter::get ( ) const
inlinenoexcept

Current counter value.

◆ help()

std::string_view corium::profiler::Counter::help ( ) const
inlinenoexcept

◆ increment()

void corium::profiler::Counter::increment ( uint64_t  val = 1)
inlinenoexcept

Increment counter value.

Parameters
valIncrement amount (default: 1).

◆ name()

std::string_view corium::profiler::Counter::name ( ) const
inlinenoexcept

◆ reset()

void corium::profiler::Counter::reset ( )
inlinenoexcept

Reset counter to zero.


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