Go to the documentation of this file.
11 #ifndef RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
12 #define RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
15 #include <sys/types.h>
17 #include <perfc/perfc.hpp>
54 std::string
const&
GetId() const noexcept {
66 std::string m_description;
92 std::string
const&
GetId() const noexcept {
104 std::string m_description;
230 perfc::
CounterTypes<perfc::CounterDouble, perfc::CounterU64, perfc::CounterI64>;
258 [[nodiscard]] virtual perfc::ScopedRegistration
300 #endif // RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
virtual bool RemoveCounter(CounterVariant counter)=0
Remove counter from register.
Provides macros and utilities for exception handling.
Defines auxiliary information associated with each thread registered with ComponentMetricsIf.
Definition: componentMetricsIf.hpp:80
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 StopMonitoring() noexcept=0
Stop monitoring.
RtctkException() noexcept
Definition: exceptions.cpp:99
Definition: commandReplier.cpp:20
Dynamic parameters for ComponentMetrics.
Definition: componentMetricsIf.hpp:112
virtual void UpdateParams(ComponentMetricsParams const ¶ms)=0
Updates parameters from params.
typename CounterTypes::CounterVariant CounterVariant
std::variant of pointers to each supported type in CounterTypes.
Definition: componentMetricsIf.hpp:236
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:207
virtual void AddThread(pid_t thread, ThreadMetricInfo info)=0
Add a thread to be included in component metrics.
std::ostream & operator<<(std::ostream &os, AlertServiceIf::AlertStatus const &status)
Definition: alertServiceIf.cpp:59
Defines auxiliary information associated with each counter registered with ComponentMetricsIf.
Definition: componentMetricsIf.hpp:42
std::optional< std::chrono::milliseconds > counter_poll_interval
Configures interval used between reading and publishing current counter metrics.
Definition: componentMetricsIf.hpp:116
perfc::CounterTypes< perfc::CounterDouble, perfc::CounterU64, perfc::CounterI64 > CounterTypes
Defines standard performance counter types:
Definition: componentMetricsIf.hpp:230
Component metrics interface.
Definition: componentMetricsIf.hpp:177
virtual ~ComponentMetricsIf() noexcept=default
Exception indicating that a metric such as counter or thread conflicts with already known metrics.
Definition: componentMetricsIf.hpp:27
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:119
std::string const & GetId() const noexcept
Definition: componentMetricsIf.hpp:92
ThreadMetricInfo(std::string id, std::string description) noexcept
Construct instance.
Definition: componentMetricsIf.cpp:19
virtual void RemoveThread(pid_t thread)=0
Remove previously registered thread.
std::string const & GetDescription() const noexcept
Definition: componentMetricsIf.hpp:60
virtual void StartMonitoring()=0
Start monitoring and publishing metrics.
std::string const & GetId() const noexcept
Definition: componentMetricsIf.hpp:54
std::optional< int > monitor_thread_nice
Configures nice value of telemetry monitoring thread.
Definition: componentMetricsIf.hpp:128
std::string const & GetDescription() const noexcept
Definition: componentMetricsIf.hpp:98
bool operator==(const DataPointPath &lhs, const char *rhs) noexcept
Definition: dataPointPath.hpp:306
CounterMetricInfo(std::string id, std::string description) noexcept
Construct instance.
Definition: componentMetricsIf.cpp:15
std::optional< std::chrono::milliseconds > thread_poll_interval
Configures interval used between reading and publishing current thread metrics.
Definition: componentMetricsIf.hpp:121
virtual bool IsMonitoring() noexcept=0
Query whether monitoring is active.