pub struct GovernorStats {
pub max_bytes: u64,
pub reserved_floor_bytes: u64,
pub total_used: u64,
pub class_used: [u64; 9],
pub pressure: f64,
pub escalation: EscalationLevel,
pub reservations_granted: u64,
pub reservations_rejected: u64,
pub low_priority_rejected: u64,
pub spill_triggers: u64,
}Expand description
A point-in-time snapshot of governor state (telemetry and tests).
Fields§
§max_bytes: u64Configured node maximum.
reserved_floor_bytes: u64Configured reserved floor.
total_used: u64Total reserved bytes across all classes.
class_used: [u64; 9]Reserved bytes per class, in MemoryClass::index order.
pressure: f64total_used / max_bytes, clamped to 0.0..=1.0.
escalation: EscalationLevelCurrent escalation level.
reservations_granted: u64Cumulative granted reservations.
reservations_rejected: u64Cumulative rejected reservations.
low_priority_rejected: u64Cumulative rejections under escalation step 1.
spill_triggers: u64Cumulative entries into the spill level (S1E-004 hook signal count).
Implementations§
Source§impl GovernorStats
impl GovernorStats
Sourcepub fn usage_for(&self, class: MemoryClass) -> u64
pub fn usage_for(&self, class: MemoryClass) -> u64
Reserved bytes of one class.
Trait Implementations§
Source§impl Clone for GovernorStats
impl Clone for GovernorStats
Source§fn clone(&self) -> GovernorStats
fn clone(&self) -> GovernorStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GovernorStats
impl RefUnwindSafe for GovernorStats
impl Send for GovernorStats
impl Sync for GovernorStats
impl Unpin for GovernorStats
impl UnsafeUnpin for GovernorStats
impl UnwindSafe for GovernorStats
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