Skip to content

Commit c80a9f8

Browse files
committed
Add Full Parameter List to Readme, update version to 1.2.0
Readme updates
1 parent bec98f7 commit c80a9f8

File tree

2 files changed

+154
-11
lines changed

2 files changed

+154
-11
lines changed

Readme.md

Lines changed: 148 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
* User mods can be enabled by using -enableMods (Useful for modpack benchmarking)
88
* Loading of benchmarked savefiles via -savePath
99
* Regex pattern can be used to further limit which saves are benchmarked via -pattern "some pattern"
10-
* Verbose result mode via -verboseResult allows creation of an excel file where
11-
separate run results are saved to their own sheets with tick based update
12-
times
10+
* Verbose result mode via -verboseResult allows creation of an xlsx file where
11+
separate run results are saved to their own sheets with tick based update times
1312
* Cpu Priority selection via -cpuPriority, defaults to "High"
1413

1514
Various other command line options and flags for customizing functionality.
@@ -36,8 +35,14 @@ all the possible flags please run this in powershell:
3635

3736
## Dependencies
3837

39-
Verbose mode depends on [Import-Excel](https://github.com/dfinke/ImportExcel)
40-
to create the output excel file with runs in their own sheets.
38+
Better output files depend on
39+
[Import-Excel](https://github.com/dfinke/ImportExcel) to create output .xlsx
40+
files.
41+
42+
Verbose output is possible with per-tick runs all in their own sheets.
43+
44+
Regular output file handles better localization and easier import to
45+
spreadsheet software (doesn't have to be excel).
4146

4247
Install it by running the following command in powershell:
4348

@@ -49,9 +54,6 @@ Script will ask ticks and runs and benchmarks all savefiles found in default sav
4954

5055
.\benchmark.ps1
5156

52-
cmdlet benchmark.ps1 at command pipeline position 1
53-
Supply values for the following parameters:
54-
(Type !? for Help.)
5557
ticks: 6000
5658
runs: 1
5759

@@ -132,6 +134,144 @@ Execute using verbose output. This will output an excel file with per-tick data.
132134
The script doesn't generate graphs but this is an example of what's possible by
133135
using per-tick data.
134136

137+
## Full Parameter List
138+
139+
### -ticks Int32
140+
141+
Specify the amount of ticks of simulation for each benchmark savefile run
142+
143+
### -runs Int32
144+
145+
Specify the amount of times to repeat each benchmark savefile
146+
147+
### -pattern String
148+
149+
Benchmark filenames can be filtered using this pattern
150+
Defaults to all savefiles found in ### -savepath
151+
152+
This setting is by default also used as a prefix to the result files
153+
See -removePatternAsOutputPrefix
154+
155+
### -configpath String
156+
157+
Factorio config path
158+
Defaults to $env:APPDATA\Factorio\ (Default Factorio config folder)
159+
160+
### -savepath String
161+
162+
Factorio save path
163+
Savefiles are collected recursively from this path
164+
Defaults to $env:APPDATA\Factorio\saves (Default Factorio save folder)
165+
166+
### -executable String
167+
168+
Factorio executable path
169+
Defaults to ${env:ProgramFiles(x86)}\Steam\steamapps\common\Factorio\bin\x64\factorio.exe (Default Steam installation folder)
170+
171+
### -platform String
172+
173+
Logging string that is used in the regular output file
174+
Defaults to WindowsSteam
175+
This is just for convention/convenience and is not used in any logic
176+
177+
### -notes String
178+
179+
Logging string that is used in the regular output file
180+
Add whatever notes you would like to be included for the given runs
181+
This is just for convention/convenience and is not used in any logic
182+
183+
### -outputName String
184+
185+
Base output filename (csv/xlsx)
186+
Default is results
187+
188+
### -outputNameVerbose String
189+
190+
Base verbose output filename (always xlsx)
191+
Default is verbose
192+
193+
### -outputFolder String
194+
195+
Output results folder
196+
197+
### -forceCSV
198+
199+
Script will default to using xlsx output if Export-Excel dependency is
200+
installed. You may force the non-verbose output file to always be CSV with
201+
this if you so wish.
202+
203+
Note: Usage of Excel specifically is not mandatory even with .xlsx files.
204+
Spreadsheet software just tend to import the data better in more rigid
205+
file formats than .csv which has issues with localization for example with
206+
decimal separators.
207+
208+
### -noOutputPrefix
209+
210+
By default the -pattern argument is used as a prefix in output filenames
211+
Use this flag to disable this behaviour
212+
213+
This is useful if you never want separate results files ever and just want
214+
to collect all results into one place regardless of your way of selecting
215+
benchmark files
216+
217+
### -keepLogs
218+
219+
If given preserve the raw logs produced by factorio.exe
220+
221+
### -clearOutputFile
222+
223+
If given and -output file exists clear it before running
224+
225+
### -enableMods
226+
227+
If given use user's normal mods
228+
By default a separate mod folder is used
229+
This separate mod folder can be specified with -benchmarkModFolder
230+
231+
### -benchmarkModFolder String
232+
233+
If -enableMods isn't given use this folder as the target for benchmarking mods
234+
Defaults to ./benchmark-mods/
235+
Note factorio expects this path in unix format with forward slashes for separators
236+
237+
### -verboseResult
238+
239+
If given enables verbose mode which logs per-tick benchmarks and outputs
240+
an xlsx file
241+
242+
### -verboseItems String
243+
244+
Specify the list of items included in verbose -verboseResult output. Valid items are:
245+
246+
tick,timestamp,wholeUpdate,latencyUpdate,gameUpdate,circuitNetworkUpdate,transportLinesUpdate,fluidsUpdate,heatManagerUpdate,entityUpdate,particleUpdate,mapGenerator,mapGeneratorBasicTilesSupportCompute,mapGeneratorBasicTilesSupportApply,mapGeneratorCorrectedTilesPrepare,mapGeneratorCorrectedTilesCompute,mapGeneratorCorrectedTilesApply,mapGeneratorVariations,mapGeneratorEntitiesPrepare,mapGeneratorEntitiesCompute,mapGeneratorEntitiesApply,crcComputation,electricNetworkUpdate,logisticManagerUpdate,constructionManagerUpdate,pathFinder,trains,trainPathFinder,commander,chartRefresh,luaGarbageIncremental,chartUpdate,scriptUpdate,
247+
248+
tick must be one of the selected items, otherwise the script won't work
249+
250+
### -cpuPriority String
251+
252+
Specify which CPU priority to use. Valid values are:
253+
254+
Idle, BelowNormal, Normal, AboveNormal, High, or RealTime
255+
256+
Defaults to High
257+
258+
### -cpuAffinity Int32
259+
260+
Specify CPU affinity. Valid values between 0 - 255
261+
262+
Sum the numbers associated with the cores to specify the cores you want factorio to run in.
263+
Core 1 = 1
264+
Core 2 = 2
265+
Core 3 = 4
266+
Core 4 = 8
267+
Core 5 = 16
268+
Core 6 = 32
269+
Core 7 = 64
270+
Core 8 = 128
271+
Eg. enabling core 1, 3 and 5 is 1 + 4 + 16 = 21
272+
273+
Defaults to 0 which disables affinity specification altogether
274+
135275
## Contributors
136276

137277
Thanks to KnightElite from the Technical Factorio Discord for the base script!

benchmark.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A Factorio Benchmark Powershell Script
44
.DESCRIPTION
55
Author: Tapani Kiiskinen
6-
Version: v1.1.2
6+
Version: v1.2.0
77
Depends on Import-Excel https://github.com/dfinke/ImportExcel for -verboseOutput and nicer normal output
88
.EXAMPLE
99
@@ -93,10 +93,12 @@ param (
9393
# ADVANCED SETTINGS #
9494
#####################
9595

96-
# Output filename
96+
# Base output filename (csv/xlsx)
97+
# Default is results
9798
[string]$outputName = "results",
9899

99-
# Verbose output filename (always xlsx)
100+
# Base verbose output filename (always xlsx)
101+
# Default is verbose
100102
[string]$outputNameVerbose = "verbose",
101103

102104
# Output results folder
@@ -105,6 +107,7 @@ param (
105107
# Script will default to using xlsx output if Export-Excel dependency is
106108
# installed. You may force the non-verbose output file to always be CSV with
107109
# this if you so wish.
110+
#
108111
# Note: Usage of Excel specifically is not mandatory even with .xlsx files.
109112
# Spreadsheet software just tend to import the data better in more rigid
110113
# file formats than .csv which has issues with localization for example with

0 commit comments

Comments
 (0)