pub struct DistributedMemoryOptimizer { /* private fields */ }Expand description
Distributed memory optimization system
Implementations§
Source§impl DistributedMemoryOptimizer
impl DistributedMemoryOptimizer
Sourcepub fn new(
config: MemoryOptimizationConfig,
monitor: Arc<DistributedMonitor>,
) -> Self
pub fn new( config: MemoryOptimizationConfig, monitor: Arc<DistributedMonitor>, ) -> Self
Create new distributed memory optimizer
Sourcepub fn collect_memory_statistics(&self) -> TorshResult<()>
pub fn collect_memory_statistics(&self) -> TorshResult<()>
Collect memory statistics from all nodes
Sourcepub fn analyze_optimization_opportunities(
&self,
) -> TorshResult<Vec<MemoryOptimizationAction>>
pub fn analyze_optimization_opportunities( &self, ) -> TorshResult<Vec<MemoryOptimizationAction>>
Analyze memory usage and identify optimization opportunities
Sourcepub fn execute_optimization(&self, action_id: &str) -> TorshResult<()>
pub fn execute_optimization(&self, action_id: &str) -> TorshResult<()>
Execute a memory optimization action
Sourcepub fn schedule_optimizations(
&self,
actions: Vec<MemoryOptimizationAction>,
) -> TorshResult<usize>
pub fn schedule_optimizations( &self, actions: Vec<MemoryOptimizationAction>, ) -> TorshResult<usize>
Schedule optimization actions for execution
Sourcepub fn get_optimization_status(&self) -> TorshResult<MemoryOptimizationStatus>
pub fn get_optimization_status(&self) -> TorshResult<MemoryOptimizationStatus>
Get current memory optimization status
Sourcepub fn track_allocation(
&self,
node_id: String,
size_mb: u64,
allocation_type: String,
success: bool,
) -> TorshResult<()>
pub fn track_allocation( &self, node_id: String, size_mb: u64, allocation_type: String, success: bool, ) -> TorshResult<()>
Track memory allocation for prediction
Sourcepub fn get_allocation_prediction(
&self,
node_id: &str,
minutes_ahead: u32,
) -> TorshResult<u64>
pub fn get_allocation_prediction( &self, node_id: &str, minutes_ahead: u32, ) -> TorshResult<u64>
Get memory allocation prediction
Sourcepub fn export_optimization_data(&self) -> TorshResult<MemoryOptimizationExport>
pub fn export_optimization_data(&self) -> TorshResult<MemoryOptimizationExport>
Export memory optimization data
Auto Trait Implementations§
impl Freeze for DistributedMemoryOptimizer
impl RefUnwindSafe for DistributedMemoryOptimizer
impl Send for DistributedMemoryOptimizer
impl Sync for DistributedMemoryOptimizer
impl Unpin for DistributedMemoryOptimizer
impl UnsafeUnpin for DistributedMemoryOptimizer
impl UnwindSafe for DistributedMemoryOptimizer
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