FrameStats
where the last tick spent its time, and what Lua holds in memory
Fields
8 members
- gcAllocKBs:
number Lua garbage collector allocation rate in kilobytes per second
- gcKB:
number total Lua garbage collector memory usage in kilobytes
- interval:
number elapsed time since the previous frame in seconds
- network:
number time spent processing network packets in seconds
- physics:
number time spent stepping physics simulation in seconds
- render:
number time spent preparing render state in seconds
- script:
number time spent executing scripts in seconds
- sim:
number total simulation frame duration in seconds
Breaking Down the Last Tick
Lifecycle: Shared
Every timing field is in seconds, so multiply by 1000 to read it as milliseconds.
Luau
local stats = game.Profiler.Frame()if stats then print(string.format( "script %.2f ms, physics %.2f ms, lua %d KB", stats.script * 1000, stats.physics * 1000, stats.gcKB ))end