The Profiler is a plugin created by the torch team. It adds tools for exploring causes of lag and is also useful to check real condition mod performance. it can be downloaded here
You can run a profiling command from the server in the chat tab or as admin in the in-game chat.
The command syntax is "!profile type --option1=xyz --option2=xzy ..."
Example: !profile blocktypes --ticks=1500 --top=20
You can profile different parts of the game for different purposes. These types are:
|blocktypes||Profiles all blocks in the session by type|
|blocks||profiles all blocks in the session|
|grids||profiles the session by grids. Connected grids count as one grid|
|mods||profiles all loaded mods of the session. Does not include block logic|
|session||Gives a profile overview of the entire session|
|factions||profiles all factions of the server|
|players||profiles players, meaning everything owned by a player|
|physics||profiles physics sectors and returns them with coordinates HEAVY PERFORMANCE IMPACT|
|scripts||profiles all running programmable blocks|
|cleangps||cleans the GPS points set by profiling|
Most types can be run with optional commands. These change how the results get displayed, or how long the profiling will take
|--ticks=TickAmount||to set how long the profiling should run (default 900 ~15sec)|
|--top=ReportEntries||to set how many of the top entries should be returned (default 10)|
|--player=PlayerName||to report values for a single player|
|--faction=FactionTag||to report values for a single faction|
|--entity=EntityId||to report values for a specific entity|
|--mod=ModID||to report values for a specific mod|
|--this||to profile the entity you're currently controlling (players only)|
|--gps||to show positional results as GPS points (players only)|
Interpreting the result
Using the right commands, the profiler provides a quick way to identify problems in your world and quantifies them
The profiler will return the given most performance costing entries, by default 10.
Every entry will have a name and two numbers attached to it. These numbers are per tick, which is 16.66 ms at simspeed 1.0
This means that as soon as your world consumes more than 16.66ms computing time per tick, simspeed will drop.
The two numbers the profiler returns are The time (In ms = milliseconds/μs = microseconds/ns = nanoseconds) the entry took on the main thread and the amount of time this entry was updated in the tick (In upt = updates).