载入中...
搜索中...
未找到
Profiler.cpp
浏览该文件的文档.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
static void setEnabled(bool on)
Turns collection on/off globally (off = single-branch no-op).
Definition Profile.cpp:92
static const std::vector< ZoneSample > & lastFrame()
Per-module/per-zone samples of the last frame, sorted by self time.
Definition Profile.cpp:224
static void zoneBegin(const char *name, const char *module=nullptr)
Opens a scoped zone on the current thread.
Definition Profile.cpp:96
static double frameMark()
Finalizes the current frame: snapshots all thread buffers and aggregates them into lastFrame().
Definition Profile.cpp:132
static void zoneEnd()
Closes the innermost open zone on the current thread.
Definition Profile.cpp:113
Script-facing wrapper around the engine-wide profiler core (eve::prof, see common/Profile....
Definition Profiler.h:67
float gpuFrameMs() const
GPU execution time of the last presented frame (0 when unavailable).
Definition Profiler.cpp:95
void begin(const char *name)
Opens a user timing scope under the current frame.
Definition Profiler.cpp:67
float frameMs() const
Total CPU frame time of the last frame, in milliseconds.
Definition Profiler.cpp:93
void setEnabled(bool on)
Enables/disables engine-wide collection. Disabled = cheap no-op.
Definition Profiler.cpp:32
eve::Result< ProfilerFrameSnapshot > captureFrame() const
Copy the latest completed frame for editor and diagnostics consumers.
Definition Profiler.cpp:100
std::string textReport() const
Human-readable hotspot report (per module / per zone).
Definition Profiler.cpp:123
void endFrame()
Finalizes the current frame and aggregates the collected zones.
Definition Profiler.cpp:59
virtual bool gpuTimingAvailable() const =0
True when the renderer captured a valid GPU frame this frame.
virtual float gpuFrameMs() const =0
GPU execution time of the last presented frame, in milliseconds.
Definition ProfilerModel.h:13
void registerProfilerCapabilities()
Publish the read-only profiler capability (eve::IProfilerQuery).
Definition ProfilerCapabilities.cpp:113
@ NotFound
Owning CPU/GPU profiler snapshot safe to retain across later frames.
Definition Profiler.h:36
bool gpuTimingAvailable
Definition Profiler.h:40
std::vector< ProfilerZoneSnapshot > zones
Definition Profiler.h:41