|
RTC Toolkit 5.1.0
|
Component metrics interface. More...
#include <rtctk/componentFramework/componentMetricsIf.hpp>
Public Member Functions | |
| virtual | ~ComponentMetricsIf () noexcept=default |
Configuration and control | |
| virtual void | StartMonitoring ()=0 |
| Start monitoring and publishing metrics. | |
| virtual void | StopMonitoring () noexcept=0 |
| Stop monitoring. | |
| virtual bool | IsMonitoring () noexcept=0 |
| Query whether monitoring is active. | |
| virtual void | UpdateParams ()=0 |
| Reloads parameters. | |
Performance Counter Metrics | |
| using | CounterTypes |
| Defines standard performance counter types: | |
| using | CounterVariant = typename CounterTypes::CounterVariant |
| std::variant of pointers to each supported type in CounterTypes. | |
| virtual perfc::ScopedRegistration | AddCounter (CounterVariant counter, CounterMetricInfo info)=0 |
| Add a counter to be included in component metrics, identified by its address, together with info to the register. | |
| virtual bool | RemoveCounter (CounterVariant counter)=0 |
| Remove counter from register. | |
Component metrics interface.
Supports registration and monitoring of component metrics.
Supported types of metrics:
Defines standard performance counter types:
| using rtctk::componentFramework::ComponentMetricsIf::CounterVariant = typename CounterTypes::CounterVariant |
std::variant of pointers to each supported type in CounterTypes.
I.e.: std::variant<perfc::CounterDouble*, ...>
|
virtualdefaultnoexcept |
|
pure virtual |
Add a counter to be included in component metrics, identified by its address, together with info to the register.
| counter | Pointer to any of the supported counter types. |
| info | A info object to be associated with counter. |
| MetricConflictException | if counter with same address has already been added before. |
| MetricConflictException | if another counter has been added with the same CounterMetricInfo::GetId(). |
| RtctkException | if other exceptions occurs (nested). |
Implemented in rtctk::componentFramework::ComponentMetrics, and rtctk::componentFramework::FakeComponentMetrics.
Query whether monitoring is active.
Implemented in rtctk::componentFramework::ComponentMetrics, and rtctk::componentFramework::FakeComponentMetrics.
|
pure virtual |
Remove counter from register.
Implemented in rtctk::componentFramework::ComponentMetrics, and rtctk::componentFramework::FakeComponentMetrics.
Start monitoring and publishing metrics.
It has no effect if monitoring is already in-progress.
Implemented in rtctk::componentFramework::ComponentMetrics, and rtctk::componentFramework::FakeComponentMetrics.
Stop monitoring.
Has no effect if no monitoring is active.
Implemented in rtctk::componentFramework::ComponentMetrics, and rtctk::componentFramework::FakeComponentMetrics.
Reloads parameters.
There is no guarantee that parameters are applied synchronously. For example if monitoring is already active an update of polling interval could be applied when scheduling next interval.
Implemented in rtctk::componentFramework::ComponentMetrics, and rtctk::componentFramework::FakeComponentMetrics.