Helix/Profiler
Low-overhead runtime phase, job, and queue profiling for the Syncromesh orchestrator.
The profiler accumulates wall-clock timings for engine phases, board work, scripting jobs, and native queues across the process. It is disabled by default and is registered only in the primary orchestrator scripting context. Timings include time blocked inside an instrumented scope, so queue and lock contention can appear alongside active CPU work.
Import #
import * as Profiler from 'Helix/Profiler';Functions #
setEnabled
Enables or disables collection and returns the resulting state.
setEnabled(enabled: boolean): booleanisEnabled
Returns whether profiling collection is enabled.
isEnabled(): booleanreset
Clears counters, gauges, high-water marks, and the elapsed interval.
reset(): voidsnapshot
Returns a synchronous snapshot of all accumulated profiler data.
- Each counter contains
thread,name,calls,totalMs,maxMs, andlastMs. - Each gauge contains
name,current, andhighWater. - Counters are sorted by thread and descending total time, making the result suitable for a simple monitoring UI.
snapshot(): { enabled, elapsedMs, counters, gauges }import * as Profiler from 'Helix/Profiler';
Profiler.reset();
Profiler.setEnabled(true);
const snapshot = Profiler.snapshot();
for (const counter of snapshot.counters) {
console.log(counter.thread, counter.name, counter.totalMs, counter.maxMs);
}