Add repeatable benchmark scenarios and bring server and client within the budgets in docs/ARCHITECTURE.md.
Acceptance
make bench reports server p50 and p99 tick time and the client draw-call, triangle and memory counts.
Software rendering can't prove real-GPU frame rates, so record draw-call and triangle budgets here and leave final frame-rate confirmation to R6.
Results and before-and-after numbers are in the DEVLOG.
**Depends on:** M8, N8, A5, A6
Add repeatable benchmark scenarios and bring server and client within the budgets in `docs/ARCHITECTURE.md`.
**Acceptance**
- `make bench` reports server p50 and p99 tick time and the client draw-call, triangle and memory counts.
- Software rendering can't prove real-GPU frame rates, so record draw-call and triangle budgets here and leave final frame-rate confirmation to R6.
- Results and before-and-after numbers are in the DEVLOG.
claude
added this to the v0.9 Hardening milestone 2026-11-09 05:29:40 +00:00
make bench (tools/bench.sh, tools/bench_report.gd):
Server: runs the headless server with 24 bots, unthrottled, for 12,000 ticks on seeds 2, 7 and 20261109, and reports p50, p99 and max tick time.
Client: renders six frames in the capture container (whole island, barge, landed, a build, the final players, a crowded pine forest) and reports draw calls, shadow draws, primitives, objects, nodes, and video and static memory for each.
Fails on anything over budget. The report goes to build/bench/report.txt and .json.
Budgets are recorded in docs/ARCHITECTURE.md: p99 tick 12 ms; per frame, at most 2,000 draw calls and 2,000,000 primitives across all passes; 1 GiB of video memory and 512 MiB of static memory.
Every tools/capture.sh report now includes a render field with these counts.
Fix found by the bench: the barge frame came out at 2,197 draw calls, over budget. Each figure part had one surface per colour, about 43 per figure, all drawn again for shadows. FigureRig now merges each part into one surface per finish (coat, gilt, plain), with the Palette colours as vertex colours. Result: 1,207 draw calls, the same primitives, and the same look (checked with figure_close and the barge capture).
Before the fix: barge 2,197 draws, landed 612, built 613, final 815.
The server's max tick includes one tick of about 1.7 s per match. That's an artifact of running unthrottled: the 15 s results screen passes in a fraction of a second, so the main thread waits for the worker still building the next island. At the real 30 Hz the worker finishes long before the lobby opens. This is documented in ARCHITECTURE.
Tests:test_figure_rig checks that each part has one surface per finish, keeps every colour and every triangle, and uses vertex-coloured materials. make check passes, and so does make bench.
Not verified: real GPU frame rates. Software rendering only counts what is drawn, so the 60 fps check stays with R6.
— tidewall-build
Done in 9ce0865.
**What changed**
- `make bench` (`tools/bench.sh`, `tools/bench_report.gd`):
- Server: runs the headless server with 24 bots, unthrottled, for 12,000 ticks on seeds 2, 7 and 20261109, and reports p50, p99 and max tick time.
- Client: renders six frames in the capture container (whole island, barge, landed, a build, the final players, a crowded pine forest) and reports draw calls, shadow draws, primitives, objects, nodes, and video and static memory for each.
- Fails on anything over budget. The report goes to `build/bench/report.txt` and `.json`.
- Budgets are recorded in `docs/ARCHITECTURE.md`: p99 tick 12 ms; per frame, at most 2,000 draw calls and 2,000,000 primitives across all passes; 1 GiB of video memory and 512 MiB of static memory.
- Every `tools/capture.sh` report now includes a `render` field with these counts.
- **Fix found by the bench:** the barge frame came out at 2,197 draw calls, over budget. Each figure part had one surface per colour, about 43 per figure, all drawn again for shadows. `FigureRig` now merges each part into one surface per finish (coat, gilt, plain), with the Palette colours as vertex colours. Result: 1,207 draw calls, the same primitives, and the same look (checked with `figure_close` and the barge capture).
**Numbers (after)**
```
seed p50 us p99 us
2 659 2031
7 603 2139
20261109 533 1859
frame draws shadow prims
match_lobby 340 69 219682
match_barge 1207 680 586687
match_landed 430 214 268404
match_built 457 213 414184
match_final 685 351 697838
props_forest 135 81 130856
```
Before the fix: barge 2,197 draws, landed 612, built 613, final 815.
The server's max tick includes one tick of about 1.7 s per match. That's an artifact of running unthrottled: the 15 s results screen passes in a fraction of a second, so the main thread waits for the worker still building the next island. At the real 30 Hz the worker finishes long before the lobby opens. This is documented in ARCHITECTURE.
**Tests:** `test_figure_rig` checks that each part has one surface per finish, keeps every colour and every triangle, and uses vertex-coloured materials. `make check` passes, and so does `make bench`.
**Not verified:** real GPU frame rates. Software rendering only counts what is drawn, so the 60 fps check stays with R6.
— tidewall-build
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Depends on: M8, N8, A5, A6
Add repeatable benchmark scenarios and bring server and client within the budgets in
docs/ARCHITECTURE.md.Acceptance
make benchreports server p50 and p99 tick time and the client draw-call, triangle and memory counts.Done in
9ce0865.What changed
make bench(tools/bench.sh,tools/bench_report.gd):build/bench/report.txtand.json.docs/ARCHITECTURE.md: p99 tick 12 ms; per frame, at most 2,000 draw calls and 2,000,000 primitives across all passes; 1 GiB of video memory and 512 MiB of static memory.tools/capture.shreport now includes arenderfield with these counts.FigureRignow merges each part into one surface per finish (coat, gilt, plain), with the Palette colours as vertex colours. Result: 1,207 draw calls, the same primitives, and the same look (checked withfigure_closeand the barge capture).Numbers (after)
Before the fix: barge 2,197 draws, landed 612, built 613, final 815.
The server's max tick includes one tick of about 1.7 s per match. That's an artifact of running unthrottled: the 15 s results screen passes in a fraction of a second, so the main thread waits for the worker still building the next island. At the real 30 Hz the worker finishes long before the lobby opens. This is documented in ARCHITECTURE.
Tests:
test_figure_rigchecks that each part has one surface per finish, keeps every colour and every triangle, and uses vertex-coloured materials.make checkpasses, and so doesmake bench.Not verified: real GPU frame rates. Software rendering only counts what is drawn, so the 60 fps check stays with R6.
— tidewall-build