pub struct TrackingManager { /* private fields */ }
Expand description
Unified tracking manager that combines memory and scope tracking This provides a unified interface that combines memory tracking and scope tracking while preserving all existing functionality.
Implementations§
Source§impl TrackingManager
impl TrackingManager
Sourcepub fn memory_tracker(&self) -> &Arc<MemoryTracker>
pub fn memory_tracker(&self) -> &Arc<MemoryTracker>
Get the memory tracker instance
Sourcepub fn scope_tracker(&self) -> &Arc<ScopeTracker>
pub fn scope_tracker(&self) -> &Arc<ScopeTracker>
Get the scope tracker instance
Sourcepub fn track_allocation(&self, ptr: usize, size: usize) -> TrackingResult<()>
pub fn track_allocation(&self, ptr: usize, size: usize) -> TrackingResult<()>
Track memory allocation
Sourcepub fn track_deallocation(&self, ptr: usize) -> TrackingResult<()>
pub fn track_deallocation(&self, ptr: usize) -> TrackingResult<()>
Track memory deallocation
Sourcepub fn associate_var(
&self,
ptr: usize,
var_name: String,
type_name: String,
) -> TrackingResult<()>
pub fn associate_var( &self, ptr: usize, var_name: String, type_name: String, ) -> TrackingResult<()>
Associate variable with memory allocation
Sourcepub fn enter_scope(&self, name: String) -> TrackingResult<ScopeId>
pub fn enter_scope(&self, name: String) -> TrackingResult<ScopeId>
Enter a new scope
Sourcepub fn exit_scope(&self, scope_id: ScopeId) -> TrackingResult<()>
pub fn exit_scope(&self, scope_id: ScopeId) -> TrackingResult<()>
Exit a scope
Sourcepub fn associate_variable(
&self,
variable_name: String,
memory_size: usize,
) -> TrackingResult<()>
pub fn associate_variable( &self, variable_name: String, memory_size: usize, ) -> TrackingResult<()>
Associate variable with current scope
Sourcepub fn get_stats(&self) -> TrackingResult<MemoryStats>
pub fn get_stats(&self) -> TrackingResult<MemoryStats>
Get memory statistics
Sourcepub fn get_active_allocations(&self) -> TrackingResult<Vec<AllocationInfo>>
pub fn get_active_allocations(&self) -> TrackingResult<Vec<AllocationInfo>>
Get active allocations
Sourcepub fn get_allocation_history(&self) -> TrackingResult<Vec<AllocationInfo>>
pub fn get_allocation_history(&self) -> TrackingResult<Vec<AllocationInfo>>
Get allocation history
Sourcepub fn get_scope_analysis(&self) -> TrackingResult<ScopeAnalysis>
pub fn get_scope_analysis(&self) -> TrackingResult<ScopeAnalysis>
Get scope analysis
Sourcepub fn perform_comprehensive_analysis(
&self,
) -> TrackingResult<ComprehensiveTrackingReport>
pub fn perform_comprehensive_analysis( &self, ) -> TrackingResult<ComprehensiveTrackingReport>
Perform comprehensive tracking analysis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrackingManager
impl !RefUnwindSafe for TrackingManager
impl Send for TrackingManager
impl Sync for TrackingManager
impl Unpin for TrackingManager
impl !UnwindSafe for TrackingManager
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