[PR #263] [MERGED] horizon-client --benchmark SCENARIO: benchmark your own machine, report in the shared format #2446

Closed
opened 2026-11-02 15:56:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/263
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ludovic111

Base: main ← Head: feat/benchmark-mode


📝 Commits (8)

  • e0ab3f8 Benchmark report format v1: docs/benchmark-report.md and crates/horizon-bench
  • a500e25 horizon-bench: load average, power source, RSS and CPU time probes; launcher metric names
  • 650ad39 Benchmark report uploads are dated to the day, like every telemetry item
  • 309dea3 horizon-client --benchmark SCENARIO: the perf_bench run from inside the game, written as a report
  • 32695d4 benchmark: a load ends when meshing goes quiet too
  • 0f61ed6 benchmark: Apple GPUs by name (Metal has no vendor ID)
  • 014b1f5 Benchmark reports go to the telemetry outbox, with the benchmark-upload consent only
  • 146c0fd benchmark: a load ends when every streaming stage is idle

📊 Changes

16 files changed (+1460 additions, -7 deletions)

View changed files

📝 Cargo.lock (+9 -0)
📝 Cargo.toml (+1 -1)
➕ crates/horizon-bench/Cargo.toml (+10 -0)
➕ crates/horizon-bench/src/hardware.rs (+259 -0)
➕ crates/horizon-bench/src/lib.rs (+457 -0)
📝 crates/horizon-client/Cargo.toml (+1 -0)
➕ crates/horizon-client/src/benchmark.rs (+427 -0)
📝 crates/horizon-client/src/control.rs (+24 -0)
📝 crates/horizon-client/src/crash.rs (+11 -5)
📝 crates/horizon-client/src/game.rs (+44 -1)
📝 crates/horizon-client/src/game/control.rs (+32 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/telemetry.rs (+47 -0)
📝 docs/README.md (+1 -0)
➕ docs/benchmark-report.md (+124 -0)
📝 docs/benchmark.md (+12 -0)

📄 Description

Stacked on #206 (base) and #247 (its 3 commits show here until #247 merges; review from horizon-client --benchmark). Draft until both merge, then I rebase on main.

What

horizon-client --benchmark standard|village|forest|ocean|mountain [--render-distance N]: the Horizon half of tools/perf_bench.py, run by the game itself so anyone can measure their machine with nothing else installed (brief item 4, "every hardware").

  • crates/horizon-client/src/benchmark.rs: a thread sends the same control commands horizon-ctl would, through the game's own command queue (control::Server::local() / sender(), no socket needed): title → creates saves/horizon-benchmark (seed 1234, creative; replaced by the next run, never a world it didn't create: a marker file) → each scene: teleport, wait until loaded and every streaming stage idle (status.streaming, #269; meshing quiet on builds without it), settle 2 s, fly 12 s recording every frame → report → quit.
  • For the run only (never saved): VSync off, unlimited FPS, no pause or idle cap without focus.
  • Report (docs/benchmark-report.md) to benchmarks/ in the game folder: startup to title / in-world, per scene load time, chunks generated, meshes built, generation rate, FPS / 1% / 0.1% lows, full frame figures + histogram, CPU p50, RSS peak/steady, GPU memory where readable, binary size; hardware incl. GPU name/vendor/driver/backend/kind and display; conditions incl. load average and AC/battery.
  • With the benchmark-upload consent the report (for_upload: dated to the day, no local fields) goes to the telemetry outbox (telemetry::keep_benchmark, tested: nothing kept without that consent, the performance consent is not enough).
  • status now also gives the GPU vendor, driver, device type and the display; fly … raw also returns CPU and GPU times.

Tested

Mac mini M4 Pro, offscreen (screen locked), load average 33: --benchmark village --render-distance 8 wrote a 3.5 KB report: title 8.2 s, in-world 96.6 s, village load 15.1 s (253 chunks, 16.8 chunks/s, 20,585 meshes), 119.9 FPS avg, 1% low 15.4, 0.1% low 10.8, RSS 1.9 GB.

cargo fmt --all -- --check                                          ok
cargo clippy -p horizon-client -p horizon-bench --all-targets -D warnings   ok
cargo test -p horizon-client benchmark / telemetry                  ok (3 benchmark, 1 new telemetry test)

Workspace clippy and the full client suite run again after the rebase on main.

Needs Ludovic

Nothing. A launcher button for it comes once it's in a release.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/263 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/benchmark-mode` --- ### 📝 Commits (8) - [`e0ab3f8`](https://github.com/horizon-rust/horizon/commit/e0ab3f8fccf9790656f85ff0983b70dfe8ffee9e) Benchmark report format v1: docs/benchmark-report.md and crates/horizon-bench - [`a500e25`](https://github.com/horizon-rust/horizon/commit/a500e2570550b4a1ce5f1186856b846228417deb) horizon-bench: load average, power source, RSS and CPU time probes; launcher metric names - [`650ad39`](https://github.com/horizon-rust/horizon/commit/650ad39d854d94b496c2306304dba5999847176a) Benchmark report uploads are dated to the day, like every telemetry item - [`309dea3`](https://github.com/horizon-rust/horizon/commit/309dea385b2fa928527ba6c821e0328e452d2e88) horizon-client --benchmark SCENARIO: the perf_bench run from inside the game, written as a report - [`32695d4`](https://github.com/horizon-rust/horizon/commit/32695d46804cabb792552724ee74ce751169ff81) benchmark: a load ends when meshing goes quiet too - [`0f61ed6`](https://github.com/horizon-rust/horizon/commit/0f61ed6b637ddca1da38a3be793ac644d0e0d281) benchmark: Apple GPUs by name (Metal has no vendor ID) - [`014b1f5`](https://github.com/horizon-rust/horizon/commit/014b1f52678f377b8c1158f308c7323cc0b46b4f) Benchmark reports go to the telemetry outbox, with the benchmark-upload consent only - [`146c0fd`](https://github.com/horizon-rust/horizon/commit/146c0fd3ce2ca6975d6d474c6a9b4a4cb97bd39d) benchmark: a load ends when every streaming stage is idle ### 📊 Changes **16 files changed** (+1460 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+9 -0) 📝 `Cargo.toml` (+1 -1) ➕ `crates/horizon-bench/Cargo.toml` (+10 -0) ➕ `crates/horizon-bench/src/hardware.rs` (+259 -0) ➕ `crates/horizon-bench/src/lib.rs` (+457 -0) 📝 `crates/horizon-client/Cargo.toml` (+1 -0) ➕ `crates/horizon-client/src/benchmark.rs` (+427 -0) 📝 `crates/horizon-client/src/control.rs` (+24 -0) 📝 `crates/horizon-client/src/crash.rs` (+11 -5) 📝 `crates/horizon-client/src/game.rs` (+44 -1) 📝 `crates/horizon-client/src/game/control.rs` (+32 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/telemetry.rs` (+47 -0) 📝 `docs/README.md` (+1 -0) ➕ `docs/benchmark-report.md` (+124 -0) 📝 `docs/benchmark.md` (+12 -0) </details> ### 📄 Description **Stacked on #206 (base) and #247** (its 3 commits show here until #247 merges; review from `horizon-client --benchmark`). Draft until both merge, then I rebase on main. ## What `horizon-client --benchmark standard|village|forest|ocean|mountain [--render-distance N]`: the Horizon half of `tools/perf_bench.py`, run by the game itself so anyone can measure their machine with nothing else installed (brief item 4, "every hardware"). - `crates/horizon-client/src/benchmark.rs`: a thread sends the same control commands `horizon-ctl` would, through the game's own command queue (`control::Server::local()` / `sender()`, no socket needed): title → creates `saves/horizon-benchmark` (seed 1234, creative; replaced by the next run, never a world it didn't create: a marker file) → each scene: teleport, wait until loaded **and every streaming stage idle** (`status.streaming`, #269; meshing quiet on builds without it), settle 2 s, fly 12 s recording every frame → report → quit. - For the run only (never saved): VSync off, unlimited FPS, no pause or idle cap without focus. - Report (docs/benchmark-report.md) to `benchmarks/` in the game folder: startup to title / in-world, per scene load time, chunks generated, meshes built, generation rate, FPS / 1% / 0.1% lows, full frame figures + histogram, CPU p50, RSS peak/steady, GPU memory where readable, binary size; hardware incl. GPU name/vendor/driver/backend/kind and display; conditions incl. load average and AC/battery. - With the **benchmark-upload consent** the report (for_upload: dated to the day, no local fields) goes to the telemetry outbox (`telemetry::keep_benchmark`, tested: nothing kept without that consent, the performance consent is not enough). - `status` now also gives the GPU vendor, driver, device type and the display; `fly … raw` also returns CPU and GPU times. ## Tested Mac mini M4 Pro, offscreen (screen locked), load average 33: `--benchmark village --render-distance 8` wrote a 3.5 KB report: title 8.2 s, in-world 96.6 s, village load 15.1 s (253 chunks, 16.8 chunks/s, 20,585 meshes), 119.9 FPS avg, 1% low 15.4, 0.1% low 10.8, RSS 1.9 GB. ``` cargo fmt --all -- --check ok cargo clippy -p horizon-client -p horizon-bench --all-targets -D warnings ok cargo test -p horizon-client benchmark / telemetry ok (3 benchmark, 1 new telemetry test) ``` Workspace clippy and the full client suite run again after the rebase on main. ## Needs Ludovic Nothing. A launcher button for it comes once it's in a release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:56:14 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2446
No description provided.