Expand description
Process-global publication of real per-frame timings.
View::redraw already measures every frame it
presents: how long resolve (style plus layout) took, how long paint_scene
took, and how long the renderer took to submit and present. Those numbers used
to exist only inside a once-per-second [blitz-frame] log line, so anything
that wanted to report renderer performance had no way to read them. The MCP
diagnostics endpoint in tauri-runtime-blitz is the case that motivated this
module: with no accessor it timed its own snapshot collection and reported that
as frame cost, which measures the observer rather than the application.
Recording is selected once at the frame boundary by the process-wide deep profiling mode. A normal frame does not enter this module at all.
All windows in the process feed the same log. A multi-window app therefore sees its windows interleaved; the aggregate still describes real presented frames, it just does not attribute them per window.
Structs§
- Frame
Stats Snapshot - Aggregate view of the recently presented frames.
- Frame
Timings - Timings of one presented frame, in milliseconds.
- Timing
Stats - Mean, 95th percentile and worst case for one timing series, in milliseconds.
Functions§
- clear_
frame_ stats - Discard every retained frame sample.
- latest_
frame_ stats - Read the most recent frame timings.