pub struct GpuFrameSpans { /* private fields */ }Expand description
One frame’s GPU span durations, in the caller’s own span order.
The span names are the caller’s business — this crate knows only how many
there are and which index each pass was charged to. frust-engine’s
diag::EngineSpan is the naming this repo’s engine tier uses.
Implementations§
Source§impl GpuFrameSpans
impl GpuFrameSpans
Sourcepub fn span(&self, index: usize) -> Duration
pub fn span(&self, index: usize) -> Duration
The duration charged to index, or Duration::ZERO past the end —
a span no pass was charged to is genuinely zero, so an out-of-range
index answering the same is the honest reading rather than a silent
failure mode.
Sourcepub fn total(&self) -> Duration
pub fn total(&self) -> Duration
The sum of every span — the frame’s total attributed GPU pass time.
Deliberately a sum rather than last-end-minus-first-begin: the gaps between a frame’s passes are queue and driver time this ring cannot attribute to any pass, and folding them into a “total” would report work the breakdown below it does not account for.
Trait Implementations§
Source§impl Clone for GpuFrameSpans
impl Clone for GpuFrameSpans
impl Copy for GpuFrameSpans
Source§impl Debug for GpuFrameSpans
impl Debug for GpuFrameSpans
Source§impl Default for GpuFrameSpans
impl Default for GpuFrameSpans
impl Eq for GpuFrameSpans
Source§impl PartialEq for GpuFrameSpans
impl PartialEq for GpuFrameSpans
impl StructuralPartialEq for GpuFrameSpans
Auto Trait Implementations§
impl Freeze for GpuFrameSpans
impl RefUnwindSafe for GpuFrameSpans
impl Send for GpuFrameSpans
impl Sync for GpuFrameSpans
impl Unpin for GpuFrameSpans
impl UnsafeUnpin for GpuFrameSpans
impl UnwindSafe for GpuFrameSpans
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.