[PR #5247] [MERGED] Spans: time natural spawning and the mobs' ticks inside tick_mobs #6163

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

📋 Pull Request Information

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

Base: main ← Head: perf/spans-mob-phases


📝 Commits (1)

  • acf4da1 Spans: time natural spawning and the mobs' ticks inside tick_mobs

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+2 -2)

📄 Description

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

Roadmap server-tick. On the official server the mobs take half the tick: tick_mobs is 16.2 of 32.7 ms with 28 players (perf report 2026-10-31 12:09Z). That span holds two different costs, natural spawning and the mobs' own ticks, and the reports can't tell them apart. With 60 bots on playhorizon they are about 20 and 37 ms.

This adds a span for each one inside tick_creatures: spawn_natural and tick_creature_entities. Like the other spans, they are timed only when spans are on (HORIZON_SPIKES, the perf reports), so nothing else changes. They are the spans the A/B tables in #5191 and #5237 use.

Checks

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 27cb8f96b, 8 min 27 s)

Check Result
Scope ✅ 1 files, +2 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (58 s)
rustfmt ✅ (5 s)
clippy ✅ (12 s)
tests: horizon-client ✅ 1340 passed (6 min 55 s)
doc tests ✅ 0 passed (4 s)
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 ➖ 33 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 21 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

pr_ready ran before the rebase on current main (no conflicts).

🤖 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/5247 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/spans-mob-phases` --- ### 📝 Commits (1) - [`acf4da1`](https://github.com/horizon-rust/horizon/commit/acf4da15a4ca4118387f2a1e03e5a30d43907eb8) Spans: time natural spawning and the mobs' ticks inside tick_mobs ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+2 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Roadmap `server-tick`. On the official server the mobs take half the tick: `tick_mobs` is 16.2 of 32.7 ms with 28 players (perf report 2026-10-31 12:09Z). That span holds two different costs, natural spawning and the mobs' own ticks, and the reports can't tell them apart. With 60 bots on playhorizon they are about 20 and 37 ms. This adds a span for each one inside `tick_creatures`: `spawn_natural` and `tick_creature_entities`. Like the other spans, they are timed only when spans are on (`HORIZON_SPIKES`, the perf reports), so nothing else changes. They are the spans the A/B tables in #5191 and #5237 use. ## Checks **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 27cb8f96b, 8 min 27 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +2 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (58 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (12 s) | | tests: horizon-client | ✅ 1340 passed (6 min 55 s) | | doc tests | ✅ 0 passed (4 s) | | 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 | ➖ 33 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 21 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | pr_ready ran before the rebase on current main (no conflicts). 🤖 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:15:15 +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#6163
No description provided.