pub struct ProfilingOptimizer { /* private fields */ }Expand description
Profiling-guided optimizer.
Implementations§
Source§impl ProfilingOptimizer
impl ProfilingOptimizer
Sourcepub fn with_goal(self, goal: OptimizationGoal) -> Self
pub fn with_goal(self, goal: OptimizationGoal) -> Self
Set the optimization goal.
Sourcepub fn with_tuning_enabled(self, enabled: bool) -> Self
pub fn with_tuning_enabled(self, enabled: bool) -> Self
Enable or disable auto-tuning.
Sourcepub fn with_tuning_config(self, config: TuningConfig) -> Self
pub fn with_tuning_config(self, config: TuningConfig) -> Self
Set the tuning configuration.
Sourcepub fn with_strategy(self, strategy: OptimizationStrategy) -> Self
pub fn with_strategy(self, strategy: OptimizationStrategy) -> Self
Set the current optimization strategy.
Sourcepub fn record_profile(&mut self, profile: ExecutionProfile)
pub fn record_profile(&mut self, profile: ExecutionProfile)
Record an execution profile.
Sourcepub fn should_reoptimize(&self) -> bool
pub fn should_reoptimize(&self) -> bool
Check if reoptimization should be triggered.
Sourcepub fn detect_hotspots(&mut self) -> Vec<Hotspot>
pub fn detect_hotspots(&mut self) -> Vec<Hotspot>
Detect hotspots from collected profiles.
Sourcepub fn auto_tune(
&mut self,
) -> Result<OptimizationStrategy, ProfilingOptimizerError>
pub fn auto_tune( &mut self, ) -> Result<OptimizationStrategy, ProfilingOptimizerError>
Run auto-tuning to find best strategy.
Sourcepub fn generate_report(&self) -> OptimizationReport
pub fn generate_report(&self) -> OptimizationReport
Generate optimization report.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfilingOptimizer
impl RefUnwindSafe for ProfilingOptimizer
impl Send for ProfilingOptimizer
impl Sync for ProfilingOptimizer
impl Unpin for ProfilingOptimizer
impl UnwindSafe for ProfilingOptimizer
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