|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Scoped performance timer. More...
#include <performance_monitor.h>

Public Member Functions | |
| scoped_timer (performance_profiler *profiler, const std::string &operation_name) | |
| ~scoped_timer () | |
| void | mark_failed () |
| Mark the operation as failed. | |
| void | complete () |
| Manually complete the timing. | |
| std::chrono::nanoseconds | elapsed () const |
| Get elapsed time without completing. | |
Private Attributes | |
| performance_profiler * | profiler_ |
| std::string | operation_name_ |
| std::chrono::high_resolution_clock::time_point | start_time_ |
| bool | success_ {true} |
| bool | completed_ {false} |
Scoped performance timer.
Definition at line 236 of file performance_monitor.h.
|
inline |
Definition at line 245 of file performance_monitor.h.
|
inline |
Definition at line 250 of file performance_monitor.h.
References complete(), completed_, and profiler_.

|
inline |
Manually complete the timing.
Definition at line 264 of file performance_monitor.h.
References completed_, operation_name_, profiler_, kcenon::monitoring::performance_profiler::record_sample(), start_time_, and success_.
Referenced by ~scoped_timer().


|
inline |
Get elapsed time without completing.
Definition at line 282 of file performance_monitor.h.
References start_time_.
|
inline |
Mark the operation as failed.
Definition at line 259 of file performance_monitor.h.
References success_.
|
private |
Definition at line 242 of file performance_monitor.h.
Referenced by complete(), and ~scoped_timer().
|
private |
Definition at line 239 of file performance_monitor.h.
Referenced by complete().
|
private |
Definition at line 238 of file performance_monitor.h.
Referenced by complete(), and ~scoped_timer().
|
private |
Definition at line 240 of file performance_monitor.h.
Referenced by complete(), and elapsed().
|
private |
Definition at line 241 of file performance_monitor.h.
Referenced by complete(), and mark_failed().