Commit Graph

7 Commits

Author SHA1 Message Date
Ludovic Marie a6860bbec6 Merge pull request #263 from ludovic111/feat/benchmark-mode
horizon-client --benchmark SCENARIO: benchmark your own machine, report in the shared format
2026-10-15 07:20:54 +02:00
Ludovic Marie 014b1f5267 Benchmark reports go to the telemetry outbox, with the benchmark-upload consent only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:18 +02:00
Ludovic Marie 309dea385b horizon-client --benchmark SCENARIO: the perf_bench run from inside the game, written as a report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:18 +02:00
Ludovic Marie 7d36d09edd perf_bench.py: a load ends when meshing goes quiet too
Sections wait for their neighbours' light before they are meshed, so the
chunk counts settled while edge sections were still undrawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:03 +02:00
Ludovic Marie 2a91612928 perf_bench.py: repeats, and the benchmark report format v1
Each game runs --repeats times (3) per render distance and writes one v1
report per distance (benchmarks/perf/<label>-rd<N>.json): figures as means
with standard deviation and 95% CI, per-flight frame entries with the fixed
histogram, the hardware without the host name. frames() and summary() match
crates/horizon-bench value for value (tested on the same inputs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:01:03 +02:00
Ludovic Marie e6be303517 docs/benchmark.md: no unmeasured startup figure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:40:12 +02:00
Ludovic Marie b691b5ebaa Benchmark Horizon against vanilla 26.3 and vanilla with performance mods
tools/perf_bench.py runs Horizon, the vanilla 26.3 client and vanilla with
Sodium, Lithium, FerriteCore and ImmediatelyFast through the same steps:
fresh world (seed 1234, creative) per render distance, start to title, start
to in-world, then per scene teleport, chunk load, settle and a fixed 192-block
flight. Every frame time is kept and one function computes average FPS, 1% and
0.1% lows, p50/p95/p99/p99.9 and a frame-time histogram for every game; RSS is
sampled from outside the process for every game. One options.txt (vanilla's
keys, Fancy preset values with a Custom preset so the render distance holds)
is written for all of them.

Vanilla is driven by a dev-only Fabric mod (mods/horizon/src/bench) compiled
against the user's own client jar: it creates the world with
WorldOpenFlows.createFreshLevel, teleports with /tp and places the player on
the path every frame as horizon-ctl fly does. Nothing of the game is
redistributed and the performance mods are fetched from Modrinth with the
hashes pinned in packs/mods.lock.json.

Horizon side: `fly ... PITCH raw` also replies with every frame time, and
--offscreen drives frames from the event loop, so a window nobody sees (a
locked macOS session) still renders.

docs/benchmark.md describes what is measured, how fairness is kept, the
caveats and how to reproduce it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:40:12 +02:00