|
VLink 2.0.0
A high-performance communication middleware
|
RAII scope guard that brackets a CpuProfiler active interval.
更多...
#include <cpu_profiler_guard.h>
Public 成员函数 | |
| CpuProfilerGuard (class CpuProfiler *profiler) noexcept | |
Constructs the guard and calls profiler->begin(). | |
| ~CpuProfilerGuard () noexcept | |
Destructor – calls profiler->end() to close the active interval. | |
RAII scope guard that brackets a CpuProfiler active interval.
Calls profiler->begin() on construction and profiler->end() on destruction. Handles nullptr profiler gracefully (no-op).
|
explicitnoexcept |
Constructs the guard and calls profiler->begin().
| profiler | Pointer to the CpuProfiler to bracket. If nullptr, both construction and destruction are no-ops. |
|
noexcept |
Destructor – calls profiler->end() to close the active interval.