pub struct AsyncMemorySnapshot {
pub active_task_count: usize,
pub total_allocated_bytes: u64,
pub allocation_events: u64,
pub events_dropped: u64,
pub buffer_utilization: f64,
}
Expand description
Memory usage snapshot for async tasks
Fields§
§active_task_count: usize
Number of currently active tracked tasks
total_allocated_bytes: u64
Total memory allocated by tracked tasks
allocation_events: u64
Number of allocation events recorded
events_dropped: u64
Number of events dropped due to buffer overflow
buffer_utilization: f64
Buffer utilization ratio (0.0 to 1.0)
Implementations§
Source§impl AsyncMemorySnapshot
impl AsyncMemorySnapshot
Sourcepub fn active_task_count(&self) -> usize
pub fn active_task_count(&self) -> usize
Get the number of active tasks
Sourcepub fn total_allocated(&self) -> u64
pub fn total_allocated(&self) -> u64
Get total allocated memory in bytes
Sourcepub fn has_good_data_quality(&self) -> bool
pub fn has_good_data_quality(&self) -> bool
Check if data quality is good (< 5% events dropped)
Sourcepub fn data_quality_warning(&self) -> Option<String>
pub fn data_quality_warning(&self) -> Option<String>
Get data quality warning if applicable
Trait Implementations§
Source§impl Clone for AsyncMemorySnapshot
impl Clone for AsyncMemorySnapshot
Source§fn clone(&self) -> AsyncMemorySnapshot
fn clone(&self) -> AsyncMemorySnapshot
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 AsyncMemorySnapshot
impl RefUnwindSafe for AsyncMemorySnapshot
impl Send for AsyncMemorySnapshot
impl Sync for AsyncMemorySnapshot
impl Unpin for AsyncMemorySnapshot
impl UnwindSafe for AsyncMemorySnapshot
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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