pub struct PerformanceOptimizer { /* private fields */ }Expand description
Adaptive performance optimizer
Implementations§
Source§impl PerformanceOptimizer
impl PerformanceOptimizer
Sourcepub fn track_allocation(
&self,
ptr: usize,
size: usize,
type_name: &str,
) -> TrackingResult<()>
pub fn track_allocation( &self, ptr: usize, size: usize, type_name: &str, ) -> TrackingResult<()>
Track allocation with automatic optimization
Sourcepub fn track_deallocation(&self, ptr: usize) -> TrackingResult<()>
pub fn track_deallocation(&self, ptr: usize) -> TrackingResult<()>
Track deallocation
Sourcepub fn get_performance_metrics(&self) -> PerformanceMetrics
pub fn get_performance_metrics(&self) -> PerformanceMetrics
Get current performance metrics
Sourcepub fn get_allocation_patterns(&self) -> AllocationPattern
pub fn get_allocation_patterns(&self) -> AllocationPattern
Get allocation patterns
Sourcepub fn get_optimization_recommendations(&self) -> OptimizationRecommendations
pub fn get_optimization_recommendations(&self) -> OptimizationRecommendations
Get optimization recommendations
Sourcepub fn apply_optimizations(
&self,
recommendations: &OptimizationRecommendations,
) -> TrackingResult<()>
pub fn apply_optimizations( &self, recommendations: &OptimizationRecommendations, ) -> TrackingResult<()>
Apply optimization recommendations
Sourcepub fn set_optimization_enabled(&self, enabled: bool)
pub fn set_optimization_enabled(&self, enabled: bool)
Enable/disable automatic optimization
Sourcepub fn get_stats(&self) -> TrackingResult<MemoryStats>
pub fn get_stats(&self) -> TrackingResult<MemoryStats>
Get memory statistics
Sourcepub fn get_sampling_stats(&self) -> SamplingStats
pub fn get_sampling_stats(&self) -> SamplingStats
Get sampling statistics
Sourcepub fn force_optimization(&self) -> TrackingResult<()>
pub fn force_optimization(&self) -> TrackingResult<()>
Force optimization analysis
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PerformanceOptimizer
impl RefUnwindSafe for PerformanceOptimizer
impl Send for PerformanceOptimizer
impl Sync for PerformanceOptimizer
impl Unpin for PerformanceOptimizer
impl UnwindSafe for PerformanceOptimizer
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