RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
componentMetricsIf.hpp
Go to the documentation of this file.
1
12#ifndef RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
13#define RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
14#include <iosfwd>
15#include <string>
16#include <sys/types.h>
17
18#include <perfc/perfc.hpp>
19
21
23
33
47public:
53 explicit CounterMetricInfo(std::string id, std::string description) noexcept;
54
58 const std::string& GetId() const noexcept {
59 return m_id;
60 }
64 const std::string& GetDescription() const noexcept {
65 return m_description;
66 }
67
68private:
69 std::string m_id;
70 std::string m_description;
71};
72
176
177} // namespace rtctk::componentFramework
178
179#endif // RTCTK_COMPONENTFRAMEWORK_COMPONENTMETRICSIF_HPP
Component metrics interface.
Definition componentMetricsIf.hpp:85
typename CounterTypes::CounterVariant CounterVariant
std::variant of pointers to each supported type in CounterTypes.
Definition componentMetricsIf.hpp:142
virtual void UpdateParams()=0
Reloads parameters.
virtual void StopMonitoring() noexcept=0
Stop monitoring.
virtual bool IsMonitoring() noexcept=0
Query whether monitoring is active.
perfc::CounterTypes< perfc::CounterDouble, perfc::CounterU64, perfc::CounterI64 > CounterTypes
Defines standard performance counter types:
Definition componentMetricsIf.hpp:135
virtual void StartMonitoring()=0
Start monitoring and publishing metrics.
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 bool RemoveCounter(CounterVariant counter)=0
Remove counter from register.
Defines auxiliary information associated with each counter registered with ComponentMetricsIf.
Definition componentMetricsIf.hpp:46
const std::string & GetDescription() const noexcept
Definition componentMetricsIf.hpp:64
const std::string & GetId() const noexcept
Definition componentMetricsIf.hpp:58
CounterMetricInfo(std::string id, std::string description) noexcept
Construct instance.
Definition componentMetricsIf.cpp:16
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:211
RtctkException() noexcept
Definition exceptions.cpp:113
Provides macros and utilities for exception handling.
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23