pub struct PlanRuntimeResourceSnapshot { /* private fields */ }Expand description
Point-in-time memory evidence emitted by the shared plan runtime.
Static model allocations are separated from dynamic request resources so product telemetry never reports model weights as KV or recurrent-state usage. Process-wide claims are included because another live plan can consume capacity visible to this runtime. Dynamic free bytes remain reusable by this plan; quarantined and other claimed bytes do not.
Implementations§
Source§impl PlanRuntimeResourceSnapshot
impl PlanRuntimeResourceSnapshot
pub fn new( device_capacity_bytes: u64, usable_capacity_bytes: u64, process_claimed_bytes: u64, plan_claimed_bytes: u64, static_bytes: u64, dynamic_resident_bytes: u64, dynamic_free_bytes: u64, pending_growth_bytes: u64, quarantined_bytes: u64, ) -> Result<Self>
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Revalidates deserialized evidence before it crosses a trusted failure or profile boundary.
pub const fn device_capacity_bytes(&self) -> u64
pub const fn usable_capacity_bytes(&self) -> u64
pub const fn process_claimed_bytes(&self) -> u64
pub const fn plan_claimed_bytes(&self) -> u64
pub const fn static_bytes(&self) -> u64
pub const fn dynamic_resident_bytes(&self) -> u64
pub const fn dynamic_free_bytes(&self) -> u64
pub const fn dynamic_used_bytes(&self) -> u64
pub const fn pending_growth_bytes(&self) -> u64
pub const fn quarantined_bytes(&self) -> u64
Sourcepub fn available_bytes(&self) -> Result<u64>
pub fn available_bytes(&self) -> Result<u64>
Capacity immediately reusable by this plan without reclaiming another plan: process-wide unclaimed bytes plus free extents already resident in this plan’s dynamic pools.
pub fn used_bytes(&self) -> Result<u64>
Trait Implementations§
Source§impl Clone for PlanRuntimeResourceSnapshot
impl Clone for PlanRuntimeResourceSnapshot
Source§fn clone(&self) -> PlanRuntimeResourceSnapshot
fn clone(&self) -> PlanRuntimeResourceSnapshot
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 moreSource§impl Debug for PlanRuntimeResourceSnapshot
impl Debug for PlanRuntimeResourceSnapshot
Source§impl<'de> Deserialize<'de> for PlanRuntimeResourceSnapshot
impl<'de> Deserialize<'de> for PlanRuntimeResourceSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PlanRuntimeResourceSnapshot
impl StructuralPartialEq for PlanRuntimeResourceSnapshot
Auto Trait Implementations§
impl Freeze for PlanRuntimeResourceSnapshot
impl RefUnwindSafe for PlanRuntimeResourceSnapshot
impl Send for PlanRuntimeResourceSnapshot
impl Sync for PlanRuntimeResourceSnapshot
impl Unpin for PlanRuntimeResourceSnapshot
impl UnsafeUnpin for PlanRuntimeResourceSnapshot
impl UnwindSafe for PlanRuntimeResourceSnapshot
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