[PR #4426] [MERGED] Benchmark: reject comparisons with incompatible conditions #5618

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4426
Author: @SlaVKsVolks
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: contribute/horizon-benchmark-conditions-20261030


📝 Commits (1)

  • 320778a fix(bench): reject incomparable benchmark reports

📊 Changes

3 files changed (+98 additions, -4 deletions)

View changed files

📝 docs/benchmark-report.md (+3 -2)
📝 tests/test_perf_bench.py (+74 -0)
📝 tools/perf_bench.py (+21 -2)

📄 Description

🤖 Opened by SlaVKsVolks's AI agent (OpenAI Codex, GPT-6.1 Sol), not by SlaVKsVolks personally.

What and why

perf_bench.py --table currently places runs side by side even when their resolution, scenario or other recorded settings differ. That can make incompatible results look like a valid comparison. Before printing, the command now checks the reports at each render distance and reports an error if the scenario, seed, simulation distance, window, VSync, FPS cap or offscreen setting differs or is unknown. An absent FPS cap retains the documented meaning of unlimited; an explicit null is unknown. A single report can still be displayed without those comparison fields.

Part of #1346; this addresses comparison reliability, not the whole issue. This independently changes the same table function as our #4407, which addresses missing load values. A local git merge-tree --write-tree of the two contribution heads succeeded without conflicts. Hardware, power, warm-up and run methodology are not verified by this guard.

Kind

  • parity
  • bug
  • perf
  • feature
  • extra
  • tooling
  • docs

Vanilla reference

None: benchmark reporting only.

Self-check

  • python -m unittest tests.test_perf_bench -v: 17 tests passed. The new regression first failed against the unchanged code for seven incompatible/unknown conditions, then passed with the guard. It also checks an explicit null cap, matching reports, a single incomplete report, and the command-line error without a traceback or partial table.
  • python tools/perf_bench.py --table horizon-win-9800x3d-5080 vanilla-win-9800x3d-5080 vanilla-mods-win-9800x3d-5080: passed with the repository's matching reports.
  • python tools/check_public_tree.py --history: passed after the commit.
  • git diff --check: passed. Git warned that the Windows checkout will convert the new test lines to CRLF; the staged diff passed the whitespace check.

pr_ready (tools/pr_ready.py --base 22ad79ba0113ec08eb7c907d91ef7779ee894ba6 on DESKTOP-5RS29HP, against 22ad79ba0, 49 s)

Check Result
Scope ✅ 3 files, +98 −4
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 482 run, OK (12 skipped; 48 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run: complete prepared game data is absent from this checkout; CI selects affected harnesses
Label skip-release

The test output includes intentional simulated harness failures from retry tests; the Python suite returned OK. A prior parity attempt in another Windows checkout stopped before running harnesses because the runner imports fcntl; it was not rerun or claimed as passing here.

🤖 Generated with OpenAI Codex (GPT-6.1 Sol).


🔄 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/4426 **Author:** [@SlaVKsVolks](https://github.com/SlaVKsVolks) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `contribute/horizon-benchmark-conditions-20261030` --- ### 📝 Commits (1) - [`320778a`](https://github.com/horizon-rust/horizon/commit/320778a3d244de677252172f9ec3d442cc4e40f7) fix(bench): reject incomparable benchmark reports ### 📊 Changes **3 files changed** (+98 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/benchmark-report.md` (+3 -2) 📝 `tests/test_perf_bench.py` (+74 -0) 📝 `tools/perf_bench.py` (+21 -2) </details> ### 📄 Description > 🤖 Opened by SlaVKsVolks's AI agent (OpenAI Codex, GPT-6.1 Sol), not by SlaVKsVolks personally. ## What and why `perf_bench.py --table` currently places runs side by side even when their resolution, scenario or other recorded settings differ. That can make incompatible results look like a valid comparison. Before printing, the command now checks the reports at each render distance and reports an error if the scenario, seed, simulation distance, window, VSync, FPS cap or offscreen setting differs or is unknown. An absent FPS cap retains the documented meaning of unlimited; an explicit null is unknown. A single report can still be displayed without those comparison fields. Part of #1346; this addresses comparison reliability, not the whole issue. This independently changes the same table function as our #4407, which addresses missing load values. A local `git merge-tree --write-tree` of the two contribution heads succeeded without conflicts. Hardware, power, warm-up and run methodology are not verified by this guard. ## Kind - [ ] parity - [ ] bug - [ ] perf - [ ] feature - [ ] extra - [x] tooling - [ ] docs ## Vanilla reference None: benchmark reporting only. ## Self-check - `python -m unittest tests.test_perf_bench -v`: 17 tests passed. The new regression first failed against the unchanged code for seven incompatible/unknown conditions, then passed with the guard. It also checks an explicit null cap, matching reports, a single incomplete report, and the command-line error without a traceback or partial table. - `python tools/perf_bench.py --table horizon-win-9800x3d-5080 vanilla-win-9800x3d-5080 vanilla-mods-win-9800x3d-5080`: passed with the repository's matching reports. - `python tools/check_public_tree.py --history`: passed after the commit. - `git diff --check`: passed. Git warned that the Windows checkout will convert the new test lines to CRLF; the staged diff passed the whitespace check. **pr_ready** (`tools/pr_ready.py --base 22ad79ba0113ec08eb7c907d91ef7779ee894ba6` on DESKTOP-5RS29HP, against 22ad79ba0, 49 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +98 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 482 run, OK (12 skipped; 48 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run: complete prepared game data is absent from this checkout; CI selects affected harnesses | | Label | `skip-release` | The test output includes intentional simulated harness failures from retry tests; the Python suite returned OK. A prior parity attempt in another Windows checkout stopped before running harnesses because the runner imports `fcntl`; it was not rerun or claimed as passing here. 🤖 Generated with OpenAI Codex (GPT-6.1 Sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:49 +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#5618
No description provided.