[PR #7132] [MERGED] perf_bench: PERF_BENCH_TRACE, each load's timeline for Horizon and vanilla #7363

Closed
opened 2026-11-03 06:38:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7132
Author: @ludovic111
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/chunk-arrival


📝 Commits (1)

  • 18ea142 perf_bench: PERF_BENCH_TRACE, each load's timeline for Horizon and vanilla

📊 Changes

3 files changed (+44 additions, -1 deletions)

View changed files

📝 docs/benchmark.md (+1 -1)
📝 mods/horizon/src/bench/java/dev/horizonlab/bench/VanillaBench.java (+27 -0)
📝 tools/perf_bench.py (+16 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

PERF_BENCH_TRACE=<file> writes each scene load's timeline to one JSON-lines file, for both games. It shows when the columns arrive and when the load ends.

  • Horizon: a {"tp", "scene"} line at each teleport, then every status wait_loaded reads, about every 50 ms. Each line has resident and generated chunks, pending_chunks, the streaming stages and fps.
  • Vanilla: the driver mod writes a progress event every 50 ms while it loads. Each event has its loaded chunk count, hasRenderedAllSections, and around: how many chunks within the render distance minus one it holds, out of how many. That is the set the driver's chunksAround waits for. perf_bench copies these events into the same file.

Nothing changes when the variable is unset.

Why: this is how I checked where columns wait between the socket and the chunk map on a vanilla server (RD 32, Mac mini, --server vanilla):

  • Horizon's pending_chunks stays at 0 almost the whole load. The client acks each batch as soon as it arrives, about one ack per server tick.
  • The server sends about 10 columns per batch, though our quota is 64. PlayerChunkSender only queues chunks that are ready, so the server's loading speed sets the rate.
  • JFR on the server shows the same work with either client: parsing, light, region I/O, and no generation.

Self-check:

Check Result
Scope ✅ 3 files, +44 −1
Public tree ✅
Python tests ✅ 612 passed
Rust ➖ no Rust change

The vanilla driver change was compiled and run in 3 vanilla bench passes.

🤖 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/7132 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/chunk-arrival` --- ### 📝 Commits (1) - [`18ea142`](https://github.com/horizon-rust/horizon/commit/18ea1429d8c7153c807430196a08f05ad26f3d64) perf_bench: PERF_BENCH_TRACE, each load's timeline for Horizon and vanilla ### 📊 Changes **3 files changed** (+44 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/benchmark.md` (+1 -1) 📝 `mods/horizon/src/bench/java/dev/horizonlab/bench/VanillaBench.java` (+27 -0) 📝 `tools/perf_bench.py` (+16 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. `PERF_BENCH_TRACE=<file>` writes each scene load's timeline to one JSON-lines file, for both games. It shows when the columns arrive and when the load ends. - **Horizon:** a `{"tp", "scene"}` line at each teleport, then every status `wait_loaded` reads, about every 50 ms. Each line has resident and generated chunks, `pending_chunks`, the streaming stages and fps. - **Vanilla:** the driver mod writes a `progress` event every 50 ms while it loads. Each event has its loaded chunk count, `hasRenderedAllSections`, and `around`: how many chunks within the render distance minus one it holds, out of how many. That is the set the driver's `chunksAround` waits for. perf_bench copies these events into the same file. Nothing changes when the variable is unset. **Why:** this is how I checked where columns wait between the socket and the chunk map on a vanilla server (RD 32, Mac mini, `--server vanilla`): - Horizon's `pending_chunks` stays at 0 almost the whole load. The client acks each batch as soon as it arrives, about one ack per server tick. - The server sends about 10 columns per batch, though our quota is 64. `PlayerChunkSender` only queues chunks that are ready, so the server's loading speed sets the rate. - JFR on the server shows the same work with either client: parsing, light, region I/O, and no generation. **Self-check:** | Check | Result | | --- | --- | | Scope | ✅ 3 files, +44 −1 | | Public tree | ✅ | | Python tests | ✅ 612 passed | | Rust | ➖ no Rust change | The vanilla driver change was compiled and run in 3 vanilla bench passes. 🤖 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-03 06:38:22 +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#7363
No description provided.