Class Telemetry
java.lang.Object
eu.svjatoslav.aukio.e3d.diag.Telemetry
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 Summary
Modifier and TypeMethodDescriptionstatic voidregisterSource(String name, Supplier<String> source) Registers a named telemetry source.static StringBuilds the current telemetry line.static voidstart()Starts the daemon telemetry thread.static voidunregisterSource(String name) Removes a previously registered source (subsystem shutdown).
-
Method Details
-
registerSource
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
Removes a previously registered source (subsystem shutdown). -
start
public static void start()Starts the daemon telemetry thread. Idempotent. -
snapshotLine
Builds the current telemetry line. Also used by bug reports to include a final snapshot.
-