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
DEVELOPMENT.md +87−5
| @@ -121,7 +121,7 @@ again. Configuration discovery and listener settings are documented in | |||
| 121 | 121 | ||
| 122 | 122 | `cmd/vole` is the command-line front end. The reusable packages implement | |
| 123 | 123 | administration, metadata, CI, storage, clients, and network servers. | |
| 124 | [Architecture § Using Vole as a library](docs/architecture.md#using-vole-as-a-library) | ||
| 124 | [Architecture § Using Vole as a library](ARCHITECTURE.md#using-vole-as-a-library) | ||
| 125 | 125 | contains the package map, and the rest of that page explains the trust and | |
| 126 | 126 | storage models. | |
| 127 | 127 | ||
| @@ -130,9 +130,11 @@ multiple callers in the appropriate library package. | |||
| 130 | 130 | ||
| 131 | 131 | ## Update documentation | |
| 132 | 132 | ||
| 133 | The docs are a MkDocs site rendered from `docs/` into `dist/site`, which | ||
| 134 | `vole pages deploy dist/site` publishes as a snapshot. Build it the way the | ||
| 135 | verify workflow does before you rely on the rendered result: | ||
| 133 | The user and operator documentation is a MkDocs site rendered from `docs/` | ||
| 134 | into `dist/site`, which `vole pages deploy dist/site` publishes as a snapshot. | ||
| 135 | Keep contributor-only material in root-level guides such as this document, | ||
| 136 | `ARCHITECTURE.md`, and `RELEASING.md`, not in the published site. Build the site | ||
| 137 | the way the verify workflow does before you rely on the rendered result: | ||
| 136 | 138 | ||
| 137 | 139 | ```sh | |
| 138 | 140 | python3 -m venv .venv-docs | |
| @@ -217,8 +219,88 @@ When a fuzz run finds a failure, Go writes the input under | |||
| 217 | 219 | `testdata/fuzz/<FuzzName>/`. Commit that input with the fix so it becomes a | |
| 218 | 220 | regression test. | |
| 219 | 221 | ||
| 222 | ## Load test the server | ||
| 223 | |||
| 224 | The load harness starts a real server on loopback with temporary state and | ||
| 225 | drives selected routes concurrently. Use it to compare a change or find a | ||
| 226 | route's limit; do not treat loopback results as production capacity predictions. | ||
| 227 | The `load` build tag keeps the harness out of ordinary tests and the verify | ||
| 228 | workflow. | ||
| 229 | |||
| 230 | Measure every route for five seconds with four workers: | ||
| 231 | |||
| 232 | ```sh | ||
| 233 | VOLE_LOAD_SCENARIO=all VOLE_LOAD_CONCURRENCY=4 VOLE_LOAD_DURATION=5s \ | ||
| 234 | go test -tags load,sqlite_fts5 -run '^TestLoad$' -v ./server | ||
| 235 | ``` | ||
| 236 | |||
| 237 | Measure clones with sixteen workers for thirty seconds: | ||
| 238 | |||
| 239 | ```sh | ||
| 240 | VOLE_LOAD_SCENARIO=clone VOLE_LOAD_CONCURRENCY=16 VOLE_LOAD_DURATION=30s \ | ||
| 241 | go test -tags load,sqlite_fts5 -run '^TestLoad$' -v ./server | ||
| 242 | ``` | ||
| 243 | |||
| 244 | `sqlite_fts5` enables search support. Add `libsqlite3` to the comma-separated | ||
| 245 | tag list when building against system SQLite; without it, the driver uses its | ||
| 246 | bundled copy. Put every required tag on the command line because `-tags` | ||
| 247 | replaces tag settings inherited through `GOFLAGS`. | ||
| 248 | |||
| 249 | | Variable | Default | Values | | ||
| 250 | |---|---|---| | ||
| 251 | | `VOLE_LOAD_SCENARIO` | `clone` | `all` or one scenario name below | | ||
| 252 | | `VOLE_LOAD_CONCURRENCY` | `4` | Number of parallel workers | | ||
| 253 | | `VOLE_LOAD_DURATION` | `10s` | Duration each worker keeps issuing requests | | ||
| 254 | |||
| 255 | Scenario names: | ||
| 256 | |||
| 257 | ```text | ||
| 258 | clone clone-large blob-small blob-limit | ||
| 259 | raw-small raw-limit raw-range overview | ||
| 260 | tree commits compare change | ||
| 261 | issue activity instance-activity home | ||
| 262 | search-code search-find artifact artifact-range | ||
| 263 | site comment | ||
| 264 | ``` | ||
| 265 | |||
| 266 | `comment` is the only write scenario. It exercises serialized metadata-branch | ||
| 267 | updates; use it after changing issue, review, or other metadata write paths. | ||
| 268 | |||
| 269 | The harness seeds: | ||
| 270 | |||
| 271 | - `demo`: 300 commits, files at several sizes, an issue with five comments, a | ||
| 272 | change with a 4000-line diff and review records, a release artifact, and a | ||
| 273 | `pages` site; | ||
| 274 | - `small`: 50 commits and small files for quick clones; | ||
| 275 | - `large`: 3000 commits and one 16 MiB incompressible blob. | ||
| 276 | |||
| 277 | It builds the `demo` and `large` indexes before measurement. Clone workers use | ||
| 278 | distinct forwarded client addresses so the global HTTP concurrency limit, rather | ||
| 279 | than the per-client limit, is the one under test. Requests beyond the configured | ||
| 280 | limit should produce `503` with `Retry-After`. | ||
| 281 | |||
| 282 | Each scenario reports request count, throughput, p50/p90/p99 latency, HTTP | ||
| 283 | statuses, failures, and peaks for process RSS, file descriptors, goroutines, and | ||
| 284 | Git child processes. Interpret the measurements with these limits: | ||
| 285 | |||
| 286 | - RSS and goroutines include the in-process harness and clients. | ||
| 287 | - Loopback excludes network latency and TLS cost. | ||
| 288 | - The warm-up covers index construction, not every application cache. | ||
| 289 | - Range scenarios expect `206` and only the requested bytes. | ||
| 290 | - Throughput for the serialized `comment` scenario should remain bounded as | ||
| 291 | concurrency rises; investigate rising errors or collapsing throughput. | ||
| 292 | |||
| 293 | Scenarios live in `server/load_test.go`. Add a scenario name and step function; | ||
| 294 | workers call that function until the duration expires. The file provides shared | ||
| 295 | fixtures, resource sampling, and reporting. | ||
| 296 | |||
| 297 | ## Release Vole | ||
| 298 | |||
| 299 | [RELEASING.md](RELEASING.md) describes the release workflow, package builds, | ||
| 300 | checksums, SBOM, and reproducibility checks for Vole's own releases. | ||
| 301 | |||
| 220 | 302 | ## Use Vole as a library | |
| 221 | 303 | ||
| 222 | 304 | You can build tools that talk to an instance or embed parts of Vole without | |
| 223 | 305 | running the command. See | |
| 224 | [Architecture § Using Vole as a library](docs/architecture.md#using-vole-as-a-library). | ||
| 306 | [Architecture § Using Vole as a library](ARCHITECTURE.md#using-vole-as-a-library). | ||