|
iceberg-cpp
|
Factory for creating named Counter and Timer instances. More...
#include <metrics_context.h>
Public Member Functions | |
| virtual std::shared_ptr< Counter > | GetCounter (std::string_view name, CounterUnit unit)=0 |
| Get or create a named Counter with an explicit unit. | |
| std::shared_ptr< Counter > | GetCounter (std::string_view name) |
| Get or create a count-unit Counter by name. | |
| virtual std::shared_ptr< Timer > | GetTimer (std::string_view name, TimerUnit unit)=0 |
| Get or create a named Timer with an explicit unit. | |
| std::shared_ptr< Timer > | GetTimer (std::string_view name) |
| Get or create a nanosecond-precision Timer by name. | |
Static Public Member Functions | |
| static const std::shared_ptr< MetricsContext > & | Noop () |
| Return the no-op MetricsContext singleton. | |
| static std::unique_ptr< MetricsContext > | Default () |
| Create a new DefaultMetricsContext. | |
|
inline |
Get or create a count-unit Counter by name.
Convenience overload defaulting to CounterUnit::kCount.
|
pure virtual |
Get or create a named Counter with an explicit unit.
Implemented in iceberg::DefaultMetricsContext, and iceberg::DefaultMetricsContext.
|
inline |
Get or create a nanosecond-precision Timer by name.
Convenience overload defaulting to TimerUnit::kNanoseconds.
|
pure virtual |
Get or create a named Timer with an explicit unit.
Implemented in iceberg::DefaultMetricsContext, and iceberg::DefaultMetricsContext.
|
static |
Return the no-op MetricsContext singleton.
All metrics returned by the no-op context are noop; nothing is allocated.