pub struct TrackingStats {
pub total_attempts: AtomicUsize,
pub successful_tracks: AtomicUsize,
pub missed_due_to_contention: AtomicUsize,
pub last_warning_time: Mutex<Option<Instant>>,
}Expand description
Memory tracking statistics
Provides tracking completeness monitoring and quality warnings to ensure users can monitor memory tracking quality in real-time.
Fields§
§total_attempts: AtomicUsizeTotal tracking attempts
successful_tracks: AtomicUsizeSuccessful tracking count
missed_due_to_contention: AtomicUsizeFailed attempts due to contention
last_warning_time: Mutex<Option<Instant>>Last warning time for rate limiting
Implementations§
Source§impl TrackingStats
impl TrackingStats
Sourcepub fn record_attempt(&self)
pub fn record_attempt(&self)
Record a tracking attempt
Sourcepub fn record_success(&self)
pub fn record_success(&self)
Record a successful tracking
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
Record a failed tracking due to contention
Sourcepub fn get_completeness(&self) -> f64
pub fn get_completeness(&self) -> f64
Get tracking completeness percentage
§Returns
Returns value between 0.0-1.0 representing successful tracking ratio
Sourcepub fn get_detailed_stats(&self) -> DetailedStats
pub fn get_detailed_stats(&self) -> DetailedStats
Get detailed statistics
Trait Implementations§
Source§impl Debug for TrackingStats
impl Debug for TrackingStats
Auto Trait Implementations§
impl !Freeze for TrackingStats
impl RefUnwindSafe for TrackingStats
impl Send for TrackingStats
impl Sync for TrackingStats
impl Unpin for TrackingStats
impl UnwindSafe for TrackingStats
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> 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