Benchmark testing help

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Sicnarf
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 08, 2016 9:32 pm
Contact:

Benchmark testing help

Post by Sicnarf »

Was trying to do some UPS efficiency testing of designs in creative mode but the game update fluctuates so much it's hard to get a good reading.
I have heard tell of a benchmark testing mode and found the below commands in the wiki however I'm unclear as to how to use them.

--benchmark FILE load save and run benchmark
--benchmark-ticks N (=1,000) number of ticks for benchmarking. Default is 1000

I'm presume I append something like the below to the end of the executable ->
--benchmark-ticks 18000 TestSaveFileName

At which point I presume the game will launch, load the specified save and benchmark it over 5 minutes?
I'd have tested this already but I'm running linux and appending things is not as straight forward as windows was for me at least. So before I quest though some Ubuntu forums can anyone confirm this for me? Also advice and suggestions welcome.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Benchmark testing help

Post by Jap2.0 »

They look like two separate commands to me. Sorry I can''t help beyond that.

Edit: Nevermind, it looks like it should be

Code: Select all

--benchmark [file] -ticks [N]
There are 10 types of people: those who get this joke and those who don't.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Benchmark testing help

Post by impetus maximus »

not sure, but creative mod might have some hoggish items that could hurt your overall UPS.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Benchmark testing help

Post by Jap2.0 »

Yes - I'd design it in creative, then test it without mods.
There are 10 types of people: those who get this joke and those who don't.

Sicnarf
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 08, 2016 9:32 pm
Contact:

Re: Benchmark testing help

Post by Sicnarf »

Could not figure out how to get it working in the end, the combination of Steam and Ubuntu is to much for me.
The shortcut lists a game ID, tried appending to it but it was no help. Tried appending directly to the executable (Factorio) just caused Factorio to download a new executable.
(Exec=steam steam://rungameid/427520)

I give up if anyone figures it out please let me know.
I'm going back to Windows when I build my next PC.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Benchmark testing help

Post by quyxkh »

The benchmarking's set up for command-line use. Run it from a terminal. If Ubuntu uses nautilus you should be able to type "Factorio" with any nautilus window active, open the one ending "/common/Factorio", and rclick-Open in Terminal to get there.

But maybe they've got it dumbed down far enough that "open in terminal" isn't an option, I don't know if the one I saw was set up that way by the local admin or that's a widespread choice. So, just in case, the guaranteed-to-work way is to open a terminal and

Code: Select all

locate -i \*/Factorio # or if that doesn't work, find ~ -iname Factorio
cd the/one/ending/in/common/Factorio
ln -s "$PWD" ~
which will set you up to "cd ~/Factorio" from any command prompt in the future.

Then you can e.g..

Code: Select all

bin/x64/factorio --benchmark saves/"your save.zip" --benchmark-ticks 100000
to run your benchmarks. It prints the timing data when it's done.

I've been making a mod to help with benchmarking, try it out if you don't mind using trains. It prints production and delivery stats to the terminal and provides (barely) enough convenience tools that you don't need creative mode or void chests to rig a blueprint for benchmarking, although it's certainly not as convenient as either of those for sketching.

Sicnarf
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 08, 2016 9:32 pm
Contact:

Re: Benchmark testing help

Post by Sicnarf »

Thanks quyxkh your a life saver, going to add what I found out in case anyone else needs the info in future.
The folders that store the game are hidden folders so they don't show up in standard searches.
Mine is located in ->
${HOME}/.local/share/Steam/steamapps/common/Factorio/

The save games are not located in the same folder tree they are stored in a separate hidden folder ->
${HOME}/.factorio/saves/

Command I ended up running after navigating to the factorio folder->
bin/x64/factorio --benchmark /home/username/.factorio/saves/"Ribbon53.zip" --benchmark-ticks 18000

Did not realise this was all going to be command line including the results. The map I fed it is a 1kspm base that runs around 50 UPS, below is the results it spit out after 5 min. Going to have to do some playing with this.
Performed 18000 updates in 300664.899 ms
avg: 16.704 ms, min: 14.151 ms, max: 33.146 ms
326.847 Steam API shutdown.
326.849 Goodbye

Sicnarf
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 08, 2016 9:32 pm
Contact:

Re: Benchmark testing help

Post by Sicnarf »

Well Linux had a fit and my browser stopped working. So I gave windows 7 a try and tried using the benchmark testing via windows command prompt.
I can append the benchmark commands without issue but command prompt will not spit out any results to me when the benchmark is finished.
Command prompt starts the steam API and then gives me no more data after that point, factorio launches and appears to run the benchmark and then closes. Command prompt still shows Initializing Seam API.
Anyone know how to get results from benchmark via the windows steam version?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Benchmark testing help

Post by posila »

Steam API will restart the game under the Steam process if it was launched from outside of Steam. I suggest you to use non-steam version for running benchmarks.

Sicnarf
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 08, 2016 9:32 pm
Contact:

Re: Benchmark testing help

Post by Sicnarf »

Thanks posila had no idea that buying the steam version gave me access to the non steam one.

Weird I'm getting better speeds on windows than I did on linux using the same save, don't know if it's because the Linux install was a couple of years old and this windows install is fresh. Then again game might be better optimized for Windows.

How to run the command in Windows via command prompt, navigate the command prompt to the below folder location and run the command listed after the location.
C:\Program Files\Factorio\bin\x64>factorio --benchmark "UPS8BeaconBot.zip" --benchmark-ticks 18000

Results
Performed 18000 updates in 288273.957 ms
avg: 16.015 ms, min: 13.500 ms, max: 30.918 ms

Post Reply

Return to “Technical Help”