Worker
WorkerMemorySampler
Reads a worker's memory figures for its heartbeat and its profile log line.
generated from the sources
Static class in namespace
Nebula · Packages/com.1by3.nebula/Runtime/Worker/WorkerMemorySampler.cspublic static class WorkerMemorySamplerReads a worker's memory figures for its heartbeat and its profile log line. It runs at heartbeat rate (once every NebulaConfig.WorkerHeartbeatSeconds), keeps one Process object and refreshes it, and allocates nothing per call beyond what the OS query itself needs.
Methods
Sample
public static void Sample(ref WorkerStats stats);Fills the memory fields of stats with the current figures.
Mb
public static string Mb(ulong bytes);Megabytes with one decimal, for the profile line.