IObservableInstrument#
Fully qualified name: omni::observability::IObservableInstrument
Defined in omni/observability/IMetrics.h
-
class IObservableInstrument : public carb::IObject#
Observable instrument that is sampled via callback.
Remark
Observable instruments are used for metrics that are sampled periodically rather than being updated directly by application code. Examples include CPU usage, memory consumption, or queue depth.
Public Functions
-
virtual ~IObservableInstrument() = default#
-
virtual size_t addRef() = 0#
Atomically add one to the reference count.
- Returns:
The current reference count after one was added, though this value may change before read if other threads are also modifying the reference count. The return value is guaranteed to be non-zero.
-
virtual size_t release() = 0#
Atomically subtracts one from the reference count.
If the result is zero, carb::deleteHandler() is called for
this.- Returns:
The current reference count after one was subtracted. If zero is returned, carb::deleteHandler() was called for
this.
Public Static Functions
- static inline constexpr carb::InterfaceDesc getInterfaceDesc(
Returns information about this interface.
Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.
- Returns:
The carb::InterfaceDesc struct with information about this interface.
- static inline constexpr carb::InterfaceDesc getLatestInterfaceDesc(
Returns information about the latest version of this interface.
Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.
- Returns:
The carb::InterfaceDesc struct with information about the latest version of this interface.
-
virtual ~IObservableInstrument() = default#