Skip to main content

Module profiler

Module profiler 

Source
Expand description

CPU/GPU performance profiler with hierarchical timing, counters, and flame graph capture.

Usage:

let mut prof = Profiler::new();
prof.begin("render");
  prof.begin("shadow_pass");
  prof.end("shadow_pass");
  prof.begin("gbuffer");
  prof.end("gbuffer");
prof.end("render");
let report = prof.flush();

Structs§

BudgetViolation
A single budget violation record.
Counter
Named counter accumulator (e.g. draw calls, triangle count).
FlameNode
A node in the flame graph (hierarchical call tree).
FrameBudget
Defines target frame time budgets for different system categories.
FrameRecord
All spans captured in one frame.
GpuFrameStats
A frame of GPU timing data.
GpuSpan
A GPU timing query result (from GPU timestamp queries, if available).
MarkerLog
Collection of profile markers for a session.
MemoryStats
Memory usage snapshot.
ProfileMarker
A named annotation at a point in time (for debugging events).
ProfileOverlay
Data ready for rendering a profiling overlay (e.g. a graph in the game).
Profiler
Main CPU profiler. Not thread-safe (use per-thread instances or a Mutex).
ScopedSpan
RAII guard for automatic span end. Use with a &mut Profiler.
Span
A single profiling span (named time range).
SpanStats
Rolling statistics for a named span across frames.
StutterDetector
Detects frame time spikes (stutters) by comparing against rolling average.
ThreadProfile
Aggregator for multi-thread profiling results.

Enums§

GpuPass
Which render pass a GPU span belongs to.

Functions§

export_csv
Export the frame history to CSV format.
merge_thread_profiles
Merge thread profiles into a combined FrameRecord.