Created
August 11, 2018 07:39
-
-
Save numberoverzero/8d10e73b663add2032c3e9226f41b2dd to your computer and use it in GitHub Desktop.
notes from benchmarking factorio's rcon capabilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tool: rcon-cli https://github.com/itzg/rcon-cli | |
control.lua: | |
function Bench(x) | |
rcon.print(x+3) | |
end | |
commands.txt: | |
/silent-command Bench(2) | |
[9998 more copies] | |
/c print("done") | |
filebench.sh | |
#!/usr/bin/env bash | |
cat commands.txt | ./rcon-cli --password hunter2 > /dev/null | |
$ time ./filebench.sh | |
real 2m48.088s | |
user 0m0.625s | |
sys 0m1.094s | |
commands/sec: 10001/168.088 = 59.50 [60/sec] | |
sec/command: 168.088/10001 = 0.017 [17ms] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subsequent runs are all within +/- .05 commands/sec or ~0.0168sec/command. Which means the rcon server is probably tied to the main game thread: https://wiki.factorio.com/Game-tick