[PR #6985] [MERGED] tools: pacing_bench travel scenarios (elytra, portal, join); HORIZON_SPIKES shows the time between frames #7252

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

📋 Pull Request Information

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

Base: main ← Head: perf/pacing-scenarios-2


📝 Commits (4)

  • 3393b39 tools: pacing_bench elytra, portal and join scenarios; HORIZON_SPIKES shows the time between frames
  • cd09178 Merge remote-tracking branch 'origin/main' into perf/pacing-scenarios-2
  • b4d558b rustfmt
  • 0120978 Merge remote-tracking branch 'origin/main' into perf/pacing-scenarios-2

📊 Changes

2 files changed (+143 additions, -46 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+22 -8)
📝 tools/pacing_bench.py (+121 -38)

📄 Description

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

The smoothness benchmark gets travel scenarios, and HORIZON_SPIKES now sees the time spent between frames. Both found the stalls fixed in #6898 (teleport) and #6952 (join).

tools/pacing_bench.py: new scenarios

  • elytra: a 990-block straight line at 33 blocks/s (30 s of new terrain).
  • portal: two trips through a Nether portal built at far places. The scenario checks that it arrives in the Nether.
  • join: joining a dedicated server of the same build (seed 1234, offline, the client's view distance), in a game of its own started on the title screen. It records from connect until 5 s after the view is loaded.
  • nether now travels through chat /execute in … run tp, as a player would. The control socket's command waits on the server thread inside the frame: a 40–70 ms stall that no player sees.
  • Spike lines are sorted by frame time plus the time before the frame.

HORIZON_SPIKES (off by default, so nothing changes for players):

  • A slow-frame line now also comes when the wait before the frame (idle: the control socket, world entry, pads) passed the threshold: slow frame 1.8 ms, cpu 1.8 ms, 25.8 ms before it (0 ticks): control 25.7, …. Those steps are spans.
  • poll_remote is a span inside update_world.

Before this change, a 45 ms frame on joining a server showed up in the frame stats with no spike line at all.

Baseline (Mac mini M4 Pro, main b82e2a4b3, RD 32, 1280×720 offscreen, ×2):

scenario max frame (ms) frames >33 ms slowest CPU span
teleport 13–15 0 poll_remote 12–16 ms (→ #6898)
nether (command) 61–67 1–3 control wait (bench artifact, now through chat: max 18 ms)
portal 13–18 0 GPU waits
fly64 6–11 0 –
elytra 4–5 0 –
join 42–50 1 build_registries 20 ms (→ #6952)

pr_ready (tools/pr_ready.py --quick on playhorizon, against origin/main at d359f7fd6, 4 min 54 s)

Check Result
Scope ✅ 2 files, +143 −46
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 610 passed (1 min 6 s)
rustfmt ✅ (13 s)
clippy ✅ (1 min 7 s)
tests: horizon-client ✅ 652 passed (2 min 18 s)
doc tests ✅ 0 passed (3 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 63 affected, to run in CI (--quick): armor_stand_frost, armor_stand_turtle_egg, arrow, arrow_wind_charge, blending, block_particles, block_removal, block_tint, boat_authority, boat_paddle_reset, boat_submerged, breaking_model and 51 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/6985 **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/pacing-scenarios-2` --- ### 📝 Commits (4) - [`3393b39`](https://github.com/horizon-rust/horizon/commit/3393b393bf37fcf99c7b333f8f6f130fc21e8f02) tools: pacing_bench elytra, portal and join scenarios; HORIZON_SPIKES shows the time between frames - [`cd09178`](https://github.com/horizon-rust/horizon/commit/cd091784aaaa44aa1907b5cc10824636aedd3aa6) Merge remote-tracking branch 'origin/main' into perf/pacing-scenarios-2 - [`b4d558b`](https://github.com/horizon-rust/horizon/commit/b4d558b65e6671f30c750a02bc90c33bf5db5b4b) rustfmt - [`0120978`](https://github.com/horizon-rust/horizon/commit/0120978873cb3c34330403615c316f32ac94debc) Merge remote-tracking branch 'origin/main' into perf/pacing-scenarios-2 ### 📊 Changes **2 files changed** (+143 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+22 -8) 📝 `tools/pacing_bench.py` (+121 -38) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. The smoothness benchmark gets travel scenarios, and HORIZON_SPIKES now sees the time spent between frames. Both found the stalls fixed in #6898 (teleport) and #6952 (join). **`tools/pacing_bench.py`**: new scenarios - `elytra`: a 990-block straight line at 33 blocks/s (30 s of new terrain). - `portal`: two trips through a Nether portal built at far places. The scenario checks that it arrives in the Nether. - `join`: joining a dedicated server of the same build (seed 1234, offline, the client's view distance), in a game of its own started on the title screen. It records from `connect` until 5 s after the view is loaded. - `nether` now travels through `chat /execute in … run tp`, as a player would. The control socket's `command` waits on the server thread inside the frame: a 40–70 ms stall that no player sees. - Spike lines are sorted by frame time plus the time before the frame. **HORIZON_SPIKES** (off by default, so nothing changes for players): - A slow-frame line now also comes when the wait *before* the frame (`idle`: the control socket, world entry, pads) passed the threshold: `slow frame 1.8 ms, cpu 1.8 ms, 25.8 ms before it (0 ticks): control 25.7, …`. Those steps are spans. - `poll_remote` is a span inside `update_world`. Before this change, a 45 ms frame on joining a server showed up in the frame stats with no spike line at all. **Baseline** (Mac mini M4 Pro, main b82e2a4b3, RD 32, 1280×720 offscreen, ×2): | scenario | max frame (ms) | frames >33 ms | slowest CPU span | |---|---|---|---| | teleport | 13–15 | 0 | `poll_remote` 12–16 ms (→ #6898) | | nether (`command`) | 61–67 | 1–3 | `control` wait (bench artifact, now through chat: max 18 ms) | | portal | 13–18 | 0 | GPU waits | | fly64 | 6–11 | 0 | – | | elytra | 4–5 | 0 | – | | join | 42–50 | 1 | `build_registries` 20 ms (→ #6952) | **pr_ready** (`tools/pr_ready.py --quick` on playhorizon, against origin/main at d359f7fd6, 4 min 54 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +143 −46 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 610 passed (1 min 6 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (1 min 7 s) | | tests: horizon-client | ✅ 652 passed (2 min 18 s) | | doc tests | ✅ 0 passed (3 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 63 affected, to run in CI (--quick): armor_stand_frost, armor_stand_turtle_egg, arrow, arrow_wind_charge, blending, block_particles, block_removal, block_tint, boat_authority, boat_paddle_reset, boat_submerged, breaking_model and 51 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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:36:29 +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#7252
No description provided.