How the profiler works, what the numbers mean, and how grades are assigned.
FiveM has a built-in profiler that works at the C++ runtime level. You do not need to touch any script. When you run profiler record 300, FiveM's Citizen Lua scheduler wraps every thread tick in every resource with precise timing automatically.
The runtime tracks which resource owns each Lua coroutine, so it records execution time for all of them including escrowed resources. The resource name is never encrypted, only the code inside it, which is why you see entries like Escrowed (qbx_core).
When recording stops, run profiler saveJSON myprofile. Download that file from your server and upload it here.
A FiveM server runs at 20 ticks per second, one tick every 50ms. Within each tick, every resource's threads, event handlers, and commands run one after another.
The profiler groups events into ticks by looking for gaps over 15ms between consecutive events. That gap is the server sitting idle waiting for the next tick cycle. Everything within a gap is counted as one tick.
The script time per tick in the results is the total Lua execution time across all resources in a single tick. 5ms per tick is fine. 40ms per tick leaves almost no room for networking and entity sync, which is when players start feeling lag.
A tick is marked as heavy when total script execution goes over 25ms. That is half the 50ms budget. Once scripts are using more than half the budget, there is very little left for everything else the server needs to do.
The timeline chart shows every tick as a bar. Green is fine, yellow is getting close, red is a heavy tick. Hover over any bar to see what was running during that tick.
Most total CPU time across the whole recording. This script ran a lot, ran slow, or both. Start here when looking for what is dragging down your server.
Worst single tick recorded. A script can look fine on average but spike hard once in a while, often from a database query, iterating over all players, or a callback with no caching. These spikes are usually what players actually feel.
Shown up during heavy ticks. This counts how many times a resource was in the top runners during a flagged tick. It does not have to be the biggest script, it just keeps showing up when things go wrong.
Based on average script time per tick and percentage of heavy ticks.
Under 5ms per tick, under 1% heavy ticks. Scripts are using a very small slice of the budget.
Under 10ms per tick, under 5% heavy ticks. Normal load with minor spikes. Nothing needs to change.
Under 20ms per tick, under 15% heavy ticks. Scripts are taking up a real chunk of each tick. Worth checking the top offenders.
Under 30ms per tick, under 30% heavy ticks. High load. Players are likely noticing issues. Start optimising.
30ms or more per tick, or 30% or more heavy ticks. The server cannot keep up. Lag and desync are expected.
profiler record 300profiler saveJSON myprofileRecord while players are online for accurate results.
Created by
MonkeyWhisper
Free tool
No account needed. Share results with a link.