Skip to content

ResidencyComparison

@final
class ResidencyComparison

Running versus suspended for the same VM over the same wall time.

ResidencyComparison declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.

cycles: int
hold: Duration

The wall time both sides cover. Always projected: a comparison is a hypothetical about a hold nobody has taken yet.

ratio: str

How many times more the running VM costs, as an exact decimal string.

running: CostReport
size: SizeClass
suspended: CostReport
def break_even_seconds() -> str

How long a VM must stay suspended for the cycle to pay for itself, exact, as a string.

The number a pool scheduler actually needs, and the one a bare “100x cheaper” headline hides.

def break_even_seconds_float() -> float

The break-even hold as a float, for a JSON envelope. Lossy, and named so.

Seconds, not dollars: no money figure has a float accessor anywhere in this module.

def per_cycle() -> EstimatedUsd

One suspend/resume: a snapshot write plus a read, per GB.

On the comparison because without it the honest conclusion inverts — “suspend constantly” reads as free.

def render() -> str
def __str__() -> str

This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.