NebulaProfiler
Where a worker's tick goes.
Nebula · Packages/com.1by3.nebula/Runtime/Debug/NebulaProfiler.cspublic static class NebulaProfilerWhere a worker's tick goes. Nebula times each phase of its own tick; game code may add sections of its own (static readonly ProfileSection Move = NebulaProfiler.Section("npc.move")) and they appear in the same report: one [nebula] profile log line per NebulaWorker every few seconds, with every section's cost expressed in milliseconds per simulated tick so the columns add up to the tick time. Section is the public API for that: it returns the same ProfileSection for a name however often it is called, so keep it in a static readonly field and call Begin/End around the work. A section also travels in the worker's heartbeat (WorkerInfo.ProfileSections, /api/state).
Methods
Section
public static ProfileSection Section(string name);ReportAndReset
public static string ReportAndReset(int ticks);
public static string ReportAndReset(int ticks, out string compact);Every section as name=ms/tick (with its call count when it differs from the tick count), then reset.