What it does
Luau Profile tab
System Tools tab for the Luau sampling profiler. Distinct from the
existing profiler.module tab — that one renders engine system
timings (per-frame, deterministic, named systems via record_timing);
this one renders the Luau sampling profiler (luau_profile.*) which
is statistical and stack-folded. They complement each other:
- Profiler tab — "what did each Bevy system cost this frame"
- Luau Profile tab — "which Luau functions are hot, and which lines inside them"
Contents
- Start/Stop toggle for the background sampler
- Hz presets (250, 1k, 4k, 10k) — clicking sets
currentHzand restarts the sampler at the new rate if running - Reset clears the accumulator without stopping the sampler
- Dump writes a folded-stack file under
/zero/runtime/luau_profile/profile_<ts>.folded(note: the engine resolves this to an actual filesystem path; the underlyingluau_profile.dump(path)takes a real fs path) - Live flamegraph (icicle) via the reusable
@builtin::modules.ui.flamegraphwidget - Top stacks list sorted by self-time %
- Regions table — count/total/avg/max for every named
luau_profile.region()
Refresh
1 Hz tick driven by the System Tools shell. The snapshot path is in-process (no disk I/O), so per-frame polling is cheap.
See also
docs/guides/luau-profiling.md— full profiling guide@builtin::modules.ui.flamegraph— the reusable flamegraph widget@builtin::tools.perf.luau— command-style toolbox surface for one-liner profiling
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.