MemoryTracker

Trait MemoryTracker 

Source
pub trait MemoryTracker: Send + Sync {
    // Required methods
    fn initialize(&mut self, config: TrackerConfig) -> Result<(), TrackerError>;
    fn start_tracking(&mut self) -> Result<(), TrackerError>;
    fn stop_tracking(&mut self) -> Result<Vec<u8>, TrackerError>;
    fn get_statistics(&self) -> TrackerStatistics;
    fn is_active(&self) -> bool;
    fn tracker_type(&self) -> TrackerType;
}
Expand description

Unified memory tracker interface All tracking implementations must implement this trait for dispatcher compatibility

Required Methods§

Source

fn initialize(&mut self, config: TrackerConfig) -> Result<(), TrackerError>

Initialize tracker with given configuration

Source

fn start_tracking(&mut self) -> Result<(), TrackerError>

Start tracking memory operations

Source

fn stop_tracking(&mut self) -> Result<Vec<u8>, TrackerError>

Stop tracking and collect data

Source

fn get_statistics(&self) -> TrackerStatistics

Get current tracking statistics

Source

fn is_active(&self) -> bool

Check if tracker is currently active

Source

fn tracker_type(&self) -> TrackerType

Get tracker type identifier

Implementors§