pub struct PerformanceOptimizer { /* private fields */ }Expand description
Performance Optimization Manager
Implementations§
Source§impl PerformanceOptimizer
impl PerformanceOptimizer
Sourcepub fn new(
memory_pool_size: usize,
batch_size: usize,
compression_enabled: bool,
) -> Self
pub fn new( memory_pool_size: usize, batch_size: usize, compression_enabled: bool, ) -> Self
Create a new performance optimization manager
Sourcepub fn with_config(config: PerformanceConfig) -> Self
pub fn with_config(config: PerformanceConfig) -> Self
Create a performance optimization manager with the specified configuration
Sourcepub async fn optimize_message(
&self,
message: Message,
) -> NetworkResult<ZeroCopyMessage>
pub async fn optimize_message( &self, message: Message, ) -> NetworkResult<ZeroCopyMessage>
Optimize the message
Sourcepub async fn get_metrics(&self) -> PerformanceStats
pub async fn get_metrics(&self) -> PerformanceStats
Get performance statistics
Sourcepub async fn get_performance_stats(&self) -> PerformanceStats
pub async fn get_performance_stats(&self) -> PerformanceStats
Get performance statistics (alias)
Sourcepub async fn update_config(&mut self, new_config: PerformanceConfig)
pub async fn update_config(&mut self, new_config: PerformanceConfig)
Update configuration
Sourcepub async fn optimize_memory_usage(&self) -> NetworkResult<()>
pub async fn optimize_memory_usage(&self) -> NetworkResult<()>
Optimize memory usage
Sourcepub async fn start_real_time_monitoring(&self) -> NetworkResult<()>
pub async fn start_real_time_monitoring(&self) -> NetworkResult<()>
Start real-time monitoring
Sourcepub async fn export_metrics(&self) -> NetworkResult<String>
pub async fn export_metrics(&self) -> NetworkResult<String>
Export metrics in Prometheus format
Sourcepub async fn run_optimization_cycle(&self) -> NetworkResult<()>
pub async fn run_optimization_cycle(&self) -> NetworkResult<()>
Run performance optimization
Sourcepub async fn get_detailed_metrics(&self) -> NetworkResult<HashMap<String, f64>>
pub async fn get_detailed_metrics(&self) -> NetworkResult<HashMap<String, f64>>
Obtain detailed metrics
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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