1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages
DocForge2/benchmarks/README.md

56 lines
2.3 KiB
Markdown

# Benchmarks
Milestone 0 records measurements before changing compiler, storage, rendering, or response
contracts.
Run the maintained smoke benchmark:
```bash
make benchmark-smoke
```
Run the 1,000-node generic baseline:
```bash
make benchmark
```
Run the Milestone 1 warm-operation counter and latency smoke gate:
```bash
make benchmark-m1-smoke
```
Run the maintained 1,000-node Milestone 1 benchmark:
```bash
make benchmark-m1
```
The benchmark creates canonical sources, derived state, changesets, rendered output, and caches
only in a disposable temporary directory. It does not read another project, self-host DocForge, or
mutate repository content.
`milestone0-2026-07-29.json` is the clean-tree baseline captured from commit
`fd4759096e90edb13a745621aae4872f23079357`. It uses compact sorted JSON for response sizes and
`time.perf_counter_ns()` for durations. The file is data, not a performance threshold. Later work
must explain fixture or environment changes before comparing results.
The generic fixture exposes whole-source scaling. It does not replace the incremental adapter
equivalence tests and does not claim to measure a portable graph renderer, because Milestone 0 has
no portable graph-planning or graph-rendering contract.
The Milestone 1 harness treats wall time and structured work counters as separate gates. Warm
operations fail if they load a complete project, parse source files, reconstruct an adapter
projection, extract adapter sources, build an index, prepare a render, construct rendered output,
or hash complete rendered output. Its latency ceilings are the Milestone 1 targets, not claims
about all hardware.
Every warmup and measured invocation is validated. The recorded counter ranges also require one
index synchronization for the synchronization operation, no hidden synchronization for reads and
status, one index check for each retrieval snapshot, and exactly one manager request for viewer
status. The 1,000-node run records bounded semantic summaries for exact errors, search, filtering,
backlinks, both traversal directions, paged context, render receipt states, and visualization
freshness. The reported p95 uses the nearest-rank method; with ten samples it is the maximum.
`process_peak_rss_kib` is the cumulative main-process `RUSAGE_SELF` high-water mark and excludes the
detached viewer worker.