Plugins/Profiler

From Torch Wiki
Jump to: navigation, search

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

Profiling type[edit]

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


Profiling options[edit]

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)