pub struct MemoryStats {
pub budget_bytes: usize,
pub reserved_bytes: usize,
pub peak_bytes: usize,
pub bytes_spilled: usize,
pub spill_count: usize,
pub active_reservations: usize,
pub spill_threshold: f64,
}Expand description
Statistics snapshot from the memory controller
A point-in-time view of memory usage and spill statistics. Useful for monitoring, debugging, and query profiling.
Fields§
§budget_bytes: usizeTotal memory budget
reserved_bytes: usizeCurrently reserved memory
peak_bytes: usizePeak memory usage (high water mark)
bytes_spilled: usizeTotal bytes written to disk during spills
spill_count: usizeNumber of spill operations performed
active_reservations: usizeNumber of currently active reservations
spill_threshold: f64Spill threshold (0.0 - 1.0)
Implementations§
Source§impl MemoryStats
impl MemoryStats
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Get memory utilization as a percentage (0.0 - 1.0)
Sourcepub fn is_under_pressure(&self) -> bool
pub fn is_under_pressure(&self) -> bool
Check if memory is under pressure (above spill threshold)
Sourcepub fn available_bytes(&self) -> usize
pub fn available_bytes(&self) -> usize
Get available memory
Trait Implementations§
Source§impl Clone for MemoryStats
impl Clone for MemoryStats
Source§fn clone(&self) -> MemoryStats
fn clone(&self) -> MemoryStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryStats
impl Debug for MemoryStats
Auto Trait Implementations§
impl Freeze for MemoryStats
impl RefUnwindSafe for MemoryStats
impl Send for MemoryStats
impl Sync for MemoryStats
impl Unpin for MemoryStats
impl UnwindSafe for MemoryStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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