Thanks for your interest in improving loadtest! This project values correctness, honest measurement, and a clean, layered architecture.
git clone https://github.com/alphaBitCore/loadtest
cd loadtest
make test # build + vet + race tests
make cover # enforce the per-package coverage gate (≥95% on library packages)The packages form an acyclic dependency graph; keep it that way:
protocol, metrics (leaves, no internal deps)
config → protocol, metrics
engine → config, protocol, metrics
report → config, metrics
cmd/loadtest → config, engine, report (thin wiring only)
- Adding a provider/wire format? Write one file in
protocol/that implementsProtocoland self-registers ininit(). Do not touch the engine, metrics, or report — that is the whole point of the abstraction. - Hot-path code (anything called per request/turn) must stay allocation-light and lock-free. The metrics aggregator is lock-free by design; do not reintroduce a mutex on the per-request path. Add a benchmark if you change it.
- Keep
cmd/loadtest/main.gothin. Testable logic belongs in a library package.
make fmt—gofmtmust be clean (CI rejects unformatted code).make test—go vetclean, all tests pass under-race.make cover— every library package stays at ≥95% line coverage. New code needs tests; prefer extracting pure functions to make edge cases testable rather than leaving them uncovered.- Update
DESIGN.md/README.mdif you change behaviour or the config schema. - Do not commit secrets, real gateway domains, or API keys. Profiles must use
localhosttargets and theREPLACE_WITH_VKplaceholder.
- Small, focused commits with a clear subject (e.g.
feat(protocol): add gemini adapter). - Explain why in the PR description, not just what.
- The CI workflow (build, vet, gofmt, race tests, coverage gate) must be green.
Open an issue using the templates in .github/ISSUE_TEMPLATE/. For anything that
looks like a measurement-correctness problem (coordinated omission, percentile
accuracy, generator-side saturation misattributed to the server), include the
profile and the report-*.txt generator-health section.
By contributing you agree that your contributions are licensed under the Apache License 2.0 (see LICENSE).