pub struct AdaptiveStats {
pub resize_avoided: u64,
pub resize_reallocated: u64,
pub resize_growth: u64,
pub resize_shrink: u64,
}Expand description
Statistics for adaptive buffer allocation.
Fields§
§resize_avoided: u64Number of resize calls that avoided reallocation.
resize_reallocated: u64Number of resize calls that required reallocation.
resize_growth: u64Number of resize calls for growth.
resize_shrink: u64Number of resize calls for shrink.
Implementations§
Source§impl AdaptiveStats
impl AdaptiveStats
Sourcepub fn avoidance_ratio(&self) -> f64
pub fn avoidance_ratio(&self) -> f64
Calculate the reallocation avoidance ratio (higher is better).
Trait Implementations§
Source§impl Clone for AdaptiveStats
impl Clone for AdaptiveStats
Source§fn clone(&self) -> AdaptiveStats
fn clone(&self) -> AdaptiveStats
Returns a duplicate of the value. Read more
1.0.0 · 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 AdaptiveStats
impl Debug for AdaptiveStats
Source§impl Default for AdaptiveStats
impl Default for AdaptiveStats
Source§fn default() -> AdaptiveStats
fn default() -> AdaptiveStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AdaptiveStats
impl RefUnwindSafe for AdaptiveStats
impl Send for AdaptiveStats
impl Sync for AdaptiveStats
impl Unpin for AdaptiveStats
impl UnsafeUnpin for AdaptiveStats
impl UnwindSafe for AdaptiveStats
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