---
title: RunUsageOptions
description: Everything a measured report attributes cost to.
---

Everything a measured report attributes cost to.

`#[napi(object)]` **is** right here, unlike for the guarded types: this is an options bag
a caller writes as a literal, and every field that carries a closure is a
`ClassInstance<Duration>` rather than a number — so the object shape still cannot express
an unlabelled duration. `ClassInstance` is what makes that hold: it extracts only from a
real `Duration` instance, so `{ running: 3600 }` and `{ running: { seconds: 3600 } }` are
both rejected by napi's conversion before any Rust runs. What the object buys is optional
fields with JS's own `undefined`, which is how "this phase did not happen" is said.

## Properties

### imageBuild?

```ts
optional imageBuild?: Duration;
```

How long the image build took, if it was timed. Always unpriced.

***

### imageGb?

```ts
optional imageGb?: number;
```

The image's size. Passing this adds both an image-storage line *and* the unpriced
build line, so a create-and-destroy report is never complete.

***

### imageRetained?

```ts
optional imageRetained?: Duration;
```

How long the image was retained. Defaults to the documented one-week minimum, marked
projected — nobody timed that week either.

***

### label?

```ts
optional label?: string;
```

What the report is of. Left out, `"run"`: the core's label, the one `microvm cost` uses.

***

### launched?

```ts
optional launched?: boolean;
```

Whether a launch happened. A launch reads a snapshot. Left out, the core infers it:
running time, or an image of non-zero size.

***

### running?

```ts
optional running?: Duration;
```

Wall-clock time in RUNNING. Bills at baseline whether or not anything is executing —
there is no free I/O wait, which is why suspension rather than idleness is the lever.

***

### snapshotGb?

```ts
optional snapshotGb?: number;
```

The suspend snapshot's size. Defaults to the baseline memory footprint.

***

### suspended?

```ts
optional suspended?: Duration;
```

Time held suspended. Pays storage only: a suspended VM is frozen.

***

### suspendResumeCycles?

```ts
optional suspendResumeCycles?: number;
```

Each cycle pays a snapshot write plus a read. Left out, the report counts none, so it has
no suspend or resume line: a report claims only what the caller says happened, as
`microvm cost` does.

## Provenance

This page is generated from `bindings/microvms-js/index.d.ts` by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, 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 dts`. `mise run dts:check` fails when the committed file no longer matches the source.