# GET /ui/stats

> Talos 0.7 · Since 0.7

The UI's cost on the last frame (time, draw calls, quads, texts) and, per screen, layout passes and what last dirtied layout.

Not an exact read: it describes the latest frame, like `GET /perf`, and `?at=` has no state to pin it to.

## Response

#### Response: `UiStatsView`

`GET /ui/stats` — what the game UI cost on the last frame, and why layout last ran.

| Field | Type | Present | Description |
|---|---|---|---|
| `frame` | `integer` | always | The frame these numbers describe. |
| `ui_ms` | `number` | always | Wall time of the UI's tick and draw-list mapping, in milliseconds. |
| `draw_calls` | `integer` | always | Draw calls the UI pass issued: quad rounds plus text rounds. |
| `batches` | `integer` | always | Quad rounds. A new round starts only where a quad covers text below it. |
| `quads` | `integer` | always | Quad instances handed to the renderer. |
| `texts` | `integer` | always | Text runs handed to the renderer. |
| `screens` | `UiScreenStatsView[]` | sometimes | The screens on the stack, bottom first. |

#### Response: `UiScreenStatsView`

One screen's layout readout in `UiStatsView`.

| Field | Type | Present | Description |
|---|---|---|---|
| `name` | `string` | always | The screen. |
| `nodes` | `integer` | always | Nodes in the screen's tree. |
| `layout_passes` | `integer` | always | Layout passes the screen has run since it was pushed. Two reads a second apart on a steady screen give the same number; a number climbing by the frame rate is layout every frame. |
| `last_layout_cause` | `string` | sometimes | What dirtied layout for the last pass: `styles`, `binding`, `text`, `transition`, `direction` or `other`. |
| `last_layout_node` | `string` | sometimes | The node that caused it, when one node is known (`hud:timer`). |

## Example

```sh
curl "http://127.0.0.1:7700/ui/stats"
```

Start a server with `argus run --serve`; the port is `--port` (7700 by default). The request and response fields are in the query API guide.
