[PR #1992] [MERGED] Benchmark: wait for the post-teleport load before measuring #3922

Closed
opened 2026-11-03 04:13:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/benchmark-wait-loaded


📝 Commits (1)

  • 467413d fix(benchmark): wait for the post-teleport load before measuring

📊 Changes

1 file changed (+31 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/benchmark.rs (+31 -0)

📄 Description

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

What and why

--benchmark could start measuring before the world had loaded after a teleport: wait_loaded saw the idle second right after the teleport and declared the scene loaded, so the village and mountain scenes were measured with 0 chunks. This ports the guard from tools/perf_bench.py: the chunk counts must change at least once (or stay full for 5 s), and resident chunks must reach 80% of the view circle before measuring starts.

Vanilla reference

none (benchmark tooling only; no gameplay change).

Self-check

python -I tools/pr_ready.py --quick --base upstream/main, run on Windows: Public tree pass, rustfmt pass (after formatting), clippy pass, doc tests pass. In horizon-client 1105 tests pass and 3 fail on Windows paths and file locks, not in this diff: crash::tests::stacks_start_at_the_panicking_frame (expects crates/... and gets /src/...), packs::cache::tests::directory_inputs_config_and_owned_output_recovery (os error 5) and save::tests::session_lock_is_exclusive (os error 33). The same three also fail on another checkout of the same base that does not touch those files. The 4 benchmark:: tests pass. Parity was not run (--quick).

🤖 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/1992 **Author:** [@DanielGodriNeto](https://github.com/DanielGodriNeto) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/benchmark-wait-loaded` --- ### 📝 Commits (1) - [`467413d`](https://github.com/horizon-rust/horizon/commit/467413df5bc20568bc825f65431e322150c6f059) fix(benchmark): wait for the post-teleport load before measuring ### 📊 Changes **1 file changed** (+31 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/benchmark.rs` (+31 -0) </details> ### 📄 Description > 🤖 Opened by Daniel's AI agent (Claude Code), not by Daniel himself. ## What and why `--benchmark` could start measuring before the world had loaded after a teleport: `wait_loaded` saw the idle second right after the teleport and declared the scene loaded, so the village and mountain scenes were measured with 0 chunks. This ports the guard from `tools/perf_bench.py`: the chunk counts must change at least once (or stay full for 5 s), and resident chunks must reach 80% of the view circle before measuring starts. ## Vanilla reference none (benchmark tooling only; no gameplay change). ## Self-check `python -I tools/pr_ready.py --quick --base upstream/main`, run on Windows: Public tree pass, rustfmt pass (after formatting), clippy pass, doc tests pass. In `horizon-client` 1105 tests pass and 3 fail on Windows paths and file locks, not in this diff: `crash::tests::stacks_start_at_the_panicking_frame` (expects `crates/...` and gets `/src/...`), `packs::cache::tests::directory_inputs_config_and_owned_output_recovery` (os error 5) and `save::tests::session_lock_is_exclusive` (os error 33). The same three also fail on another checkout of the same base that does not touch those files. The 4 `benchmark::` tests pass. Parity was not run (`--quick`). 🤖 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 04:13:17 +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#3922
No description provided.