载入中...
搜索中...
未找到
Profiler.cpp
浏览该文件的文档.
142 std::snprintf(buf, sizeof(buf), " GPU graphics-queue span (delayed): %.2f ms\n", gpuTimer_->gpuFrameMs());
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static void setEnabled(bool on)
Turns collection on/off globally (off = single-branch no-op).
Definition Profile.cpp:90
static const std::vector< ZoneSample > & lastFrame()
Per-module/per-zone samples of the last frame, sorted by self time.
Definition Profile.cpp:229
static void zoneBegin(const char *name, const char *module=nullptr)
Opens a scoped zone on the current thread.
Definition Profile.cpp:97
static std::vector< ZoneSample > hotspots(std::size_t limit, double minSelfMs)
Copy the hottest zones from the last completed frame.
Definition Profile.cpp:231
static double frameMark()
Finalizes the current frame: snapshots all thread buffers and aggregates them into lastFrame().
Definition Profile.cpp:133
static void zoneEnd()
Closes the innermost open zone on the current thread.
Definition Profile.cpp:114
Script-facing wrapper around the engine-wide profiler core (eve::prof, see common/Profile....
Definition Profiler.h:68
float gpuFrameMs() const
GPU execution time of the last presented frame (0 when unavailable).
Definition Profiler.cpp:109
void begin(const char *name)
Opens a user timing scope under the current frame.
Definition Profiler.cpp:79
float frameMs() const
Total CPU frame time of the last frame, in milliseconds.
Definition Profiler.cpp:107
const char * internScopeName(const std::string &name)
Intern a script-supplied zone name so it can be handed to the collector.
Definition Profiler.cpp:44
void setEnabled(bool on)
Enables/disables engine-wide collection. Disabled = cheap no-op.
Definition Profiler.cpp:34
ssq::Object hotspots(int limit, float minSelfMs)
Top zones of the last completed frame for quick hotspot triage.
Definition Profiler.cpp:167
eve::Result< ProfilerFrameSnapshot > captureFrame() const
Copy the latest completed frame for editor and diagnostics consumers.
Definition Profiler.cpp:114
std::string textReport() const
Human-readable hotspot report (per module / per zone).
Definition Profiler.cpp:137
void endFrame()
Finalizes the current frame and aggregates the collected zones.
Definition Profiler.cpp:70
virtual bool gpuTimingAvailable() const =0
True when the renderer captured a valid GPU frame this frame.
virtual float gpuFrameMs() const =0
Graphics-queue interval of the latest completed frame slot, in milliseconds. Delayed by frames in fli...
Definition ProfilerModel.h:13
EVENGINE_API_FOUNDATION void registerProfilerCapabilities()
Publish the read-only profiler capability (eve::IProfilerQuery).
Definition ProfilerCapabilities.cpp:138
@ NotFound
Owning CPU/GPU profiler snapshot safe to retain across later frames.
Definition Profiler.h:37