[PR #261] [MERGED] Launcher measurements: a session performance log and horizon-launcher benchmark #2445

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-perf


📝 Commits (2)

  • c78f2d3 Launcher measurements: a session performance log and horizon-launcher benchmark
  • bb1c292 Launcher benchmark reports go to the telemetry outbox with the benchmark-upload consent; tests

📊 Changes

7 files changed (+504 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -0)
📝 launcher/Cargo.lock (+36 -0)
📝 launcher/Cargo.toml (+3 -0)
📝 launcher/README.md (+16 -1)
📝 launcher/src/cli.rs (+15 -0)
📝 launcher/src/main.rs (+53 -1)
➕ launcher/src/perf.rs (+374 -0)

📄 Description

Stacked on #247 (report format); GitHub retargets it to main when #247 merges.

What

Ludovic (2026-10-15): "check also the launcher performance and log it too".

  • Session log (launcher/src/perf.rs): every launcher session rewrites benchmarks/launcher-<time>-session.json in its data folder, in the benchmark report format: launcher.start_ms (process start to first frame), launcher.release_list_ms, launcher.install_ms / launcher.update_ms (download + unpack), launcher.prepare_ms, launcher.play_to_game_frame_ms (Play pressed to the game's first frame: the game now logs Horizon: first frame after N ms), launcher.rss_mb (sampled; max = peak), UI frame times (frames phase ui: gaps under 250 ms between drawn frames, so a resting UI isn't a slow frame), launcher.binary_bytes, plus OS/CPU/RAM. Local only; written at most every 5 s and on exit.
  • horizon-launcher benchmark [--repeats N]: starts the launcher N times (5) with HORIZON_LAUNCHER_BENCH; each window switches pages every tick for 4 s (each switch animates, so the UI draws continuously), rests 3 s to measure idle CPU, and reports back. Cold start = the first, warm = the others, measured by the parent from spawn to first frame. Also times the release list fetch 3 times. One report with means and 95% CIs; with the benchmark-upload consent it is also pushed to the telemetry outbox (dated to the day; horizon-telemetry's benchmark item).
  • README: CLI line and a "Performance log" section.

Measured (Mac mini M4 Pro, debug build, locked screen, load average 50: plumbing check, not publishable)

HORIZON_LAUNCHER_HOME=/tmp/... horizon-launcher benchmark --repeats 2: cold start 1343 ms, warm 605 ms, release list 96–115 ms (3 fetches), RSS 81 MB, idle CPU 0.3–12.7%, binary 55 MB (debug). With the screen locked the window drew only one frame per page switch, so the UI frame times need an unlocked screen; release-build numbers come with the benchmark results PR.

Self-check

cargo fmt (launcher)                                                      ok
cargo clippy --features gpui/runtime_shaders --all-targets -- -D warnings ok
cargo test --features gpui/runtime_shaders                                31 passed (2 new: perf frame accounting, bench window steps)
horizon-client: one log line on the first frame (no harness reads it)

Needs Ludovic

  • Conflicts with #250 (telemetry in the launcher) on the horizon-telemetry line in launcher/Cargo.toml only; I'll rebase whichever merges second.
  • A "Run benchmark" button in the launcher (brief item 4) comes after horizon-client --benchmark is 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/261 **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/launcher-perf` --- ### 📝 Commits (2) - [`c78f2d3`](https://github.com/horizon-rust/horizon/commit/c78f2d3e273182d99e2d98ef3be08e62b6ffdb67) Launcher measurements: a session performance log and horizon-launcher benchmark - [`bb1c292`](https://github.com/horizon-rust/horizon/commit/bb1c292a40c79b3a9e6c08a8cf727ebb94ad3709) Launcher benchmark reports go to the telemetry outbox with the benchmark-upload consent; tests ### 📊 Changes **7 files changed** (+504 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -0) 📝 `launcher/Cargo.lock` (+36 -0) 📝 `launcher/Cargo.toml` (+3 -0) 📝 `launcher/README.md` (+16 -1) 📝 `launcher/src/cli.rs` (+15 -0) 📝 `launcher/src/main.rs` (+53 -1) ➕ `launcher/src/perf.rs` (+374 -0) </details> ### 📄 Description **Stacked on #247** (report format); GitHub retargets it to main when #247 merges. ## What Ludovic (2026-10-15): "check also the launcher performance and log it too". - **Session log** (`launcher/src/perf.rs`): every launcher session rewrites `benchmarks/launcher-<time>-session.json` in its data folder, in the benchmark report format: `launcher.start_ms` (process start to first frame), `launcher.release_list_ms`, `launcher.install_ms` / `launcher.update_ms` (download + unpack), `launcher.prepare_ms`, `launcher.play_to_game_frame_ms` (Play pressed to the game's first frame: the game now logs `Horizon: first frame after N ms`), `launcher.rss_mb` (sampled; max = peak), UI frame times (`frames` phase `ui`: gaps under 250 ms between drawn frames, so a resting UI isn't a slow frame), `launcher.binary_bytes`, plus OS/CPU/RAM. Local only; written at most every 5 s and on exit. - **`horizon-launcher benchmark [--repeats N]`**: starts the launcher N times (5) with `HORIZON_LAUNCHER_BENCH`; each window switches pages every tick for 4 s (each switch animates, so the UI draws continuously), rests 3 s to measure idle CPU, and reports back. Cold start = the first, warm = the others, measured by the parent from spawn to first frame. Also times the release list fetch 3 times. One report with means and 95% CIs; with the benchmark-upload consent it is also pushed to the telemetry outbox (dated to the day; `horizon-telemetry`'s `benchmark` item). - README: CLI line and a "Performance log" section. ## Measured (Mac mini M4 Pro, **debug build**, locked screen, load average 50: plumbing check, not publishable) `HORIZON_LAUNCHER_HOME=/tmp/... horizon-launcher benchmark --repeats 2`: cold start 1343 ms, warm 605 ms, release list 96–115 ms (3 fetches), RSS 81 MB, idle CPU 0.3–12.7%, binary 55 MB (debug). With the screen locked the window drew only one frame per page switch, so the UI frame times need an unlocked screen; release-build numbers come with the benchmark results PR. ## Self-check ``` cargo fmt (launcher) ok cargo clippy --features gpui/runtime_shaders --all-targets -- -D warnings ok cargo test --features gpui/runtime_shaders 31 passed (2 new: perf frame accounting, bench window steps) horizon-client: one log line on the first frame (no harness reads it) ``` ## Needs Ludovic - Conflicts with #250 (telemetry in the launcher) on the `horizon-telemetry` line in launcher/Cargo.toml only; I'll rebase whichever merges second. - A "Run benchmark" button in the launcher (brief item 4) comes after `horizon-client --benchmark` is 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:12 +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#2445
No description provided.