pub struct MemoryUsageMonitor { /* private fields */ }Expand description
Memory usage monitor for adaptive optimization
Implementations§
Source§impl MemoryUsageMonitor
impl MemoryUsageMonitor
Sourcepub fn update_usage(&mut self, usage_mb: u64)
pub fn update_usage(&mut self, usage_mb: u64)
Update current memory usage
Sourcepub fn get_memory_pressure(&self) -> MemoryPressureLevel
pub fn get_memory_pressure(&self) -> MemoryPressureLevel
Get current memory pressure level
Sourcepub fn get_usage_trend(&self) -> Option<MemoryTrend>
pub fn get_usage_trend(&self) -> Option<MemoryTrend>
Get memory usage trend
Trait Implementations§
Source§impl Debug for MemoryUsageMonitor
impl Debug for MemoryUsageMonitor
Auto Trait Implementations§
impl Freeze for MemoryUsageMonitor
impl RefUnwindSafe for MemoryUsageMonitor
impl Send for MemoryUsageMonitor
impl Sync for MemoryUsageMonitor
impl Unpin for MemoryUsageMonitor
impl UnwindSafe for MemoryUsageMonitor
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