[PR #3982] [MERGED] bench: one script for Horizon, vanilla and Pumpkin under the same bot load #5330

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3982
Author: @DUzzL
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/issue-3972-bench-load-driver


📝 Commits (2)

  • 2017653 bench: one script that runs Horizon, vanilla or Pumpkin under the same horizon-bots load
  • 6000584 bench: bytes per player and second over each bot's time online

📊 Changes

2 files changed (+547 additions, -0 deletions)

View changed files

➕ bench/bench.py (+457 -0)
➕ tests/test_bench.py (+90 -0)

📄 Description

🤖 Opened by DUzzL's AI agent (Claude Code, Sonnet 5.5), not by DUzzL personally.

Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #3972

Adds bench/bench.py: one script that starts Horizon (horizon-server), vanilla 26.3 (your own server.jar) or Pumpkin (released binary, black box) in a fresh scratch folder bound to 127.0.0.1, runs the same horizon-bots load, and writes a JSON report plus the Markdown table from the design. Based on tools/server_bench.py, stdlib only.

  • TPS from time query gametime, MSPT from tick query, RSS and CPU from ps, join time from the bots' joined_after_ms.
  • --pre-generated DIR copies a finished world into each run as world.
  • Pumpkin runs with Bedrock, LAN broadcast, query, rcon, plugins and telemetry off, through generated config files.
  • Nothing of Mojang's is fetched or committed.

Tested: python -m unittest tests.test_bench (7 passed: console-output parsers, TPS, process-time parsing, bot-output split, Pumpkin config and pre-generated world copy, vanilla properties, table) and python bench/bench.py --help run on Windows. The PR only adds Python files, so cargo fmt/clippy/test do not apply.

Not tested: no end-to-end run against a real Horizon, vanilla or Pumpkin server (no builds or jars here). The Pumpkin config keys are written from memory and unverified: --pumpkin-config appends a TOML file if a release names a key differently. Bandwidth is null until the bots report bytes_in/bytes_out (S-6). RSS and CPU need ps (Linux, macOS). The design places bench/ in horizon-server; this is the horizon-side implementation the issue asks for.


🔄 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/3982 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/issue-3972-bench-load-driver` --- ### 📝 Commits (2) - [`2017653`](https://github.com/horizon-rust/horizon/commit/2017653aff160ad86e4aac7773343b45733a6e92) bench: one script that runs Horizon, vanilla or Pumpkin under the same horizon-bots load - [`6000584`](https://github.com/horizon-rust/horizon/commit/600058493ea6fdee536a91b8805f6a4eba2de0ea) bench: bytes per player and second over each bot's time online ### 📊 Changes **2 files changed** (+547 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `bench/bench.py` (+457 -0) ➕ `tests/test_bench.py` (+90 -0) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent (Claude Code, Sonnet 5.5), not by DUzzL personally. Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #3972 Adds `bench/bench.py`: one script that starts Horizon (`horizon-server`), vanilla 26.3 (your own `server.jar`) or Pumpkin (released binary, black box) in a fresh scratch folder bound to 127.0.0.1, runs the same `horizon-bots` load, and writes a JSON report plus the Markdown table from the design. Based on `tools/server_bench.py`, stdlib only. - TPS from `time query gametime`, MSPT from `tick query`, RSS and CPU from `ps`, join time from the bots' `joined_after_ms`. - `--pre-generated DIR` copies a finished world into each run as `world`. - Pumpkin runs with Bedrock, LAN broadcast, query, rcon, plugins and telemetry off, through generated config files. - Nothing of Mojang's is fetched or committed. **Tested:** `python -m unittest tests.test_bench` (7 passed: console-output parsers, TPS, process-time parsing, bot-output split, Pumpkin config and pre-generated world copy, vanilla properties, table) and `python bench/bench.py --help` run on Windows. The PR only adds Python files, so `cargo fmt`/`clippy`/`test` do not apply. **Not tested:** no end-to-end run against a real Horizon, vanilla or Pumpkin server (no builds or jars here). The Pumpkin config keys are written from memory and unverified: `--pumpkin-config` appends a TOML file if a release names a key differently. Bandwidth is `null` until the bots report `bytes_in`/`bytes_out` (S-6). RSS and CPU need `ps` (Linux, macOS). The design places `bench/` in horizon-server; this is the horizon-side implementation the issue asks for. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:51 +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#5330
No description provided.