The in-game frame profiler (F10 to start/stop). While recording it times
each frame's phases and keeps a detailed record of every frame over
frameThreshold ms, plus between-frame stalls over gapThreshold ms
(main-thread work outside the game loop: GC, plugin timers, decodes).
Stopping writes save/reactor-profile.json and logs a console summary.
Costs nothing until first activated.
function ReactorProfiler()
Quick Reference
Setup & Creation 1
| _install() | Install. |
Other 6
| frameBegin() | Frame begin. |
| phase() | Phase. |
| frameEnd() | Frame end. |
| _wrap() | Wraps hot methods so their time accumulates into a named phase while the profiler is active. |
| context() | What the machine and the game were set to while recording: read with the report, so a slow run can be told fr… |
| dump() | Dump. |
Setup & Creation
_install
static internal sourceReactorProfiler._install()
Install.
Actions
toggle
static sourceReactorProfiler.toggle()
Toggle.
start
static sourceReactorProfiler.start()
Start.
stop
static sourceReactorProfiler.stop()
Stop.
Other
frameBegin
static sourceReactorProfiler.frameBegin()
Frame begin.
phase
static sourceReactorProfiler.phase(name, ms)
Phase.
frameEnd
static sourceReactorProfiler.frameEnd()
Frame end.
_wrap
static internal sourceReactorProfiler._wrap(proto, method, phaseName)
Wraps hot methods so their time accumulates into a named phase while the profiler is active.
Details
Wraps hot methods so their time accumulates into a named phase while the profiler is active. Installed lazily on first F10, so plugin replacements of these methods are what actually get timed.
context
static sourceReactorProfiler.context(elapsed)
What the machine and the game were set to while recording: read with the report, so a slow run can be told from a slow machine.
dump
static sourceReactorProfiler.dump()
Dump.