litebenchy
documentation

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

The report is self-contained: inline CSS, inline chart rendering, no CDN, no external dependencies. Use the Print / Save PDF button to export it.

Flags

FlagDefaultDescription
--url—Target URL. Supplying it (or --yes) runs non-interactively.
--celltargetRun label, e.g. go:mysql or go:mysql:read. Used only in the report title/filename.
--sla1000Target p95 in milliseconds.
--think0.2Seconds each VU sleeps between requests.
--real-think5Assumed real-user think time for the concurrent-user estimate.
--sample-limit16Max response-body size in KB captured per step; 0 captures the full body.
--vus10,25,50,100,200Comma-separated concurrency steps.
--duration10sDuration of each VU step.
--reps3Repetitions of the whole sweep.
--outresultsReport output directory.
--k6autoPath to k6. If omitted: next to litebenchy, then bin/, then PATH.
--yesfalseRun without the TUI; requires --url.
--insecurefalseSkip 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.
--methodGETHTTP 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-methodGETMethod 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'
Prefer $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

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.

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.

Routes

RouteWork
GET /helloDeterministic unit-of-work bundle: JSON, numbers, Σi², sha256, reverse.
GET /hello?work=0JSON only — the pure HTTP floor.
GET /db?id=NOne row from the configured database.
POST /writeOne durable insert; returns the new row id.
GET /healthReadiness 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/.

One cell at a time keeps the comparison clean: the app and database should not compete for the same box. The full methodology and decision log live in docs/BENCHMARK-SPEC.md in the repository.

Caveats