pub struct AdvancedMemoryProfiler { /* private fields */ }Expand description
Comprehensive memory profiler for advanced mode
Implementations§
Source§impl AdvancedMemoryProfiler
impl AdvancedMemoryProfiler
Sourcepub fn new(config: MemoryProfilerConfig) -> Self
pub fn new(config: MemoryProfilerConfig) -> Self
Create a new memory profiler
Sourcepub fn start_profiling(&mut self, processor: &AdvancedProcessor)
pub fn start_profiling(&mut self, processor: &AdvancedProcessor)
Start profiling an advanced processor
Sourcepub fn record_allocation(
&mut self,
component: &str,
size: usize,
category: &str,
predicted: bool,
)
pub fn record_allocation( &mut self, component: &str, size: usize, category: &str, predicted: bool, )
Record memory allocation
Sourcepub fn record_deallocation(
&mut self,
component: &str,
size: usize,
category: &str,
)
pub fn record_deallocation( &mut self, component: &str, size: usize, category: &str, )
Record memory deallocation
Sourcepub fn record_memory_snapshot(&mut self, processor: &AdvancedProcessor)
pub fn record_memory_snapshot(&mut self, processor: &AdvancedProcessor)
Record memory usage snapshot
Sourcepub fn analyze_memory_patterns(&mut self)
pub fn analyze_memory_patterns(&mut self)
Analyze memory usage patterns and identify optimizations
Sourcepub fn profile_algorithm_execution<N, E, Ix, T>(
&mut self,
processor: &mut AdvancedProcessor,
graph: &Graph<N, E, Ix>,
algorithm_name: &str,
algorithm: impl FnOnce(&Graph<N, E, Ix>) -> Result<T>,
) -> Result<(T, MemoryExecutionProfile)>
pub fn profile_algorithm_execution<N, E, Ix, T>( &mut self, processor: &mut AdvancedProcessor, graph: &Graph<N, E, Ix>, algorithm_name: &str, algorithm: impl FnOnce(&Graph<N, E, Ix>) -> Result<T>, ) -> Result<(T, MemoryExecutionProfile)>
Profile memory usage during algorithm execution
Sourcepub fn generate_memory_report(&self) -> MemoryUsageReport
pub fn generate_memory_report(&self) -> MemoryUsageReport
Generate comprehensive memory usage report
Auto Trait Implementations§
impl Freeze for AdvancedMemoryProfiler
impl RefUnwindSafe for AdvancedMemoryProfiler
impl Send for AdvancedMemoryProfiler
impl Sync for AdvancedMemoryProfiler
impl Unpin for AdvancedMemoryProfiler
impl UnwindSafe for AdvancedMemoryProfiler
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> 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