vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Keep contributor docs out of the published site
34a6094aa42dfc5760bf3b3d737887b7b093082e · Keenan Nemetz · 20d ago · parent 348a43c3
Keep contributor docs out of the published site Move load testing into DEVELOPMENT, release engineering into RELEASING, and architecture internals into a root-level design guide. Keep the operator-facing storage inventory in the configuration reference. Move workflow, image, and runner references into Reference, place LFS with collaboration, and limit Packages and upgrades to instance administration. Refs: 01M7B6X6RDYBAP3JVA5SYSA1K8
docs/load-testing.md −96
| @@ -1,96 +0,0 @@ | |||
| 1 | # Load testing | ||
| 2 | |||
| 3 | Vole's load harness starts a real server on loopback with temporary state and | ||
| 4 | drives selected routes concurrently. Use it to compare a change or find a route's | ||
| 5 | limit; do not treat loopback results as production capacity predictions. | ||
| 6 | |||
| 7 | The harness is excluded from ordinary tests by the `load` build tag. You need a | ||
| 8 | Vole source checkout, Go, a C compiler, and the SQLite requirements in | ||
| 9 | [Build from source](install.md#build-from-source). | ||
| 10 | |||
| 11 | ## Run a scenario | ||
| 12 | |||
| 13 | Measure every route for five seconds with four workers: | ||
| 14 | |||
| 15 | ```sh | ||
| 16 | VOLE_LOAD_SCENARIO=all VOLE_LOAD_CONCURRENCY=4 VOLE_LOAD_DURATION=5s \ | ||
| 17 | go test -tags load,sqlite_fts5 -run '^TestLoad$' -v ./server | ||
| 18 | ``` | ||
| 19 | |||
| 20 | Measure clones with sixteen workers for thirty seconds: | ||
| 21 | |||
| 22 | ```sh | ||
| 23 | VOLE_LOAD_SCENARIO=clone VOLE_LOAD_CONCURRENCY=16 VOLE_LOAD_DURATION=30s \ | ||
| 24 | go test -tags load,sqlite_fts5 -run '^TestLoad$' -v ./server | ||
| 25 | ``` | ||
| 26 | |||
| 27 | `sqlite_fts5` enables search support. Add `libsqlite3` to the comma-separated tag | ||
| 28 | list when building against system SQLite; without it, the driver uses its bundled | ||
| 29 | copy. Put every required tag on the command line because `-tags` replaces tag | ||
| 30 | settings inherited through `GOFLAGS`. | ||
| 31 | |||
| 32 | ## Settings | ||
| 33 | |||
| 34 | | Variable | Default | Values | | ||
| 35 | |---|---|---| | ||
| 36 | | `VOLE_LOAD_SCENARIO` | `clone` | `all` or one scenario name below | | ||
| 37 | | `VOLE_LOAD_CONCURRENCY` | `4` | Number of parallel workers | | ||
| 38 | | `VOLE_LOAD_DURATION` | `10s` | Duration each worker keeps issuing requests | | ||
| 39 | |||
| 40 | Scenario names: | ||
| 41 | |||
| 42 | ```text | ||
| 43 | clone clone-large blob-small blob-limit | ||
| 44 | raw-small raw-limit raw-range overview | ||
| 45 | tree commits compare change | ||
| 46 | issue activity instance-activity home | ||
| 47 | search-code search-find artifact artifact-range | ||
| 48 | site comment | ||
| 49 | ``` | ||
| 50 | |||
| 51 | `comment` is the only write scenario. It exercises serialized metadata-branch | ||
| 52 | updates; use it after changing issue, review, or other metadata write paths. | ||
| 53 | |||
| 54 | ## Fixtures | ||
| 55 | |||
| 56 | The harness seeds: | ||
| 57 | |||
| 58 | - `demo`: 300 commits, files at several sizes, an issue with five comments, a | ||
| 59 | change with a 4000-line diff and review records, a release artifact, and a | ||
| 60 | `pages` site; | ||
| 61 | - `small`: 50 commits and small files for quick clones; | ||
| 62 | - `large`: 3000 commits and one 16 MiB incompressible blob. | ||
| 63 | |||
| 64 | It builds the `demo` and `large` indexes before measurement. Clone workers use | ||
| 65 | distinct forwarded client addresses so the global HTTP concurrency limit, rather | ||
| 66 | than the per-client limit, is the one under test. Requests beyond the configured | ||
| 67 | limit should produce `503` with `Retry-After`. | ||
| 68 | |||
| 69 | ## Read the results | ||
| 70 | |||
| 71 | Each scenario reports request count, throughput, p50/p90/p99 latency, HTTP | ||
| 72 | statuses, failures, and peaks for process RSS, file descriptors, goroutines, and | ||
| 73 | Git child processes. | ||
| 74 | |||
| 75 | Interpret the measurements with these limits: | ||
| 76 | |||
| 77 | - RSS and goroutines include the in-process harness and clients. | ||
| 78 | - Loopback excludes network latency and TLS cost. | ||
| 79 | - The warm-up covers index construction, not every application cache. | ||
| 80 | - Range scenarios expect `206` and only the requested bytes. | ||
| 81 | - Throughput for the serialized `comment` scenario should remain bounded as | ||
| 82 | concurrency rises; investigate rising errors or collapsing throughput. | ||
| 83 | |||
| 84 | ## Add a scenario | ||
| 85 | |||
| 86 | Scenarios live in `server/load_test.go`. Add a scenario name and step function; | ||
| 87 | workers call that function until the duration expires. The file provides shared | ||
| 88 | fixtures, resource sampling, and reporting. | ||
| 89 | |||
| 90 | ## Next | ||
| 91 | |||
| 92 | - [Configuration](configuration.md#set-resource-limits) — adjust limits from | ||
| 93 | measurements. | ||
| 94 | - [Operations](operations.md#production-baseline) — review production resource | ||
| 95 | and trust controls. | ||
| 96 | - `DEVELOPMENT.md` in the source repository — run ordinary tests and checks. | ||