# olef perf

Source: https://olef.dev/docs/reference/cli/perf

Generated from **Olef 3.18.0**. [All olef commands](https://olef.dev/docs/reference/commands) · [ocloud commands](https://olef.dev/docs/reference/ocloud) · [Capabilities](https://olef.dev/docs/reference/capabilities)

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the [command catalog](https://olef.dev/docs/reference/commands#global-options).

## olef perf

Measure frame jank (`frames`), verified cold/warm/hot `startup`, and JVMTI `leaks`

```bash
olef perf --help
```

Output: **json**.

### olef perf frames

Reset or sample per-frame jank metrics from `dumpsys gfxinfo <pkg> framestats`

```bash
olef perf frames --help
```

Output: **json**.

#### olef perf frames reset

Clear the frame ring buffer for the target app

```bash
olef perf frames reset --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef perf frames sample

Sample valid frames, p50/p90/p95/p99, jank percentage, and worst-frame stage timings

```bash
olef perf frames sample --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--reset` | Reset the ring buffer after sampling |
| `--max-jank-pct <MAX_JANK_PCT>` | Fail with `perf_budget_exceeded` if jank percentage exceeds this limit |
| `--max-p95-ms <MAX_P95_MS>` | Fail with `perf_budget_exceeded` if p95 frame time (ms) exceeds this limit |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef perf startup

Measure verified cold, warm, or hot app startup times with `LaunchState` checks

```bash
olef perf startup --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--activity <ACTIVITY>` | Optional explicit activity component (e.g. `.MainActivity`) |
| `--mode <MODE>` | Startup mode to enforce and verify Default: `cold`. Values: `cold`, `warm`, `hot`. |
| `--runs <RUNS>` | Number of sequential measured runs (1..=10) Default: `1`. |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef perf leaks

Scan for retained destroyed Activities, Fragments, detached Views, and cleared ViewModels via JVMTI

```bash
olef perf leaks --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--app <APP>` | App package or configured app alias |
| `--gc` | Trigger JVMTI ForceGarbageCollection before walking GC-root paths |
| `--max-paths <MAX_PATHS>` | Maximum leak retention chains to return (1..=50) Default: `10`. |
| `--depth <DEPTH>` | Maximum reference-chain BFS depth (1..=64) Default: `24`. |
| `--max-pause-ms <MAX_PAUSE_MS>` | Hard stop-the-world FollowReferences pause cap in milliseconds (100..=2000) Default: `1500`. |
| `--json` | Accepted for compatibility; output is always JSON. |
