Skip to content

0.2: per-mod attribution, who is eating the tick #22

Description

@Pixnop

The next big one. Pulse 0.1 tells you the server spends 28 ms of work per tick; the question every admin asks next is which mod is responsible, and nothing on the ModDB answers it.

Three doors, surveyed and real:

  1. A Harmony patch on the engine's FrameProfilerUtil, the way Temporalog's slow-tick logging works: when the engine's own profiler flags a slow tick, the call tree names the systems and listeners that consumed it. Turned into labelled counters (pulse_slow_tick_blame_total{owner}), this is direct attribution on exactly the ticks that matter. Cost: Harmony enters the zip (collision surface, the reason the base mod is dependency-free today), and profiling must be strictly opt-in config since the engine's profiler has a real per-tick cost when enabled.
  2. Reflection over the engine EventManager's listener lists: how many tick listeners and callbacks each mod has registered. A load proxy, not a measurement, but cheap and always on. Temporalog has run this for two years behind a defensive try/catch.
  3. StratumEntityBehaviorTimings on Stratum servers: per-behavior, per-entity-type tick time, drainable, compiled into their vsapi. Runtime feature detection with a clean fallback on vanilla and Lithos.

Also in scope per the original project brief: ingesting tsu's logger overload detections as labelled counters, which makes #6 (the observability-lanes conversation with the team) the natural entry point for this work rather than an afterthought.

Open questions to settle before code: whether attribution ships in the base zip behind config or as a third optional mod (the Harmony dependency suggests the latter, same reasoning as pulseotlp); what the owner label is keyed on (mod id where recoverable, type name where not); and what the always-on versus opt-in split is.

Target: 0.2. Blocked on the #6 conversation only for the tsu-logger part; the FrameProfiler and reflection doors can be designed now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions