pub struct PerformanceOptimizer { /* private fields */ }
Expand description
Optimizes class generation performance
Implementations§
Source§impl PerformanceOptimizer
impl PerformanceOptimizer
Sourcepub fn with_optimization_level(level: OptimizationLevel) -> Self
pub fn with_optimization_level(level: OptimizationLevel) -> Self
Create a new optimizer with specific optimization level
Sourcepub fn optimize_class_generation(
&mut self,
classes: &[String],
) -> Result<String>
pub fn optimize_class_generation( &mut self, classes: &[String], ) -> Result<String>
Optimize class generation with caching
Sourcepub fn optimize_css_generation(&mut self, css: &str) -> Result<String>
pub fn optimize_css_generation(&mut self, css: &str) -> Result<String>
Optimize CSS generation with caching
Sourcepub fn record_performance(
&self,
operation: &str,
duration: Duration,
success: bool,
)
pub fn record_performance( &self, operation: &str, duration: Duration, success: bool, )
Record performance metrics
Sourcepub fn record_error(&self, error_type: &str, error: &dyn Error)
pub fn record_error(&self, error_type: &str, error: &dyn Error)
Record error metrics
Sourcepub fn record_usage(&self, class_pattern: &str, generation_time: Duration)
pub fn record_usage(&self, class_pattern: &str, generation_time: Duration)
Record usage metrics
Sourcepub fn get_performance_metrics(&self) -> Vec<PerformanceMetric>
pub fn get_performance_metrics(&self) -> Vec<PerformanceMetric>
Get performance metrics
Sourcepub fn get_error_metrics(&self) -> Vec<ErrorMetric>
pub fn get_error_metrics(&self) -> Vec<ErrorMetric>
Get error metrics
Sourcepub fn get_usage_metrics(&self) -> HashMap<String, UsageMetric>
pub fn get_usage_metrics(&self) -> HashMap<String, UsageMetric>
Get usage metrics
Sourcepub fn get_cache_stats(&self) -> CacheStats
pub fn get_cache_stats(&self) -> CacheStats
Get cache statistics
Sourcepub fn set_optimization_level(&mut self, level: OptimizationLevel)
pub fn set_optimization_level(&mut self, level: OptimizationLevel)
Set optimization level
Sourcepub fn optimization_level(&self) -> OptimizationLevel
pub fn optimization_level(&self) -> OptimizationLevel
Get optimization level
Trait Implementations§
Source§impl Debug for PerformanceOptimizer
impl Debug for PerformanceOptimizer
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