12#ifndef RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
13#define RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
18#include <perfc/perfc.hpp>
58 std::string
const&
GetId() const noexcept {
70 std::string m_description;
97 std::string
const&
GetId() const noexcept {
104 return m_description;
109 std::string m_description;
237 perfc::
CounterTypes<perfc::CounterDouble, perfc::CounterU64, perfc::CounterI64>;
265 [[nodiscard]] virtual perfc::ScopedRegistration
Component metrics interface.
Definition: componentMetricsIf.hpp:184
typename CounterTypes::CounterVariant CounterVariant
std::variant of pointers to each supported type in CounterTypes.
Definition: componentMetricsIf.hpp:243
perfc::CounterTypes< perfc::CounterDouble, perfc::CounterU64, perfc::CounterI64 > CounterTypes
Defines standard performance counter types:
Definition: componentMetricsIf.hpp:237
virtual void StopMonitoring() noexcept=0
Stop monitoring.
virtual bool IsMonitoring() noexcept=0
Query whether monitoring is active.
virtual void StartMonitoring()=0
Start monitoring and publishing metrics.
virtual void UpdateParams(ComponentMetricsParams const ¶ms)=0
Updates parameters from params.
virtual ~ComponentMetricsIf() noexcept=default
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 t...
virtual void RemoveThread(pid_t thread)=0
Remove previously registered thread.
virtual void AddThread(pid_t thread, ThreadMetricInfo info)=0
Add a thread to be included in component metrics.
virtual bool RemoveCounter(CounterVariant counter)=0
Remove counter from register.
Defines auxiliary information associated with each counter registered with ComponentMetricsIf.
Definition: componentMetricsIf.hpp:46
std::string const & GetDescription() const noexcept
Definition: componentMetricsIf.hpp:64
std::string const & GetId() const noexcept
Definition: componentMetricsIf.hpp:58
Exception indicating that a metric such as counter or thread conflicts with already known metrics.
Definition: componentMetricsIf.hpp:30
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:237
RtctkException() noexcept
Definition: exceptions.cpp:113
Defines auxiliary information associated with each thread registered with ComponentMetricsIf.
Definition: componentMetricsIf.hpp:85
std::string const & GetDescription() const noexcept
Definition: componentMetricsIf.hpp:103
std::string const & GetId() const noexcept
Definition: componentMetricsIf.hpp:97
Provides macros and utilities for exception handling.
Definition: commandReplier.cpp:22
std::ostream & operator<<(std::ostream &os, AlertServiceIf::AlertStatus const &status)
Definition: alertServiceIf.cpp:60
constexpr bool operator!=(const MatrixBuffer< T, A > &lhs, const MatrixBuffer< T, A > &rhs) noexcept
Compares two MatrixBuffer objects and returns true if they do not have the same shape or the elements...
Definition: matrixBuffer.hpp:125
bool operator==(const DataPointPath &lhs, const char *rhs) noexcept
Definition: dataPointPath.hpp:350
Dynamic parameters for ComponentMetrics.
Definition: componentMetricsIf.hpp:118
std::optional< int > monitor_thread_nice
Configures nice value of telemetry monitoring thread.
Definition: componentMetricsIf.hpp:134
std::optional< std::chrono::milliseconds > thread_poll_interval
Configures interval used between reading and publishing current thread metrics.
Definition: componentMetricsIf.hpp:127
std::optional< std::chrono::milliseconds > counter_poll_interval
Configures interval used between reading and publishing current counter metrics.
Definition: componentMetricsIf.hpp:122