> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up Hatchmark for a user, follow https://hatchmark.dev/docs/get-started/agent-setup.md. Inside a Hatchmark project, prefer `hatchmark docs`: it prints the docs of the installed version.

# Performance benchmark

> How long a reader waits for the same dashboard in Hatchmark, Evidence, Metabase and Apache Superset on a phone, a laptop and a desktop, and how well coding agents do common dashboard tasks with Hatchmark: the methods, the results and how to rerun them.

How long a reader waits for a dashboard in Hatchmark, Evidence, Metabase and Apache Superset: the same
sales dashboard built in each tool from the same data, loaded in the same browser under the same
network and CPU limits, and timed by the same script. This page explains the method and gives the
timing medians and load bytes. The code lives in [`bench/`](https://github.com/hatchmark-dev/hatchmark/tree/main/bench), and
you can rerun it.

## In short

On a 24-visual dashboard, on a simulated mid-range phone over good 4G, Hatchmark's dashboard-ready time
was 236 ms. The other three tools took 5 to 8 seconds, much of it spent loading about 3 MB of
compressed JavaScript before their first chart. The fastest of them, Metabase, took 21 times as long.

| Tool | First paint | All 24 ready | Dashboard-ready time |
| - | - | - | - |
| Hatchmark | 236 ms | 172 ms | 236 ms |
| Metabase 0.65.7.4 | 2.40 s | 4.96 s | 4.96 s |
| Evidence 40.1.8 | 212 ms | 5.48 s | 5.48 s |
| Apache Superset 6.1.0 | 2.26 s | 7.78 s | 7.78 s |

The dashboard-ready time is first paint or all 24 visuals ready, whichever is later: the larger of the
median first paint and the median all-visuals-ready time, each a median of 7 runs on the `phone-4g`
profile (412 px wide, CPU slowed 4×, 10 Mbps down, 5 Mbps up, 40 ms latency). "All 24 ready" is the
first animation frame in which every visual is laid out with the right data, checked before that frame
is painted. The dashboard-ready time is an estimate, not a measurement of every visual's paint: first
paint may be a title rather than a chart, and the readiness check runs before paint.

The viewport is 12,000 px tall so the whole page is laid out at once; a real phone would show only the
top of it. Evidence paints first, at 212 ms, so Hatchmark's lead is in visuals showing the right data,
not in first paint. The full tables, other profiles and the caveats follow.

## The tools

| Tool | Version and deployment | How it serves the dashboard |
| - | - | - |
| Hatchmark | the checkout under test | `hatchmark build` writes static files |
| Evidence | `@evidence-dev/evidence` 40.1.8, from the official template at commit `ec9e0f5`, installed from its lockfile | `evidence sources` and `evidence build` write static files |
| Metabase | `metabase/metabase:v0.65.7.4`, Java heap `-Xmx2g`, H2 application database | a server in Docker that queries Postgres 17 on every view |
| Apache Superset | `apache/superset:6.1.0` with `psycopg2-binary`, SQLite metadata database, 2 Gunicorn workers | a server in Docker that queries Postgres 17 on every view |

Hatchmark's and Evidence's static files are served by the same small static server, which gzips text.
Evidence's newer CLI has no static export, so the benchmark uses the last open-source release that
builds a static site.

All four read one generated dataset: 500,000 orders from Nov 2024 to Oct 2026 in 21 countries, three
regions and six channels, written from a fixed seed. Hatchmark and Evidence read it as CSV, and
Postgres loads the same file. Every result records the file's SHA-256.

## The dashboards

Both pages cover the 12 months from Nov 1, 2025 and have one control, a region filter. The
interaction timed is "show EMEA only".

* **Light page, 7 visuals:** revenue, orders, average order value and refund rate as KPIs, revenue by
  month as one line per region, revenue by channel as bars, and the top 15 countries as a table.
* **Heavy page, 24 visuals:** 6 KPIs, 4 line charts by region, 4 area charts stacked by region, 8 bar
  charts (by channel, by region and the top 8 countries) and 2 tables. Every chart is split by region,
  channel or country, so the filter changes all 24. One list in
  [`bench/src/heavy.ts`](https://github.com/hatchmark-dev/hatchmark/blob/main/bench/src/heavy.ts)
  defines the visuals, and the same list drives every tool's page and the expected values.

## How each tool is set up

Each tool builds the dashboards the way its own documentation suggests. Apart from the deployment
settings in the table above, each keeps its default chart and query cache behaviour.

* **Hatchmark:** metrics in YAML and one dashboard file per page. The region filter is a segment
  toggle; these runs were measured before the select control was drawn.
* **Evidence:** on the heavy page one SQL query per visual, and on the light page one query for the
  four KPIs and one for each other visual. Each query filters the orders table itself with
  `where region like '${inputs.region.value}'`, the pattern in Evidence's filters guide. The region
  filter is a `Dropdown` bound to that input. Evidence runs these queries in the browser with
  DuckDB-WASM, so it ships the orders table as Parquet and the WASM build to every reader.
* **Metabase:** one native SQL question per visual on one dashboard, created through its API, with a
  dashboard filter wired to a `{{region}}` variable.
* **Apache Superset:** a virtual dataset, one chart per visual on one dashboard, created through its
  API, with a native Select filter on `region`.

Metabase and Superset cache no query results by default, so every page view runs its queries. The
benchmark does not measure them with caching turned on. The Postgres table has a primary key and no
other index.

## Device profiles

Every run uses Chromium from Playwright, headless, in a fresh browser context with a cold cache.

| Profile | Viewport width | CPU | Network |
| - | - | - | - |
| `phone` | 412 px | 4× slower | 1.6 Mbps down, 750 Kbps up, 150 ms |
| `phone-4g` | 412 px | 4× slower | 10 Mbps down, 5 Mbps up, 40 ms |
| `laptop` | 1,440 px | not slowed | 50 Mbps down, 10 Mbps up, 20 ms |
| `desktop` | 1,440 px | not slowed | not shaped |

`phone` uses the throughput of Lighthouse's mobile profile. The CPU slowdown is relative to the
machine running the benchmark, so the numbers compare tools on one machine and are not a forecast for
a particular phone.

## What each number means

A script injected before the page's own code reads every visual on every animation frame and compares
what it shows with values computed separately from the CSV. A visual counts only while it is laid out,
visible and showing the right numbers for the current filter: KPIs by their displayed value, tables
by their top rows, and charts by the positions of their lines, areas and bars.

| Metric | From | To |
| - | - | - |
| First paint (FCP) | navigation start | the browser's first contentful paint |
| First chart | navigation start | the first frame in which a chart shows the right data |
| All settled | navigation start | the first frame in which every visual shows the right data |
| Apply to settled | the click that commits EMEA | the last frame in which a visual changed, once all show EMEA's data |
| JS gzip | bytes | every script received until the page is drawn, recompressed with gzip |
| Encoded bodies | bytes | every response body received until the page is drawn, as served |

"First chart" is checked on the frame where the chart's marks are laid out, which can be just before
they are painted. When a tool's charts are in its HTML, as Hatchmark's are, first chart can come
before first paint. Animated chart updates count, because the reader waits for them too.

Each tool on each profile has 7 quiet runs after 1 warm-up, and the tables show medians. Before each
run the script checks the machine's 1-minute load average and waits while it is above 4.5; runs under load or that
failed are kept in the results file but left out of the medians. All runs were on one Apple M5 Pro Mac
mini with Chromium 159, with Metabase, Superset and Postgres in a Docker VM with 4 CPUs and 6 GB of
memory.

## Results: heavy page

Measured on Nov 29, 2026 at commit `1ea5ee8`, the final commit of
[#101](https://github.com/hatchmark-dev/hatchmark/pull/101), whose `bench/` directory is the one on main.
On good 4G Evidence paints first (212 ms against Hatchmark's 236 ms), and it also paints first on the
desktop and ties on the laptop. Hatchmark's lead is in charts with the right data, not in first paint.

**Phone on good 4G** (`phone-4g`)

| Tool | First paint | First chart | All 24 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 236 ms | 172 ms | 172 ms | 140 ms |
| Evidence 40.1.8 | 212 ms | 5.08 s | 5.48 s | 1.63 s |
| Metabase 0.65.7.4 | 2.40 s | 3.84 s | 4.96 s | 2.79 s |
| Apache Superset 6.1.0 | 2.26 s | 6.04 s | 7.78 s | 2.66 s |

**Phone on slow 4G** (`phone`)

| Tool | First paint | First chart | All 24 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 368 ms | 290 ms | 489 ms | 639 ms |
| Evidence 40.1.8 | 660 ms | 20.3 s | 20.8 s | 1.61 s |
| Metabase 0.65.7.4 | 10.4 s | 14.2 s | 16.0 s | 2.94 s |
| Apache Superset 6.1.0 | 10.4 s | 18.9 s | 19.5 s | 2.96 s |

**Laptop on broadband** (`laptop`)

| Tool | First paint | First chart | All 24 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 104 ms | 65 ms | 65 ms | 45 ms |
| Evidence 40.1.8 | 104 ms | 1.80 s | 1.92 s | 1.11 s |
| Metabase 0.65.7.4 | 624 ms | 1.58 s | 1.80 s | 684 ms |
| Apache Superset 6.1.0 | 544 ms | 2.62 s | 2.73 s | 1.87 s |

**Desktop, no throttling** (`desktop`)

| Tool | First paint | First chart | All 24 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 64 ms | 37 ms | 37 ms | 44 ms |
| Evidence 40.1.8 | 36 ms | 1.04 s | 1.15 s | 1.11 s |
| Metabase 0.65.7.4 | 300 ms | 607 ms | 1.41 s | 684 ms |
| Apache Superset 6.1.0 | 236 ms | 2.20 s | 2.35 s | 2.01 s |

**Bytes at load**, the same on every profile apart from Metabase, which sends less at phone width:

| Tool | JS gzip | Encoded bodies |
| - | - | - |
| Hatchmark | 11 KB | 124 KB |
| Evidence 40.1.8 | 3,043 KB | 17,641 KB |
| Metabase 0.65.7.4, 1,440 px wide | 2,911 KB | 2,635 KB |
| Metabase 0.65.7.4, 412 px wide | 2,842 KB | 2,559 KB |
| Apache Superset 6.1.0 | 2,735 KB | 2,876 KB |

Evidence's encoded bodies include its DuckDB-WASM build and the orders table as Parquet, which it
needs for filtering. Run the 24 queries of one view straight against each server's API, from the
first request to the last response, and Metabase takes about 0.6 s and Superset about 0.8 s.

## Results: light page

Measured on Nov 28, 2026: the slow-4G and desktop runs at commit `32f08cf`, the final commit of
[#94](https://github.com/hatchmark-dev/hatchmark/pull/94), and the good-4G and laptop runs at
`6c8dc8e`, which adds only those two profiles. #101 later made the line-chart check stricter; these tables were taken before that
change.

**Phone on good 4G** (`phone-4g`)

| Tool | First paint | First chart | All 7 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 196 ms | 169 ms | 169 ms | 128 ms |
| Evidence 40.1.8 | 204 ms | 3.96 s | 4.03 s | 650 ms |
| Metabase 0.65.7.4 | 2.43 s | 3.74 s | 3.77 s | 625 ms |
| Apache Superset 6.1.0 | 2.34 s | 5.07 s | 5.23 s | 1.56 s |

**Phone on slow 4G** (`phone`)

| Tool | First paint | First chart | All 7 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 348 ms | 281 ms | 281 ms | 644 ms |
| Evidence 40.1.8 | 660 ms | 18.1 s | 18.1 s | 651 ms |
| Metabase 0.65.7.4 | 10.4 s | 13.2 s | 15.0 s | 756 ms |
| Apache Superset 6.1.0 | 10.4 s | 17.6 s | 17.6 s | 1.67 s |

**Laptop on broadband** (`laptop`)

| Tool | First paint | First chart | All 7 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 80 ms | 60 ms | 60 ms | 47 ms |
| Evidence 40.1.8 | 80 ms | 1.39 s | 1.46 s | 630 ms |
| Metabase 0.65.7.4 | 604 ms | 1.23 s | 1.29 s | 361 ms |
| Apache Superset 6.1.0 | 544 ms | 2.07 s | 2.11 s | 1.33 s |

**Desktop, no throttling** (`desktop`)

| Tool | First paint | First chart | All 7 settled | Apply to settled |
| - | - | - | - | - |
| Hatchmark | 24 ms | 4 ms | 4 ms | 45 ms |
| Evidence 40.1.8 | 28 ms | 889 ms | 955 ms | 624 ms |
| Metabase 0.65.7.4 | 288 ms | 824 ms | 824 ms | 343 ms |
| Apache Superset 6.1.0 | 220 ms | 1.62 s | 1.65 s | 1.28 s |

**Bytes at load:** Hatchmark 11 KB of JS gzip and 90 KB of encoded bodies, Evidence 3,031 KB and
17,613 KB, Metabase 2,911 KB and 2,606 KB, Superset 2,735 KB and 2,861 KB. One view's 7 queries take
Metabase about 0.36 s and Superset about 0.44 s on the server.

## Caveats

* **The heavy page is laid out in a 12,000 px tall viewport,** so all 24 visuals are laid out at once
  and "all settled" can be measured for every tool. On a real phone most of them would be below the
  fold, and "first chart" here means the first chart in that tall viewport.
* **Readiness is checked before paint.** "First chart" and "all settled" are taken on the animation
  frame where the marks are laid out with the right data, before the browser paints that frame. First
  paint is the only paint time in the tables.
* **Servers are not throttled.** Metabase's and Superset's queries run in the Docker VM at full speed;
  only the browser's CPU and network are limited.
* **Evidence's worker may be favoured.** Evidence filters in a Web Worker, and whether Chromium's CPU
  slowdown reaches dedicated workers is not verified, so its apply times may be optimistic.
* **The filter controls differ, and so does what is timed.** Hatchmark's toggle commits with one
  click. In Evidence the dropdown is opened before the timer starts, and the timed click picks EMEA.
  In Metabase and Superset the dropdown is opened and EMEA chosen before the timer starts, and the
  timed click is the button that applies the filter.
* **Superset does not adapt its grid to a phone.** At 412 px it lays out its desktop grid and
  scrolls sideways.
* **Each tool keeps its own formatting and chart styling,** so the pages do not look identical.
* **One machine.** The CPU slowdown is relative to it, so compare tools within a table, not with
  numbers from other hardware.

## Agent benchmark

How well a coding agent gets ordinary dashboard work done with Hatchmark: six fixed tasks, each run by
a fresh agent that knows Hatchmark only from the installed CLI and `hatchmark docs`, and each graded
against the data rather than against what the agent says it did. The tasks and the graders live in
[`bench/src/agent/`](https://github.com/hatchmark-dev/hatchmark/tree/main/bench/src/agent).

### Results for 0.1.0

Every model passed all six tasks on the first try in each of its 18 runs. The medians per run:

| Model | First-try success | `check` runs | CLI errors | Wall time | Output tokens |
| - | - | - | - | - | - |
| Claude Sonnet 5.5 | 18 of 18 | 1 | 0 | 25 s | 1,317 |
| Claude Opus 5.5 | 18 of 18 | 1 | 0 | 42 s | 2,546 |
| GPT-6.2 Sol | 18 of 18 | 1 | 0 | 55 s | 1,263 |

Three runs per task and model, 54 runs in all, with the `hatchmark` 0.1.0 package installed from npm and
a 20,000-row orders dataset. The agent is a general-purpose coding agent with shell, file and web tools, run with each model in
turn; its system prompt is its own, not Claude Code's or Codex's. No step in any run's transcript
named a path into Hatchmark's source, tests or docs, or a GitHub file page of the repository. The raw results,
with each run's log of where the agent got lost, are in
[`bench/results/agent-0.1.0.json`](https://github.com/hatchmark-dev/hatchmark/blob/main/bench/results/agent-0.1.0.json).

### The tasks

| Task | What the agent is asked | Passes when |
| - | - | - |
| Setup | follow [agent setup](/docs/get-started/agent-setup.md) in a folder holding `orders.csv`, then build a weekly revenue page | a built weekly chart's metric equals paid revenue |
| Refund KPI | add a refund-rate KPI (refunded orders over all orders) to an existing dashboard | a KPI's metric equals refunded orders divided by all orders |
| Channel bars | add a bar chart of revenue by channel, largest first | a bar chart showing every channel, sorted descending by paid revenue |
| Country table | add a table of the 10 countries with the most revenue, with revenue, paid orders and paying customers | a table showing 10 countries, sorted descending by paid revenue, with those three numbers |
| Region filter | let readers filter the dashboard by region | the dashboard has a select filter on `region` |
| Fix check | fix a project with a wrong data path, a misspelt column and a misspelt metric | the dashboard builds and its metrics still equal paid revenue and paid orders |

Every run must also leave `hatchmark check` with no errors and `hatchmark build` writing the
dashboard. Numbers are compared with values computed straight from the CSV by code that shares nothing
with Hatchmark: money to the cent, counts exactly, the refund rate within 10⁻⁹. The grader checks the
rows each block shows, using its sort, order and limit, not just the metric's values. In the setup task the agent stops to ask which data
to use, as the page tells it to, and gets one scripted reply: "Our warehouse export is orders.csv in
this directory. Revenue is the amount of paid orders."

### What each number means

* **First-try success:** the run passed after one session, with no help beyond the prompt and, in
  setup, the one scripted reply.
* **`check` runs:** how many times the agent ran `hatchmark check`. Most tasks took one; fixing a
  broken project took two or three, because the misspelt column only shows once the data file is found.
* **CLI errors:** `check` runs that reported errors plus other `hatchmark` commands that failed.
* **Wall time:** from the prompt to the agent's last message. In setup it includes the wait for the
  scripted reply.
* **Output tokens:** the tokens the model wrote, reasoning included.

### Where agents got lost

* **Fixing a broken project** started the same way for every model: `HM2003` (unknown metric) and
  `HM2010` (data file not found) on the first check. The Claude models then saw `HM2018` (unknown
  column) once the path was right; GPT-6.2 Sol fixed the column before its second check.
* **Setup** went through in most runs. In one, the agent ran commands against a source named
  `orders` before the project defined it, and its first check flagged the same (`HM2001`, unknown
  source); it fixed both before the run ended.
* **Verifying their own work,** agents passed block positions (`--block 2`) where `explain` takes
  block ids, and once grouped a query by a column its metric's source doesn't expose (`HM2052`).
* The docs agents read most were the topic list (`hatchmark docs`), the dashboards and metrics
  references, and the component page of the chart they were adding.

### Compared with working without Hatchmark

The same agent, models, data and machine ran every task a second time without Hatchmark, told to use
any tools and libraries it liked except Hatchmark. In setup, both arms started from `orders.csv`
alone. Only the five tasks that change an existing dashboard used a starting project, and without
Hatchmark it was a plain project with the same overview (two KPIs and a monthly revenue
line): a Node script that writes a static page with Chart.js 4.6.2. Both arms ran in the same
session, interleaved, with three runs per task and model, and both prompts told the agent not to open
apps or windows. Both arms were graded the same way: the built page is opened in headless Chromium
and the numbers it shows, each read next to its own label, date or column, are compared with values
computed from the CSV; a page with a script error fails, and so does a chart task whose chart draws
nothing. In both arms a run counts as correct only when its page passes.

| Model | Arm | Correct page | Wall time | Output tokens |
| - | - | - | - | - |
| Claude Sonnet 5.5 | Hatchmark | 18 of 18 | 26 s | 1,589 |
| Claude Sonnet 5.5 | without Hatchmark | 18 of 18 | 24 s | 2,110 |
| Claude Opus 5.5 | Hatchmark | 18 of 18 | 43 s | 2,553 |
| Claude Opus 5.5 | without Hatchmark | 18 of 18 | 46 s | 4,732 |
| GPT-6.2 Sol | Hatchmark | 18 of 18 | 54 s | 1,310 |
| GPT-6.2 Sol | without Hatchmark | 17 of 17 | 2.0 min | 4,738 |

Both arms built correct pages. Without Hatchmark the agents wrote more, about 5.4 times as many
output tokens to add the region filter (median 7,024 against 1,296). In setup, the Hatchmark arm's
wall time includes the wait for the scripted reply, because the setup page tells the agent to ask
which data to use: a median of 100 s, or 83 s without the wait, against 135 s without Hatchmark,
where no agent asked. One run without Hatchmark (GPT-6.2 Sol, setup) read a page-design guide from
the agent's environment, so it is left out of every number on this page, the judgments included.

**How the pages compare.** Each pair of pages (same model, task and run) was captured at 1440 and
390 px, labelled only A and B, and judged in both orders by Claude Opus 5.5 and GPT-6.2 Astra against
a short rubric: numbers, layout, charts, mobile, polish and overall. Of the 211 judgments with an
overall verdict, the Hatchmark page won 160 and the page without Hatchmark 51, mostly on charts (174)
and mobile (167); one judgment came back without an overall verdict and is counted as missing. The page without Hatchmark won setup (18 of 32), where it led with last week's
revenue and a full weekly table, and the country table (24 of 36), where Hatchmark's table cut a
column at 390 px. The same judge picked the same page in both orders for 98 of the 105 pairs with
both verdicts.

| Task | Hatchmark page won | Page without Hatchmark won |
| - | - | - |
| Setup | 14 | 18 |
| Refund KPI | 28 | 8 |
| Channel bars | 36 | 0 |
| Country table | 12 | 24 |
| Region filter | 36 | 0 |
| Fix check | 34 | 1 (and 1 missing) |

Every screenshot, run record and judgment is in
[`bench/results/compare-0.1.0/`](https://github.com/hatchmark-dev/hatchmark/tree/main/bench/results/compare-0.1.0), so you can judge the pages
yourself.

### Agent benchmark caveats

* **A workflow check, not a model comparison.** Every model passed every task, so these results show
  that the common path works and how much effort it takes. They don't rank the models.
* **One agent harness.** Results with Claude Code, Codex or another agent may differ; `bench/` grades
  their transcripts the same way.
* **Three runs per cell** is enough to catch a broken path.
* **Contamination detection sees only the transcript.** It flags steps that name the repository's
  source, tests or docs paths, or its GitHub file pages; a read that names none of them would pass.
* **Judges see screenshots only,** so interactions such as the region filter are checked by the
  grader, not the judges.

## Run it yourself

You need Git, a Node version the repository supports (`^22.18.0 || >=23.6.0`), pnpm, and Docker with
at least 4 CPUs and 6 GB of memory for Metabase and Superset; the
[bench README](https://github.com/hatchmark-dev/hatchmark/blob/main/bench/README.md#running-it) lists
the rest. From the repository root:

```sh theme={null}
pnpm install --frozen-lockfile && pnpm build
pnpm --filter hatchmark-bench exec playwright install chromium
cd bench
node src/cli.ts dataset
node src/cli.ts setup hatchmark-heavy evidence-heavy metabase-heavy superset-heavy
node src/cli.ts measure hatchmark-heavy evidence-heavy metabase-heavy superset-heavy \
  --profile phone-4g --runs 7 --warmup 1 --out .work/heavy-phone-4g.json
node src/cli.ts report --out .work/heavy-phone-4g.json
node src/cli.ts teardown metabase-heavy superset-heavy
```

The light page uses the same targets without `-heavy`, and `--profile` takes `phone`, `phone-4g`,
`laptop` or `desktop`. A results file holds one set of conditions and refuses runs from another
commit or profile, so use a new `--out` file, or a clean `--work` directory, for each checkout and
profile. Each results file keeps every run with its timings, byte counts and the machine's load, so the
medians can be recomputed. The Markdown report does not show first paint; read it from the saved run
JSON. The [bench README](https://github.com/hatchmark-dev/hatchmark/blob/main/bench/README.md) has every
option and the exact rule for each check.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.