pub struct CollisionKernelStats {
pub bytes_transferred: u64,
pub broadphase_pairs_tested: u64,
pub broadphase_hits: u64,
pub narrowphase_queries: u64,
pub narrowphase_contacts: u64,
pub elapsed_secs: f64,
}Expand description
Statistics for a single collision kernel dispatch.
Fields§
§bytes_transferred: u64Total bytes transferred (read + write) during the dispatch.
broadphase_pairs_tested: u64Number of primitive pairs tested in the broadphase.
broadphase_hits: u64Number of pairs that passed the broadphase (potential contacts).
narrowphase_queries: u64Number of narrowphase GJK/SAT queries executed.
narrowphase_contacts: u64Number of narrowphase queries that resulted in a contact.
elapsed_secs: f64Elapsed wall-clock time for this dispatch in seconds.
Implementations§
Source§impl CollisionKernelStats
impl CollisionKernelStats
Sourcepub fn broadphase_hit_rate(&self) -> f64
pub fn broadphase_hit_rate(&self) -> f64
Broadphase hit-rate in [0, 1].
Returns 0.0 when no pairs were tested.
Sourcepub fn narrowphase_contact_rate(&self) -> f64
pub fn narrowphase_contact_rate(&self) -> f64
Narrowphase contact-rate in [0, 1].
Returns 0.0 when no narrowphase queries were executed.
Sourcepub fn bandwidth_gb_s(&self) -> f64
pub fn bandwidth_gb_s(&self) -> f64
Estimated memory bandwidth in GB/s.
Returns 0.0 when elapsed time is zero.
Sourcepub fn pair_throughput(&self) -> f64
pub fn pair_throughput(&self) -> f64
Pair throughput in pairs-per-second.
Returns 0.0 when elapsed time is zero.
Sourcepub fn accumulate(&mut self, other: &CollisionKernelStats)
pub fn accumulate(&mut self, other: &CollisionKernelStats)
Accumulate another stats record into this one.
Trait Implementations§
Source§impl Clone for CollisionKernelStats
impl Clone for CollisionKernelStats
Source§fn clone(&self) -> CollisionKernelStats
fn clone(&self) -> CollisionKernelStats
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 CollisionKernelStats
impl Debug for CollisionKernelStats
Source§impl Default for CollisionKernelStats
impl Default for CollisionKernelStats
Source§fn default() -> CollisionKernelStats
fn default() -> CollisionKernelStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CollisionKernelStats
impl RefUnwindSafe for CollisionKernelStats
impl Send for CollisionKernelStats
impl Sync for CollisionKernelStats
impl Unpin for CollisionKernelStats
impl UnsafeUnpin for CollisionKernelStats
impl UnwindSafe for CollisionKernelStats
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