pub struct SamplingTracker { /* private fields */ }Expand description
High-performance sampling tracker with intelligent sampling strategies
Implementations§
Source§impl SamplingTracker
impl SamplingTracker
Sourcepub fn with_config(config: SamplingConfig) -> Self
pub fn with_config(config: SamplingConfig) -> Self
Create a new sampling tracker with custom configuration
Sourcepub fn track_variable(
&self,
ptr: usize,
size: usize,
var_name: String,
type_name: String,
) -> TrackingResult<()>
pub fn track_variable( &self, ptr: usize, size: usize, var_name: String, type_name: String, ) -> TrackingResult<()>
Track a variable allocation with intelligent sampling
Sourcepub fn track_access(&self, ptr: usize) -> TrackingResult<()>
pub fn track_access(&self, ptr: usize) -> TrackingResult<()>
Track variable access
Sourcepub fn track_modify(&self, ptr: usize) -> TrackingResult<()>
pub fn track_modify(&self, ptr: usize) -> TrackingResult<()>
Track variable modification
Sourcepub fn track_drop(&self, ptr: usize) -> TrackingResult<()>
pub fn track_drop(&self, ptr: usize) -> TrackingResult<()>
Track variable drop
Sourcepub fn flush_current_thread(&self) -> TrackingResult<()>
pub fn flush_current_thread(&self) -> TrackingResult<()>
Flush all pending data for the current thread
Sourcepub fn get_current_thread_stats(&self) -> ThreadStats
pub fn get_current_thread_stats(&self) -> ThreadStats
Get current thread’s basic statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SamplingTracker
impl RefUnwindSafe for SamplingTracker
impl Send for SamplingTracker
impl Sync for SamplingTracker
impl Unpin for SamplingTracker
impl UnwindSafe for SamplingTracker
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