How to time a Lua command in Factorio
Type /measured-command <lua> (or /mc) in the Console tab of your SLASHPLAY server or in game chat as an admin, and Factorio reports how long it took.
measured-command
Runs a line of Lua like /c and reports how long it took.
/measured-command <lua> Examples
/measured-command game.print(game.tick) Runs it and prints the time it took.
/mc game.print(1) Short form.
Arguments
luaRequired- One line of Lua.
What it does
Use it to time a script before you run it on a busy map.
Good to know
- Like
/c, the first Lua command on a map only warns that it disables achievements; send it again to run it. - On SLASHPLAY, type it in the Console tab of the server page, with the leading slash. The Console runs it as the server, so it needs no admin rights.
Run it on your server
Type commands with the leading slash in the Console tab, which runs them as the server; in game, admins type them in chat. Settings go in config/server-settings.json in the Files tab and apply at the next restart. New to this? Start a Factorio server first.
Your own
Factorio server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.