pub struct PipelineStats {
pub total_dispatches: u64,
pub total_workgroups: u64,
pub total_invocations: u64,
pub cache_hits: u64,
pub cache_misses: u64,
}Expand description
Fine-grained statistics for compute pipeline usage.
Fields§
§total_dispatches: u64Total number of dispatches.
total_workgroups: u64Total number of workgroups launched.
total_invocations: u64Total number of invocations (workgroups × workgroup_size).
cache_hits: u64Number of times a cached pipeline was re-used.
cache_misses: u64Number of times a pipeline had to be compiled (or was not in cache).
Implementations§
Source§impl PipelineStats
impl PipelineStats
Sourcepub fn record_dispatch(&mut self, num_workgroups: u64, wg_size: WorkgroupSize)
pub fn record_dispatch(&mut self, num_workgroups: u64, wg_size: WorkgroupSize)
Record a single dispatch event.
Sourcepub fn cache_hit_ratio(&self) -> f64
pub fn cache_hit_ratio(&self) -> f64
Cache hit ratio (0.0–1.0). Returns NaN when no lookups occurred.
Trait Implementations§
Source§impl Clone for PipelineStats
impl Clone for PipelineStats
Source§fn clone(&self) -> PipelineStats
fn clone(&self) -> PipelineStats
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 PipelineStats
impl Debug for PipelineStats
Source§impl Default for PipelineStats
impl Default for PipelineStats
Source§fn default() -> PipelineStats
fn default() -> PipelineStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PipelineStats
impl RefUnwindSafe for PipelineStats
impl Send for PipelineStats
impl Sync for PipelineStats
impl Unpin for PipelineStats
impl UnsafeUnpin for PipelineStats
impl UnwindSafe for PipelineStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more