|
iceberg-cpp
|
Abstract counter for tracking event totals. More...
#include <counter.h>
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< Counter > | Noop () |
| Return a shared no-op counter singleton. | |
Abstract counter for tracking event totals.
|
inlinevirtual |
Increment the counter by 1.
Reimplemented in iceberg::DefaultCounter.
|
pure virtual |
Increment the counter by the given amount.
Implemented in iceberg::DefaultCounter, and iceberg::DefaultCounter.
|
inlinevirtual |
Return the unit for this counter.
Reimplemented in iceberg::DefaultCounter.
|
pure virtual |
Return the current count.
Implemented in iceberg::DefaultCounter.