载入中...
搜索中...
未找到
eve::prof::Profiler类 参考

Global zone collector + per-frame aggregator. 更多...

#include <Profile.h>

类

struct  Frame
 
struct  ThreadBuffer
 

静态 Public 成员函数

static void setEnabled (bool on)
 Turns collection on/off globally (off = single-branch no-op).
 
static bool enabled ()
 True when collection is active.
 
static void zoneBegin (const char *name, const char *module=nullptr)
 Opens a scoped zone on the current thread.
 
static void zoneEnd ()
 Closes the innermost open zone on the current thread.
 
static double frameMark ()
 Finalizes the current frame: snapshots all thread buffers and aggregates them into lastFrame().
 
static bool hasFrame ()
 True once at least one frame has been aggregated.
 
static const std::vector< ZoneSample > & lastFrame ()
 Per-module/per-zone samples of the last frame, sorted by self time.
 
static std::string textReport ()
 Human-readable report of the last frame.
 
static void reset ()
 Clears all collected state.
 
static uint32_t moduleId (const char *module)
 Interns a module name and returns its stable id.
 

详细描述

Global zone collector + per-frame aggregator.

All methods are cheap when disabled. Most methods are called from the main thread; the collector also snapshots off-main-thread buffers at frameMark().

在文件 Profile.h 第 65 行定义.

成员函数说明

◆ enabled()

bool eve::prof::Profiler::enabled ( )
static

True when collection is active.

在文件 Profile.cpp 第 94 行定义.

被这些函数引用 eve::profiler::Profiler::enabled().

◆ frameMark()

double eve::prof::Profiler::frameMark ( )
static

Finalizes the current frame: snapshots all thread buffers and aggregates them into lastFrame().

返回
Wall time spent aggregating (not the frame duration).

在文件 Profile.cpp 第 132 行定义.

引用了 a, eve::prof::Profiler::Frame::beginNs, eve::prof::ZoneSample::count, count, eve::prof::Profiler::Frame::endNs, f, eve::prof::ZoneSample::minDepth, n, eve::prof::ZoneSample::name, name, p, r, s, eve::prof::ZoneSample::selfMs, t, tb, eve::prof::ZoneSample::thread, eve::prof::ZoneSample::totalMs, x , 以及 y.

被这些函数引用 eve::profiler::Profiler::endFrame().

◆ hasFrame()

bool eve::prof::Profiler::hasFrame ( )
static

True once at least one frame has been aggregated.

在文件 Profile.cpp 第 222 行定义.

被这些函数引用 eve::profiler::Profiler::hasFrame().

◆ lastFrame()

const std::vector< ZoneSample > & eve::prof::Profiler::lastFrame ( )
static

Per-module/per-zone samples of the last frame, sorted by self time.

在文件 Profile.cpp 第 224 行定义.

引用了 eve::prof::Profiler::Frame::samples.

被这些函数引用 eve::profiler::Profiler::capture() , 以及 eve::profiler::Profiler::captureFrame().

◆ moduleId()

uint32_t eve::prof::Profiler::moduleId ( const char *  module)
static

Interns a module name and returns its stable id.

在文件 Profile.cpp 第 79 行定义.

引用了 id.

被这些函数引用 zoneBegin().

◆ reset()

void eve::prof::Profiler::reset ( )
static

Clears all collected state.

在文件 Profile.cpp 第 122 行定义.

引用了 tb.

被这些函数引用 eve::profiler::Profiler::reset().

◆ setEnabled()

void eve::prof::Profiler::setEnabled ( bool  on)
static

Turns collection on/off globally (off = single-branch no-op).

在文件 Profile.cpp 第 92 行定义.

被这些函数引用 eve::profiler::Profiler::setEnabled().

◆ textReport()

std::string eve::prof::Profiler::textReport ( )
static

Human-readable report of the last frame.

在文件 Profile.cpp 第 226 行定义.

引用了 eve::prof::Profiler::Frame::beginNs, eve::prof::Profiler::Frame::endNs, s , 以及 eve::prof::Profiler::Frame::samples.

被这些函数引用 eve::profiler::Profiler::textReport().

◆ zoneBegin()

void eve::prof::Profiler::zoneBegin ( const char *  name,
const char *  module = nullptr 
)
static

Opens a scoped zone on the current thread.

在文件 Profile.cpp 第 96 行定义.

引用了 idx, moduleId(), eve::prof::ZoneRecord::name, name, r , 以及 tb.

被这些函数引用 eve::profiler::Profiler::begin() , 以及 eve::profiler::Profiler::passBegin().

◆ zoneEnd()

void eve::prof::Profiler::zoneEnd ( )
static

Closes the innermost open zone on the current thread.

在文件 Profile.cpp 第 113 行定义.

引用了 idx , 以及 tb.

被这些函数引用 eve::profiler::Profiler::end() , 以及 eve::profiler::Profiler::passEnd().


该类的文档由以下文件生成: