pub struct PlanUsage {
pub running_seconds: f64,
pub suspended_seconds: f64,
pub image_gb: Option<f64>,
pub image_retained_seconds: Option<f64>,
pub suspend_resume_cycles: u32,
pub snapshot_gb: Option<f64>,
pub launched: bool,
}Expand description
A plan’s phases, in plain seconds, before anything is spent.
Separate from RunUsage on purpose (COST-10): its fields are f64 seconds
rather than DurationP, so there is no field an accidentally-Measured
duration could be written into. The wrapping happens in estimate_run, in one
place, and every one of them is Provenance::Projected.
Fields§
§running_seconds: f64§suspended_seconds: f64§image_gb: Option<f64>§image_retained_seconds: Option<f64>§suspend_resume_cycles: u32§snapshot_gb: Option<f64>§launched: boolImplementations§
Source§impl PlanUsage
impl PlanUsage
Sourcepub fn launched() -> PlanUsage
pub fn launched() -> PlanUsage
A plan for a sandbox that launches, with no phase attributed yet.
Sourcepub fn infer_launched(&self) -> bool
pub fn infer_launched(&self) -> bool
Whether this plan implies a launch: running time, or an image of non-zero size.
RunUsage::infer_launched’s rule over seconds: suspended time alone is a VM that
was already running, so it reads no launch snapshot.
Trait Implementations§
impl Copy for PlanUsage
impl StructuralPartialEq for PlanUsage
Auto Trait Implementations§
impl Freeze for PlanUsage
impl RefUnwindSafe for PlanUsage
impl Send for PlanUsage
impl Sync for PlanUsage
impl Unpin for PlanUsage
impl UnsafeUnpin for PlanUsage
impl UnwindSafe for PlanUsage
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