pub struct ProfileGuidedOptimizer { /* private fields */ }Expand description
Profile-guided optimizer
Implementations§
Source§impl ProfileGuidedOptimizer
impl ProfileGuidedOptimizer
Sourcepub fn new(config: ProfilerConfig, targets: PerformanceTargets) -> Self
pub fn new(config: ProfilerConfig, targets: PerformanceTargets) -> Self
Create new profile-guided optimizer
Sourcepub fn add_optimization_rule(&mut self, rule: OptimizationRule)
pub fn add_optimization_rule(&mut self, rule: OptimizationRule)
Add custom optimization rule
Sourcepub fn collect_profile(
&self,
program_name: &str,
) -> Result<PerformanceProfile, ProfileError>
pub fn collect_profile( &self, program_name: &str, ) -> Result<PerformanceProfile, ProfileError>
Collect performance profile
Sourcepub fn analyze_and_recommend(
&self,
program_name: &str,
) -> Result<Vec<OptimizationRecommendation>, ProfileError>
pub fn analyze_and_recommend( &self, program_name: &str, ) -> Result<Vec<OptimizationRecommendation>, ProfileError>
Analyze profiles and generate optimization recommendations
Sourcepub fn apply_optimization(
&self,
recommendation: &OptimizationRecommendation,
) -> Result<(), ProfileError>
pub fn apply_optimization( &self, recommendation: &OptimizationRecommendation, ) -> Result<(), ProfileError>
Apply optimization recommendation
Sourcepub fn get_optimization_history(&self) -> Vec<OptimizationApplication>
pub fn get_optimization_history(&self) -> Vec<OptimizationApplication>
Get optimization history
Sourcepub fn calculate_performance_gain(&self) -> f64
pub fn calculate_performance_gain(&self) -> f64
Calculate overall performance gain
Sourcepub fn generate_report(
&self,
program_name: &str,
) -> Result<OptimizationReport, ProfileError>
pub fn generate_report( &self, program_name: &str, ) -> Result<OptimizationReport, ProfileError>
Generate optimization report
Auto Trait Implementations§
impl Freeze for ProfileGuidedOptimizer
impl RefUnwindSafe for ProfileGuidedOptimizer
impl Send for ProfileGuidedOptimizer
impl Sync for ProfileGuidedOptimizer
impl Unpin for ProfileGuidedOptimizer
impl UnwindSafe for ProfileGuidedOptimizer
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