---
title: ResidencyComparison
description: Running versus suspended for the same VM over the same wall time.
---

```python
@final
class ResidencyComparison
```

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

## Constructor

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

## Properties

### `cycles`

```python
cycles: int
```

### `hold`

```python
hold: Duration
```

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

### `ratio`

```python
ratio: str
```

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

### `running`

```python
running: CostReport
```

### `size`

```python
size: SizeClass
```

### `suspended`

```python
suspended: CostReport
```

## Methods

### `break_even_seconds`

```python
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.

### `break_even_seconds_float`

```python
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.

### `per_cycle`

```python
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.

### `render`

```python
def render() -> str
```

## Special methods

### `__str__`

```python
def __str__() -> str
```

## Provenance

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.