iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
iceberg::Counter Class Referenceabstract

Abstract counter for tracking event totals. More...

#include <counter.h>

Inheritance diagram for iceberg::Counter:
iceberg::DefaultCounter

Public Member Functions

virtual void Increment ()
 Increment the counter by 1.
 
virtual void Increment (int64_t amount)=0
 Increment the counter by the given amount.
 
virtual int64_t value () const =0
 Return the current count.
 
virtual CounterUnit unit () const
 Return the unit for this counter.
 
virtual bool IsNoop () const
 Return true if this counter is a no-op.
 

Static Public Member Functions

static std::shared_ptr< CounterNoop ()
 Return a shared no-op counter singleton.
 

Detailed Description

Abstract counter for tracking event totals.

Member Function Documentation

◆ Increment() [1/2]

virtual void iceberg::Counter::Increment ( )
inlinevirtual

Increment the counter by 1.

Reimplemented in iceberg::DefaultCounter.

◆ Increment() [2/2]

virtual void iceberg::Counter::Increment ( int64_t  amount)
pure virtual

Increment the counter by the given amount.

Implemented in iceberg::DefaultCounter, and iceberg::DefaultCounter.

◆ unit()

virtual CounterUnit iceberg::Counter::unit ( ) const
inlinevirtual

Return the unit for this counter.

Reimplemented in iceberg::DefaultCounter.

◆ value()

virtual int64_t iceberg::Counter::value ( ) const
pure virtual

Return the current count.

Implemented in iceberg::DefaultCounter.


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