tenzr::profiler::ScopedTrace¶
RAII helper that records a duration for its enclosing scope.
#include <trace.h>
Public Functions¶
| Name | |
|---|---|
| ScopedTrace(std::string name, std::string cat ="op") | |
| void | AddArg(std::string key, std::string value) |
| ~ScopedTrace() | |
| int64_t | CurrentTimeUs() |
| uint64_t | GetTid() |
Public Functions Documentation¶
function ScopedTrace¶
function AddArg¶
Parameters:
- key Argument name.
- value Argument value.
Attach an argument to the recorded event.
function ~ScopedTrace¶
function CurrentTimeUs¶
Return:
- Current wall-clock time in microseconds.
- Microseconds since the clock epoch.
Current wall-clock time in microseconds.
function GetTid¶
Return:
- Identifier of the calling thread.
- Stable per-thread identifier.
Hash of the calling thread's id, used as the trace thread id.