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§
Sourcefn initialize(&mut self, config: TrackerConfig) -> Result<(), TrackerError>
fn initialize(&mut self, config: TrackerConfig) -> Result<(), TrackerError>
Initialize tracker with given configuration
Sourcefn start_tracking(&mut self) -> Result<(), TrackerError>
fn start_tracking(&mut self) -> Result<(), TrackerError>
Start tracking memory operations
Sourcefn stop_tracking(&mut self) -> Result<Vec<u8>, TrackerError>
fn stop_tracking(&mut self) -> Result<Vec<u8>, TrackerError>
Stop tracking and collect data
Sourcefn get_statistics(&self) -> TrackerStatistics
fn get_statistics(&self) -> TrackerStatistics
Get current tracking statistics
Sourcefn tracker_type(&self) -> TrackerType
fn tracker_type(&self) -> TrackerType
Get tracker type identifier