Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
PerformanceMonitoringTest Class Reference
Inheritance diagram for PerformanceMonitoringTest:
Inheritance graph
Collaboration diagram for PerformanceMonitoringTest:
Collaboration graph

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
void simulate_work (std::chrono::milliseconds duration)
 

Protected Attributes

performance_profiler profiler
 
performance_monitor monitor
 

Detailed Description

Definition at line 21 of file test_performance_monitoring.cpp.

Member Function Documentation

◆ SetUp()

void PerformanceMonitoringTest::SetUp ( )
inlineoverrideprotected

Definition at line 26 of file test_performance_monitoring.cpp.

26 {
28 monitor.set_enabled(true);
29 }
common::VoidResult set_enabled(bool enable) override
Enable or disable the collector.
void clear_all_samples()
Clear all samples.

References kcenon::monitoring::performance_profiler::clear_all_samples(), monitor, profiler, and kcenon::monitoring::performance_monitor::set_enabled().

Here is the call graph for this function:

◆ simulate_work()

void PerformanceMonitoringTest::simulate_work ( std::chrono::milliseconds duration)
inlineprotected

Definition at line 34 of file test_performance_monitoring.cpp.

34 {
35 std::this_thread::sleep_for(duration);
36 }

◆ TearDown()

void PerformanceMonitoringTest::TearDown ( )
inlineoverrideprotected

Definition at line 31 of file test_performance_monitoring.cpp.

31{ monitor.cleanup(); }
common::VoidResult cleanup() override
Cleanup collector resources.

References kcenon::monitoring::performance_monitor::cleanup(), and monitor.

Here is the call graph for this function:

Member Data Documentation

◆ monitor

performance_monitor PerformanceMonitoringTest::monitor
protected

Definition at line 24 of file test_performance_monitoring.cpp.

Referenced by SetUp(), and TearDown().

◆ profiler

performance_profiler PerformanceMonitoringTest::profiler
protected

Definition at line 23 of file test_performance_monitoring.cpp.

Referenced by SetUp().


The documentation for this class was generated from the following file: