Skip to content
RelKit
Esc
↑↓navigate↵open⌘Jpreview
On this page

Benchmarks

How fast relkit dev reloads and how much memory relkit check uses, measured for every release on generated apps with 10, 100 and 500 functions.

RelKit measures its development loop on generated applications with 10, 100 and 500 functions, one route each. A measurement is three runs in one container with fixed limits for CPU, memory and disk, and the median of the three decides. A run counts only when the container enforced every limit and the machine was otherwise quiet. For every size a run records:

  • Reload p95: the 95th percentile, over 20 saves, of the time from writing a handler file to the first response that serves the new code, under relkit dev.
  • relkit check peak memory against plain tsc on the same sources: the largest resident memory of each command’s whole process tree. The difference is what relkit check adds to your own compiler; the ratio is shown beside it.

The same container runs on two hosts. The reference machine decides whether a budget is met: a release needs a valid measurement from it. The GitHub runner measures every release candidate beside the previous release, and fails when reload or memory at 100 functions is more than 15% worse.

The budgets are reload p95 under 300 ms, 1 s and 2 s, and a limit for each size on the memory relkit check adds. The budgets for 100 functions decide whether a release is ready; a miss at 10 or 500 functions is reported. How the dev loop reloads explains what a reload does.

Reference machine

Measured 2026-12-02 at commit 0d715e63affe on Apple M1 Pro (10 cores, 16384 MiB), darwin 24.6.0 arm64, Docker 29.8.2 on Docker Desktop.

Every run read these limits back from its own control group: 4 CPUs on cores 0-3, 6144 MiB of memory without swap, and 100 MiB/s for reads and for writes on /dev/vda.

The median of 3 runs:

Functions Reload p95 Budget relkit check peak tsc peak Ratio Added Budget
10 502 ms under 300 ms: not met 441 MiB 220 MiB 1.96× 214.9 MiB at most 260 MiB: met
100 909 ms under 1000 ms: met 519 MiB 315 MiB 1.63× 198.8 MiB at most 260 MiB: met
500 3219 ms under 2000 ms: not met 747 MiB 651 MiB 1.13× 87.8 MiB at most 150 MiB: met

Each run:

Run Functions Reload p95 Added memory Other work on the host
1 10 546 ms 243.9 MiB 1.75 of 10 CPUs
1 100 956 ms 219.9 MiB 1.75 of 10 CPUs
1 500 3422 ms 70.0 MiB 1.75 of 10 CPUs
2 10 488 ms 210.1 MiB 1.35 of 10 CPUs
2 100 909 ms 197.8 MiB 1.35 of 10 CPUs
2 500 2985 ms 87.8 MiB 1.35 of 10 CPUs
3 10 502 ms 214.9 MiB 0.42 of 10 CPUs
3 100 852 ms 198.8 MiB 0.42 of 10 CPUs
3 500 3219 ms 95.8 MiB 0.42 of 10 CPUs

GitHub runner

Measured 2026-12-02 at commit 0d715e63affe on github-actions ubuntu24 20261122.23.1, AMD EPYC 9V74 80-Core Processor (4 cores, 15984 MiB), linux 7.0.0-1020-azure x64, Docker 28.0.4 on Ubuntu 24.04.5 LTS.

Every run read these limits back from its own control group: 4 CPUs on cores 0-3, 6144 MiB of memory without swap, and 100 MiB/s for reads and for writes on /dev/nvme0n1.

The median of 3 runs:

Functions Reload p95 Budget relkit check peak tsc peak Ratio Added Budget
10 756 ms under 300 ms: not met 446 MiB 223 MiB 2.03× 225.5 MiB at most 260 MiB: met
100 1253 ms under 1000 ms: not met 536 MiB 322 MiB 1.66× 213.6 MiB at most 260 MiB: met
500 3944 ms under 2000 ms: not met 754 MiB 660 MiB 1.15× 97.0 MiB at most 150 MiB: met

Each run:

Run Functions Reload p95 Added memory Other work on the host
1 10 689 ms 225.5 MiB 0.04 of 4 CPUs
1 100 1314 ms 211.5 MiB 0.04 of 4 CPUs
1 500 4011 ms 97.0 MiB 0.04 of 4 CPUs
2 10 756 ms 219.8 MiB 0.04 of 4 CPUs
2 100 1253 ms 224.6 MiB 0.04 of 4 CPUs
2 500 3944 ms 109.0 MiB 0.04 of 4 CPUs
3 10 756 ms 231.5 MiB 0.04 of 4 CPUs
3 100 1206 ms 213.6 MiB 0.04 of 4 CPUs
3 500 3876 ms 51.5 MiB 0.04 of 4 CPUs

Run it yourself

With Docker running and nothing else busy, from a checkout:

bun scripts/benchmark-dev-loop.ts --container --runs 3
bun scripts/check-dev-loop-budgets.ts --report test-results/dev-loop-benchmark/report.json

The first command writes the report and the second judges it. --sizes 10,100 limits the sizes. Without --container the benchmark runs directly on your machine, after bun run build; such a report is useful for comparing two changes and is not judged.