Why
Closes #99. Every limit in docs/operations.md § Production baseline was chosen
from reasoning. This is the harness that produces numbers: it drives a real server
on a loopback port with a temporary data directory, so the thing measured is the
code an operator runs.
What it does
- Seeds one repository with a realistic shape: 300 commits; files at 1 KB, 100 KB and 1 MiB; an issue with five comments; a change request with five review comments and an approval by a second account; a release tag with one artifact in the LFS store.
- Runs one scenario end to end: anonymous shallow clones over HTTP. Each
iteration probes
info/refs(so a refusal is reported as the HTTP status it was refused with) and then clones. - Reports per scenario: requests and throughput, p50/p90/p99 latency, statuses, failure reasons, and the peak of RSS, file descriptors, goroutines and the server’s git child processes.
- Reads the repository once before the run, so the index build is not inside the measurement.
A run on this machine (4 workers, 5 s, seeded repo):
clone: concurrency=4 duration=5s
requests 239 (47.8/s)
status 200 239
latency p50=82ms p90=113ms p99=141ms
peak rss=42.8 MiB fds=64 goroutines=53 git-children=1
Command
VOLE_LOAD_SCENARIO=clone VOLE_LOAD_CONCURRENCY=8 VOLE_LOAD_DURATION=30s \
go test -tags load,sqlite_fts5 -run '^TestLoad$' -v ./server
Documented in docs/load-testing.md, linked from the documentation index.
Scope
//go:build load:go test ./...andverifynever run it, and nothing in it ships in the binary. No new module dependency; it uses the integration fixture’s server and helpers.- The remaining #100 scenarios (blobs, pages, compare, search, artifacts, sites) plug in as step functions to the same runner; this change does not add them.
- It measures a warm, in-process server. That is stated in the doc: RSS and goroutines include the harness, child processes are counted by name, and loopback has no network or TLS cost.
Checks
go vet -tags load,sqlite_fts5 ./server; the normalgo test ./server,go test ./...,gofmt, andpython3 scripts/check-links.pyall still pass.- The harness was run end to end at concurrency 4 for 5 s, 239 clones, no errors.