VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
vlink::CpuProfilerGuard Class Referencefinal

RAII scope guard that brackets a CpuProfiler active interval. More...

#include <cpu_profiler_guard.h>

Collaboration diagram for vlink::CpuProfilerGuard:

Public Member Functions

 CpuProfilerGuard (class CpuProfiler *profiler) noexcept
 Constructs the guard and calls profiler->begin().
 ~CpuProfilerGuard () noexcept
 Destructor – calls profiler->end() to close the active interval.

Detailed Description

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).

Constructor & Destructor Documentation

◆ CpuProfilerGuard()

vlink::CpuProfilerGuard::CpuProfilerGuard ( class CpuProfiler * profiler)
explicitnoexcept

Constructs the guard and calls profiler->begin().

Parameters
profilerPointer to the CpuProfiler to bracket. If nullptr, both construction and destruction are no-ops.
Here is the caller graph for this function:

◆ ~CpuProfilerGuard()

vlink::CpuProfilerGuard::~CpuProfilerGuard ( )
noexcept

Destructor – calls profiler->end() to close the active interval.

Here is the call graph for this function:

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