Performance
Performance provides averaged FPS, frame-time, and CPU/GPU utilization metrics. In a Reflex module’s server.lua, the global Performance object is nil.
Where values come from
Section titled “Where values come from”The client performance collector aggregates frame duration and CPU/GPU occupancy, while the API exposes calculated values for the latest measurement window. This diagnoses the local client: reading these properties does not affect FPS or control graphics quality.
Quick example
Section titled “Quick example”print("FPS: " .. Performance.AvgFps)print("Max frame: " .. Performance.MaxFrameMs .. " ms")Properties
Section titled “Properties”| Property | Type | Access | Description |
|---|---|---|---|
AvgFps |
number |
get |
Average FPS over the last second. |
CpuUsagePercent |
number |
get |
Average CPU utilization by the game over the last second relative to frame time. |
GpuUsagePercent |
number |
get |
Average GPU utilization by the game over the last second relative to frame time. |
MaxFrameMs |
number |
get |
Maximum frame time over the last second, in milliseconds. |
Interpreting values
Section titled “Interpreting values”These metrics are dynamic and describe a recent interval, not the entire match. One test produced AvgFps ≈ 144.83, CpuUsagePercent ≈ 99.96, GpuUsagePercent ≈ 87.81, and MaxFrameMs ≈ 20.76.
Do not treat those numbers as expected values. They depend on the device, settings, and current workload.
Low-FPS warning example
Section titled “Low-FPS warning example”Scheduler:OnFrame(function() if Performance.AvgFps < 30 then -- Show a warning in the interface endend)