Skip to content

fix(telemetry): give slow ticks their section children - #316

Merged
Joltras merged 2 commits into
mainfrom
fix/telemetry-tick-sections
Oct 13, 2026
Merged

Joltras merged 2 commits into
mainfrom
fix/telemetry-tick-sections

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Proposed changes

In production Tempo the cygnus.tick.slow spans had no cygnus.tick.section children at all (two slow lobby ticks of 59 and 103 ms showed nothing). This makes every slow tick say who was in it.

Root cause. Only three services were wrapped in TickSections (creek, slender-gaze, tunnel-vision), and all three only run while a round is in progress, so in the lobby there was nothing to report. On top of that, a share below 1 ms was dropped, which hid the small scheduled tasks that do run. The ordering of the counters against ServerTickMonitorEvent was checked and is fine (Minestom fires the event after the scheduler ran, and SlowTickTracer reads and resets the counters in that handler).

Change.

  • Every per-tick scheduled service now reports a section with a stable, low-cardinality name, collected in the new TickSectionNames: lobby-waiting, lobby-time, creek, glow-reveal, slender-gaze, tunnel-vision, page-glitch, blood-splatter, page-proximity, ambient, adrenaline, slender-takeover, stamina (all survivor bars added up), slender-bar and jump-scare.
  • Each class gets a constructor overload that takes TickSections; the old constructors keep working with TickSections.NONE. Cygnus passes the shared instance in.
  • The floor for a child span drops from 1 ms to 0.1 ms.
  • Slow ticks stay parented to the current phase. A section that did not run in the tick has no child.
  • docs/telemetry.md lists the sections.

Knock-on effects.

  • A wrapped service costs two nanoTime reads and a LongAdder add per run, as before; with tracing off nothing is wrapped.
  • Time spent outside the scheduler (entity and chunk ticking, packet handling) is still not a section, so a gap between a tick and the sum of its children is the engine.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING.md
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Test plan.

  • SlowTickTracerTest: one child per section that ran with the right duration, sections that did not run are omitted, a 0.3 ms share is reported and one below the floor is not.
  • SlowTickLobbyTest: a slow lobby tick has lobby-waiting and lobby-time children, none of the game's, and hangs below the lobby phase span.
  • TickSectionWiringTest: the real LobbyWaitingTask and LobbyTimeTransitionTask report through the Minestom scheduler (env.tick(), hand-driven clock).
  • TickSectionNamesTest: names are unique and kebab-case.
  • ./gradlew :game:test :common:test is green.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Test results

  663 files    663 suites   4m 16s ⏱️
1 483 tests 1 477 ✅  6 💤 0 ❌
4 452 runs  4 434 ✅ 18 💤 0 ❌

Results for commit e1b407e.

♻️ This comment has been updated with latest results.

TheMeinerLP and others added 2 commits October 13, 2026 09:29
Only creek, slender-gaze and tunnel-vision were measured and none of them runs in the lobby, so lobby slow ticks had no children. Measure every per-tick scheduled service under a stable name and lower the span floor to 0.1 ms.
* feat(telemetry): measure every tick and tick section per phase

* feat(telemetry): measure how long survivors are hunted (#318)

* feat(creek): highlight hunted survivors in the tab list

* feat(creek): put the hunted marker behind the name

* feat(telemetry): measure how long survivors are hunted
@Joltras
Joltras force-pushed the fix/telemetry-tick-sections branch from d8db087 to e1b407e Compare October 13, 2026 07:34
@Joltras
Joltras merged commit 678555a into main Oct 13, 2026
7 checks passed
@Joltras
Joltras deleted the fix/telemetry-tick-sections branch October 13, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants