Class Telemetry

java.lang.Object
eu.svjatoslav.aukio.e3d.diag.Telemetry

public final class Telemetry extends Object
Periodic telemetry line written to the persistent log: heap usage plus whatever counters registered subsystems report (streaming caches, loaded cells, queue depths, measured FPS...).

Slowdown-toward-OOM issues show up here as a monotonic climb in one of the numbers across a flight, which names the leaking resource. The line is written every telemetry.interval.seconds (default 5) and goes to stdout — the PersistentLog tee puts it on disk even when the application later freezes.

  • Method Details

    • registerSource

      public static void registerSource(String name, Supplier<String> source)
      Registers a named telemetry source. The supplier must be fast and side-effect free; it runs on the telemetry thread. Registering the same name again replaces the previous source.
      Parameters:
      name - short subsystem name, e.g. "fo4"
      source - produces a compact stats string, e.g. "cells=12 tris=450000"
    • unregisterSource

      public static void unregisterSource(String name)
      Removes a previously registered source (subsystem shutdown).
    • start

      public static void start()
      Starts the daemon telemetry thread. Idempotent.
    • snapshotLine

      public static String snapshotLine()
      Builds the current telemetry line. Also used by bug reports to include a final snapshot.