Runtime profiler read surface (provided by the profiler module). 更多...
#include <ProfilerQuery.h>
Public 成员函数 | |
| virtual | ~IProfilerQuery ()=default |
| I profiler query. | |
| virtual bool | enabled () const =0 |
| Whether the profiler is currently collecting zones. | |
| virtual std::string | frameJson () const =0 |
| Last completed frame as compact JSON. | |
| virtual std::string | textReport () const =0 |
| Human-readable per-zone report of the last completed frame. | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "IProfilerQuery" |
详细描述
Runtime profiler read surface (provided by the profiler module).
The profiler already aggregates a per-module / per-zone call tree every frame, but only Squirrel and the ImGui panel could read it; an agent had no way to ask "where did this frame go", so unattended performance work fell back to guessing from wall-clock timings. This capability exposes the same read-only view.
Implementations must only read: finalizing a frame is the frame loop's job, so a query never calls the aggregation step.
在文件 ProfilerQuery.h 第 20 行定义.
构造及析构函数说明
◆ ~IProfilerQuery()
|
virtualdefault |
I profiler query.
成员函数说明
◆ enabled()
|
pure virtual |
Whether the profiler is currently collecting zones.
◆ frameJson()
|
pure virtual |
Last completed frame as compact JSON.
Schema eve.profiler.frame version 1: {"schema":…,"version":1,"enabled":…,"hasFrame":…,"cpuFrameMs":…,"gpuMs":…, "gpuTimingAvailable":…,"zoneCount":…, "zones":[{"module":…,"name":…,"thread":…,"selfMs":…,"totalMs":…,"count":…,"depth":…}]}
cpuFrameMs is the sum of top-level zone self times: the profiler core aggregates zones and does not own the frame loop's wall-clock duration, so this is the CPU work the zones account for, not the presented frame time. hasFrame is false before the first completed frame, and zones is empty rather than absent.
◆ textReport()
|
pure virtual |
Human-readable per-zone report of the last completed frame.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 ProfilerQuery.h 第 22 行定义.
该类的文档由以下文件生成:
- src/engine/common/ProfilerQuery.h