pub struct ComponentMemoryStats {
pub component_name: String,
pub current_allocations: usize,
pub current_usage_bytes: usize,
pub peak_usage_bytes: usize,
pub total_allocations: usize,
pub total_deallocations: usize,
pub allocation_rate_per_second: f64,
pub average_allocation_size: f64,
}Expand description
Memory usage statistics by component
Fields§
§component_name: String§current_allocations: usize§current_usage_bytes: usize§peak_usage_bytes: usize§total_allocations: usize§total_deallocations: usize§allocation_rate_per_second: f64§average_allocation_size: f64Implementations§
Source§impl ComponentMemoryStats
impl ComponentMemoryStats
Sourcepub fn current_usage_mb(&self) -> f64
pub fn current_usage_mb(&self) -> f64
Current usage in MB
Sourcepub fn peak_usage_mb(&self) -> f64
pub fn peak_usage_mb(&self) -> f64
Peak usage in MB
Trait Implementations§
Source§impl Clone for ComponentMemoryStats
impl Clone for ComponentMemoryStats
Source§fn clone(&self) -> ComponentMemoryStats
fn clone(&self) -> ComponentMemoryStats
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 moreAuto Trait Implementations§
impl Freeze for ComponentMemoryStats
impl RefUnwindSafe for ComponentMemoryStats
impl Send for ComponentMemoryStats
impl Sync for ComponentMemoryStats
impl Unpin for ComponentMemoryStats
impl UnwindSafe for ComponentMemoryStats
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