[PR #6817] [MERGED] Benchmark report: GPU time per render pass before each flight #7115

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

📋 Pull Request Information

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

Base: main ← Head: perf/bench-gpu-passes


📝 Commits (1)

  • d884507 Benchmark report: GPU time per render pass before each flight

📊 Changes

2 files changed (+91 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/benchmark.rs (+90 -1)
📝 docs/benchmark-report.md (+1 -0)

📄 Description

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

Why

Players' benchmark reports say how long a frame takes on the GPU (gpu_p50_ms), not where that time goes. The Intel iGPU reports we have are GPU-bound and their GPU time grows with the render distance (HD 620, forest: 3.0 ms at RD 6, 4.7 ms at RD 10, 20 ms at RD 24). From the total alone we can't tell whether the cost is terrain geometry, the culling passes or full-screen effects, and there is no Intel GPU here to measure on.

What

horizon-client --benchmark already waits 2 s at each scene's start before its flight. That wait now:

  1. turns on the game's own GPU pass timing (gpu-passes on, the same timing F3 shows);
  2. takes bench 2;
  3. turns the timing off again before the flight.

The report gets one metric per pass, gpu_pass.<scene>.<pass>_ms (world, world_after_culling, occlusion_test, hud...): the median of the last 15 timed frames, at the flight's start. The flight is never timed per pass, so its FPS, lows and gpu_p50_ms stay comparable with older reports. The run takes no longer.

Metal is left out: its passes overlap on the GPU, so their times add up to more than the frame. There it waits 2 s as before.

The report is a free JSON object (new metric names need no new version, docs/benchmark-report.md); the telemetry server stores it as is. The new name is documented in that table.

Checks

  • the_wait_times_the_passes_but_not_the_flight (fake control): sends gpu-passes on, bench 2, gpu-passes off, in that order, and writes one metric per pass with normalised names. On Metal it sends nothing and writes nothing.
  • End to end on an M4 Pro, --benchmark forest --offscreen, with the Metal check disabled locally: the report held gpu_pass.forest.world_ms 1.59, animated_sprites_ms 0.019, screen_effects_ms 0.022, hud_ms 0.008. The flight ran at 652 FPS, GPU p50 1.47 ms.

Not checked: a Vulkan, DX12 or GL run, since there is no such GPU here. Those backends use the same timing F3 shows.

Self-check

pr_ready --quick on playhorizon (Linux; same Rust change on main 1c2ed6b61, rebased since onto a main whose only change to these files is three new rows in the docs table):

Check Result
Scope ✅ 2 files, +91 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 602 passed (1 min 3 s)
rustfmt ✅ (13 s)
clippy ✅ (2 min 54 s)
tests: horizon-client-lib ✅ 1377 passed (37 min 5 s)
doc tests ✅ 0 passed (4 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 ➖ 137 affected, to run in CI (--quick): ambient_sound, armor_stand_frost, arrow, arrow_wind_charge, audio_attributes, auto_jump, blending, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal and 125 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/6817 **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/bench-gpu-passes` --- ### 📝 Commits (1) - [`d884507`](https://github.com/horizon-rust/horizon/commit/d8845075d2ed07d6c402ea13bf2344537897f82a) Benchmark report: GPU time per render pass before each flight ### 📊 Changes **2 files changed** (+91 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/benchmark.rs` (+90 -1) 📝 `docs/benchmark-report.md` (+1 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## Why Players' benchmark reports say how long a frame takes on the GPU (`gpu_p50_ms`), not where that time goes. The Intel iGPU reports we have are GPU-bound and their GPU time grows with the render distance (HD 620, forest: 3.0 ms at RD 6, 4.7 ms at RD 10, 20 ms at RD 24). From the total alone we can't tell whether the cost is terrain geometry, the culling passes or full-screen effects, and there is no Intel GPU here to measure on. ## What `horizon-client --benchmark` already waits 2 s at each scene's start before its flight. That wait now: 1. turns on the game's own GPU pass timing (`gpu-passes on`, the same timing F3 shows); 2. takes `bench 2`; 3. turns the timing off again before the flight. The report gets one metric per pass, `gpu_pass.<scene>.<pass>_ms` (`world`, `world_after_culling`, `occlusion_test`, `hud`...): the median of the last 15 timed frames, at the flight's start. The flight is never timed per pass, so its FPS, lows and `gpu_p50_ms` stay comparable with older reports. The run takes no longer. Metal is left out: its passes overlap on the GPU, so their times add up to more than the frame. There it waits 2 s as before. The report is a free JSON object (new metric names need no new version, `docs/benchmark-report.md`); the telemetry server stores it as is. The new name is documented in that table. ## Checks - `the_wait_times_the_passes_but_not_the_flight` (fake control): sends `gpu-passes on`, `bench 2`, `gpu-passes off`, in that order, and writes one metric per pass with normalised names. On Metal it sends nothing and writes nothing. - End to end on an M4 Pro, `--benchmark forest --offscreen`, with the Metal check disabled locally: the report held `gpu_pass.forest.world_ms` 1.59, `animated_sprites_ms` 0.019, `screen_effects_ms` 0.022, `hud_ms` 0.008. The flight ran at 652 FPS, GPU p50 1.47 ms. Not checked: a Vulkan, DX12 or GL run, since there is no such GPU here. Those backends use the same timing F3 shows. ## Self-check pr_ready --quick on playhorizon (Linux; same Rust change on main 1c2ed6b61, rebased since onto a main whose only change to these files is three new rows in the docs table): | Check | Result | | --- | --- | | Scope | ✅ 2 files, +91 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 602 passed (1 min 3 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (2 min 54 s) | | tests: horizon-client-lib | ✅ 1377 passed (37 min 5 s) | | doc tests | ✅ 0 passed (4 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 | ➖ 137 affected, to run in CI (--quick): ambient_sound, armor_stand_frost, arrow, arrow_wind_charge, audio_attributes, auto_jump, blending, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal and 125 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:34:08 +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#7115
No description provided.