pub struct AdaptivePerformanceOptimizer { /* private fields */ }
Expand description
Adaptive performance optimizer - main coordinator
Coordinates all adaptive optimization components:
- Batch size controller
- Type info cache
- Memory usage monitor
- Performance metrics collection
Implementations§
Source§impl AdaptivePerformanceOptimizer
impl AdaptivePerformanceOptimizer
Sourcepub fn new(initial_batch_size: usize, cache_size: usize) -> Self
pub fn new(initial_batch_size: usize, cache_size: usize) -> Self
Create a new adaptive performance optimizer
Sourcepub fn get_optimal_batch_size(&self) -> usize
pub fn get_optimal_batch_size(&self) -> usize
Get optimal batch size for current conditions
Sourcepub fn record_batch_performance(
&mut self,
batch_size: usize,
processing_time: Duration,
memory_usage_mb: u64,
allocations_processed: usize,
)
pub fn record_batch_performance( &mut self, batch_size: usize, processing_time: Duration, memory_usage_mb: u64, allocations_processed: usize, )
Record processing performance and adapt
Sourcepub fn get_cached_type_info(&self, type_name: &str) -> Option<Value>
pub fn get_cached_type_info(&self, type_name: &str) -> Option<Value>
Get or compute cached type information
Sourcepub fn cache_type_info(&self, type_name: String, info: Value)
pub fn cache_type_info(&self, type_name: String, info: Value)
Store computed type information in cache
Sourcepub fn get_performance_report(&self) -> Value
pub fn get_performance_report(&self) -> Value
Get comprehensive performance report
Sourcepub fn set_optimization_enabled(&mut self, enabled: bool)
pub fn set_optimization_enabled(&mut self, enabled: bool)
Enable or disable adaptive optimization
Trait Implementations§
Source§impl Debug for AdaptivePerformanceOptimizer
impl Debug for AdaptivePerformanceOptimizer
Auto Trait Implementations§
impl Freeze for AdaptivePerformanceOptimizer
impl RefUnwindSafe for AdaptivePerformanceOptimizer
impl Send for AdaptivePerformanceOptimizer
impl Sync for AdaptivePerformanceOptimizer
impl Unpin for AdaptivePerformanceOptimizer
impl UnwindSafe for AdaptivePerformanceOptimizer
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