pub struct BufferSizingStats { /* private fields */ }Expand description
Global buffer sizing statistics.
Implementations§
Source§impl BufferSizingStats
impl BufferSizingStats
Sourcepub fn record_allocation(&self, allocated: usize, used: usize)
pub fn record_allocation(&self, allocated: usize, used: usize)
Record an allocation.
Sourcepub fn record_reallocation(&self)
pub fn record_reallocation(&self)
Record a reallocation.
Sourcepub fn allocations(&self) -> u64
pub fn allocations(&self) -> u64
Get total allocations.
Sourcepub fn reallocations(&self) -> u64
pub fn reallocations(&self) -> u64
Get total reallocations.
Sourcepub fn bytes_wasted(&self) -> u64
pub fn bytes_wasted(&self) -> u64
Get bytes wasted.
Sourcepub fn perfect_fits(&self) -> u64
pub fn perfect_fits(&self) -> u64
Get perfect fit count.
Sourcepub fn perfect_fit_ratio(&self) -> f64
pub fn perfect_fit_ratio(&self) -> f64
Get perfect fit ratio (higher is better).
Sourcepub fn reallocation_ratio(&self) -> f64
pub fn reallocation_ratio(&self) -> f64
Get reallocation ratio (lower is better).
Trait Implementations§
Source§impl Debug for BufferSizingStats
impl Debug for BufferSizingStats
Source§impl Default for BufferSizingStats
impl Default for BufferSizingStats
Source§fn default() -> BufferSizingStats
fn default() -> BufferSizingStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for BufferSizingStats
impl RefUnwindSafe for BufferSizingStats
impl Send for BufferSizingStats
impl Sync for BufferSizingStats
impl Unpin for BufferSizingStats
impl UnwindSafe for BufferSizingStats
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> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging