One endpoint. Real numbers.
litebenchy is a single-binary load-test runner. It drives a closed-loop k6 sweep at fixed concurrency steps, measures throughput and latency, captures a sample response per step, and renders a self-contained HTML report.
Quick start
Prebuilt binaries are available from the
GitHub Releases page — no Go
toolchain is needed. k6 is not bundled: litebenchy checks next to the binary, then bin/,
then PATH. If it is missing, it prints
the official k6 download link.
# download a release, then:
./litebenchy --url https://app.example.com/hello \
--cell app:none --vus 10,25,50,100 --duration 10s --reps 3
# download a release, then:
.\litebenchy.exe `
--url https://app.example.com/hello `
--cell app:none --vus 10,25,50,100 --duration 10s --reps 3
go build -o litebenchy ./cmd/litebenchy
./litebenchy --url https://app.example.com/hello \
--cell app:none --vus 10,25,50,100 --duration 10s --reps 3
Interactive TUI: ./litebenchy (Windows: .\litebenchy.exe). Add --k6 if auto-detection cannot find it.
The target URL is hit as deployed. Any reverse proxy, TLS terminator, or CDN in front of it is part of the measurement.
How it works
- Generates a k6 script from the VU steps, think time, method, body, and auth config.
- Runs a closed loop: each VU sends one request, waits for the response, then sleeps the think time.
setup()performs an optional pre-auth request once; every VU reuses the resulting session.- Captures the first successful response per step, capped by
--sample-limit. - Parses k6's summary and writes
results/litebenchy-<cell>-<timestamp>.html.
Flags
| Flag | Default | Description |
|---|---|---|
--url | — | Target URL. Supplying it (or --yes) runs non-interactively. |
--cell | target | Run label, e.g. go:mysql or go:mysql:read. Used only in the report title/filename. |
--sla | 1000 | Target p95 in milliseconds. |
--think | 0.2 | Seconds each VU sleeps between requests. |
--real-think | 5 | Assumed real-user think time for the concurrent-user estimate. |
--sample-limit | 16 | Max response-body size in KB captured per step; 0 captures the full body. |
--vus | 10,25,50,100,200 | Comma-separated concurrency steps. |
--duration | 10s | Duration of each VU step. |
--reps | 3 | Repetitions of the whole sweep. |
--out | results | Report output directory. |
--k6 | auto | Path to k6. If omitted: next to litebenchy, then bin/, then PATH. |
--yes | false | Run without the TUI; requires --url. |
--insecure | false | Skip TLS verification for self-signed or private CAs. |
--host | — | DNS override host=ip. Repeatable. |
--header | — | Request header Name: value. Repeatable; $ENV is expanded. |
--cookie | — | Cookie name=value. Repeatable; $ENV is expanded. |
--basic | — | Basic auth user:pass. |
--method | GET | HTTP method for the measured request. |
--body | — | Request body for the measured request. |
--pre-auth-url | — | URL hit once in k6 setup(); its cookies are reused by every VU. |
--pre-auth-method | GET | Method for the pre-auth request. |
--pre-auth-body | — | Body for the pre-auth request. |
Request placeholders
{id} in the target URL is replaced per request with a random integer from
1..10000. Use it for point-read tests such as
https://app.example.com/db?id={id}.
Authentication
One shared session is established once and reused by every VU — this is a load test, not a functional suite.
Examples use bash/zsh. On PowerShell use .\litebenchy.exe and $env:API_TOKEN = "…".
Bearer token / API key
export API_TOKEN="…"
./litebenchy --url https://api.example.com/items \
--header 'Authorization: Bearer $API_TOKEN'
Basic auth
./litebenchy --url https://app.example.com/items \
--basic user:pass
Static cookie
./litebenchy --url https://app.example.com/ \
--cookie 'session=abc123'
Pre-auth URL
./litebenchy --url https://app.example.com/dashboard \
--pre-auth-url 'https://app.example.com/login' \
--pre-auth-method POST \
--pre-auth-body 'user=me&pass=$APP_PASS'
$ENV_NAME in header, cookie, and body values. Secrets are never written
to the report or the reproduce command — only header/cookie names and a redacted pre-auth
URL are shown.
Reading the report
- At-SLA capacity — the highest step whose p95 is within the target and whose failure rate is under 5%.
- Break point — the first VU step that leaves the SLA or starts failing.
- Per-rep best — each repetition's best step; the winning rep is highlighted.
- Charts — RPS and p95 against VUs, one line per rep, with the SLA drawn as a dashed line.
- Samples — the document icon on a step opens the captured response body.
- Concurrent users —
RPS × (real think time + service time)at the at-SLA point.
The report also records the method, think time, auth mode, header/cookie names, and a reproduce command.
Benchmark fixtures
The repository includes five identical, minimal fixtures used to measure a deployment's
web-stack capacity. Each exposes the same routes and returns the same deterministic
/hello bundle.
Table A — stack floor
Five runtime floors, no database, measured on GET /hello.
- Go —
net/http - Rust —
axum+ Tokio - Node —
node:http - Python —
uvicorn+ minimal ASGI - PHP — FrankenPHP worker mode
Table B — database floor
The lightest stack paired with SQLite, MySQL, and Postgres. Reads and writes are separate
cells: GET /db?id={id} and POST /write.
- SQLite — WAL,
synchronous=FULL - MySQL — tuned for a small box, durable commits
- Postgres —
synchronous_commit=on,fsync=on
Routes
| Route | Work |
|---|---|
GET /hello | Deterministic unit-of-work bundle: JSON, numbers, Σi², sha256, reverse. |
GET /hello?work=0 | JSON only — the pure HTTP floor. |
GET /db?id=N | One row from the configured database. |
POST /write | One durable insert; returns the new row id. |
GET /health | Readiness check. |
Published images: mtsandeep/litebenchy
— tags go, rust, node, python,
php, plus version and SHA tags. Fixtures live in bench/.
Build locally with docker build -t litebenchy:go bench/apps/go, then run a
cell with one of the composes in bench/compose/.
docs/BENCHMARK-SPEC.md in the repository.
Caveats
- This is a single-endpoint, closed-loop test. RPS is throughput under the test's think time, not a user count.
- The target is hit as deployed; any reverse proxy, CDN, or TLS terminator is included.
- Reads are warm-cache. SQLite is in-process; MySQL and Postgres are networked.
- Real pages fan out to many endpoints and arrive in bursts — treat At-SLA RPS as a capacity ceiling.