pub struct PassTiming {
pub label: String,
pub start_ns: u64,
pub end_ns: u64,
pub duration_us: f64,
}Expand description
Profiled timing for a single GPU pass.
The start_ns / end_ns fields are the absolute timestamp values
converted to nanoseconds (multiplied by
wgpu::Queue::get_timestamp_period). They have no anchor and should
only be compared within the same profiler instance / submission.
duration_us is precomputed as (end_ns - start_ns) / 1000.0 for
convenience. Negative differences cannot occur because the underlying
subtraction uses saturating arithmetic on u64.
Fields§
§label: StringUser-supplied label for the pass.
start_ns: u64Start timestamp, converted to nanoseconds.
end_ns: u64End timestamp, converted to nanoseconds.
duration_us: f64Pass duration in microseconds: (end_ns − start_ns) / 1000.0.
Trait Implementations§
Source§impl Clone for PassTiming
impl Clone for PassTiming
Source§fn clone(&self) -> PassTiming
fn clone(&self) -> PassTiming
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PassTiming
impl Debug for PassTiming
Source§impl PartialEq for PassTiming
impl PartialEq for PassTiming
Source§fn eq(&self, other: &PassTiming) -> bool
fn eq(&self, other: &PassTiming) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PassTiming
Auto Trait Implementations§
impl Freeze for PassTiming
impl RefUnwindSafe for PassTiming
impl Send for PassTiming
impl Sync for PassTiming
impl Unpin for PassTiming
impl UnsafeUnpin for PassTiming
impl UnwindSafe for PassTiming
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
Mutably borrows from an owned value. Read more