pub struct FrameTimings {
pub passes: Vec<PassTiming>,
pub frame: u64,
pub elapsed_nanos: Option<u64>,
}Expand description
A whole frame’s per-pass costs.
Fields§
§passes: Vec<PassTiming>One entry per pass, in execution order.
frame: u64Which frame these came from — a few frames behind the one being recorded; see the module docs.
elapsed_nanos: Option<u64>Elapsed interval from the earliest measured pass start to the latest
measured pass end. Includes gaps/contention, but not untimed work before
or after those boundaries. None means the timestamps were incomplete
or invalid; it must not be replaced with a sum of overlapping spans.
Implementations§
Source§impl FrameTimings
impl FrameTimings
Sourcepub fn total_nanos(&self) -> u64
pub fn total_nanos(&self) -> u64
The sum of every pass’s elapsed span.
This double-counts overlapping stages and includes scheduling gaps.
It is neither frame duration nor active GPU time. See elapsed_nanos
for the outer measured interval.
Trait Implementations§
Source§impl Clone for FrameTimings
impl Clone for FrameTimings
Source§fn clone(&self) -> FrameTimings
fn clone(&self) -> FrameTimings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FrameTimings
impl Debug for FrameTimings
Source§impl DebugModule for FrameTimings
The renderer’s contribution to the debug overlay.
impl DebugModule for FrameTimings
The renderer’s contribution to the debug overlay.
The UI plan’s first profiler surface (debug item 1 in docs/notes/tooling.md) was “stage 2/3 GPU pass
timestamps”; this is the adapter that puts them there. It lives here, not in
crcbl-ui, because the overlay is not allowed to know that a render pass
exists — the module is contributed by the system it reports on. crcbl-render
already depends on crcbl-ui (it owns the UI pass), so this is the direction
the dependency already runs.
Every row is a number PassTimers resolved from a timestamp query. No row
is derived from anything else, and there is no CPU number here: this struct
measures the GPU and says so.
Source§fn debug_section(&self, out: &mut DebugSection)
fn debug_section(&self, out: &mut DebugSection)
out.