PerformanceOptimizer

Struct PerformanceOptimizer 

Source
pub struct PerformanceOptimizer { /* private fields */ }
Expand description

Optimizes class generation performance

Implementations§

Source§

impl PerformanceOptimizer

Source

pub fn new() -> Self

Create a new optimizer instance

Source

pub fn with_optimization_level(level: OptimizationLevel) -> Self

Create a new optimizer with specific optimization level

Source

pub fn optimize_class_generation( &mut self, classes: &[String], ) -> Result<String>

Optimize class generation with caching

Source

pub fn optimize_css_generation(&mut self, css: &str) -> Result<String>

Optimize CSS generation with caching

Source

pub fn record_performance( &self, operation: &str, duration: Duration, success: bool, )

Record performance metrics

Source

pub fn record_error(&self, error_type: &str, error: &dyn Error)

Record error metrics

Source

pub fn record_usage(&self, class_pattern: &str, generation_time: Duration)

Record usage metrics

Source

pub fn get_performance_metrics(&self) -> Vec<PerformanceMetric>

Get performance metrics

Source

pub fn get_error_metrics(&self) -> Vec<ErrorMetric>

Get error metrics

Source

pub fn get_usage_metrics(&self) -> HashMap<String, UsageMetric>

Get usage metrics

Source

pub fn get_cache_stats(&self) -> CacheStats

Get cache statistics

Source

pub fn set_optimization_level(&mut self, level: OptimizationLevel)

Set optimization level

Source

pub fn optimization_level(&self) -> OptimizationLevel

Get optimization level

Trait Implementations§

Source§

impl Debug for PerformanceOptimizer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PerformanceOptimizer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.