1
1
# A Factorio Benchmark Powershell Script
2
2
3
+ #### Regular results
4
+
5
+ ![ Regular Results Example] ( results_example.png?raw=true " Regular Results Example ")
6
+
7
+ #### -verboseOutput results
8
+
9
+ ![ Verbose Results Example] ( verbose_example.png?raw=true " Verbose Results Example ")
10
+
11
+ The script doesn't automatically generate graphs but this is an example of
12
+ what's possible with per-tick data generated with -verboseOutput
13
+
3
14
## Features:
4
15
5
- * Aggregation of benchmark data into an output CSV file
16
+ * Aggregation of benchmark data into output files
6
17
* Disabling of mods for the duration of the benchmark
7
18
* User mods can be enabled by using -enableMods (Useful for modpack benchmarking)
8
19
* Loading of benchmarked savefiles via -savePath
11
22
separate run results are saved to their own sheets with tick based update times
12
23
* Cpu Priority selection via -cpuPriority, defaults to "High"
13
24
14
- Various other command line options and flags for customizing functionality.
25
+ Various other command line options and flags for customizing functionality per invocation .
15
26
Default values can be changed by editing the script, in the params section
16
27
17
28
## Installation
@@ -50,7 +61,7 @@ Install it by running the following command in powershell:
50
61
51
62
## Examples
52
63
53
- Script will ask ticks and runs and benchmarks all savefiles found in default save location:
64
+ #### Script will ask ticks and runs and benchmarks all savefiles found in default save location:
54
65
55
66
.\benchmark.ps1
56
67
@@ -70,7 +81,7 @@ Script will ask ticks and runs and benchmarks all savefiles found in default sav
70
81
Executing benchmark after confirmation. Ctrl-c to cancel. Press Enter to continue...:
71
82
72
83
73
- Giving ticks, runs and save pattern as parameters:
84
+ #### Giving ticks, runs and save pattern as parameters:
74
85
75
86
.\benchmark.ps1 1000 1 "Benchmark"
76
87
@@ -88,27 +99,29 @@ Giving ticks, runs and save pattern as parameters:
88
99
Inserter Benchmark Run 1 5.5595 seconds
89
100
90
101
91
- Output results can bee seen in Results folder:
92
-
93
- .\Results\flame_sla_10k results.csv:
102
+ Output results can bee seen in ` Results\Results.csv ` :
94
103
95
104
Save,Run,Startup time,End time,Avg ms,Min ms,Max ms,Ticks,Execution Time ms,Effective UPS,Version,Platform,Calibration
96
105
flame_sla_10k,1,10.550,14.873,2.892,2.318,25.153,1000,2891.624,345.83,1.1.110,WindowsSteam,
97
106
flame_sla_10k,2,10.483,14.840,2.936,2.358,27.130,1000,2935.500,340.66,1.1.110,WindowsSteam,
98
107
99
- Execute using verbose output. This will output an excel file with per-tick data.
108
+ #### Execute using verbose output. This will output an xlsx file with per-tick data.
100
109
101
110
PS> .\benchmark.ps1 1000 2 "flame_sla_10k" -verboseResult
102
111
103
112
UNMET DEPENDENCY.
104
113
105
114
Export-Excel cmdlet not found for verbose mode.
106
- Script will continue normally but verbose excel file won't be generated.
115
+ Script will continue normally but verbose results file won't be generated.
107
116
Please install the dependency by running this command in powershell:
108
117
109
118
Install-Module ImportExcel -scope CurrentUser
110
119
111
- Ctrl-c to cancel. Press Enter to continue...: <Ctrl-C>
120
+ Ctrl-c to cancel. Press Enter to continue...:
121
+
122
+ If the ImportExcel dependency is not installed you will get this message.
123
+
124
+ Ctrl-c out of it and install the dependency:
112
125
113
126
PS> Install-Module ImportExcel -scope CurrentUser
114
127
@@ -118,6 +131,8 @@ Execute using verbose output. This will output an excel file with per-tick data.
118
131
'PSGallery'?
119
132
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y
120
133
134
+ Then you're free to retry the command:
135
+
121
136
PS> .\benchmark.ps1 1000 2 "flame_sla" -verboseResult
122
137
123
138
Following saves found matching pattern 'flame_sla_10k':
@@ -129,10 +144,7 @@ Execute using verbose output. This will output an excel file with per-tick data.
129
144
Benchmarking flame_sla_10k Run 1 2.891624 seconds
130
145
Benchmarking flame_sla_10k Run 2 2.9355 seconds
131
146
132
- ![ Verbose Excel Results Example] ( excel_example.png?raw=true " Verbose Excel Results Example ")
133
-
134
- The script doesn't generate graphs but this is an example of what's possible by
135
- using per-tick data.
147
+ Verbose results can be found in ` .\Results\Verbose Results.xlsx ` :
136
148
137
149
## Full Parameter List
138
150
@@ -205,14 +217,10 @@ Spreadsheet software just tend to import the data better in more rigid
205
217
file formats than .csv which has issues with localization for example with
206
218
decimal separators.
207
219
208
- ### -noOutputPrefix
220
+ ### -usePatternAsOutputPrefix
209
221
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
222
+ Add -pattern string to output files as prefix.
223
+ Useful if you don't want all your results ending up in the same files.
216
224
217
225
### -keepLogs
218
226
@@ -260,14 +268,16 @@ Defaults to High
260
268
Specify CPU affinity. Valid values between 0 - 255
261
269
262
270
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
+
272
+ * Core 1 = 1
273
+ * Core 2 = 2
274
+ * Core 3 = 4
275
+ * Core 4 = 8
276
+ * Core 5 = 16
277
+ * Core 6 = 32
278
+ * Core 7 = 64
279
+ * Core 8 = 128
280
+
271
281
Eg. enabling core 1, 3 and 5 is 1 + 4 + 16 = 21
272
282
273
283
Defaults to 0 which disables affinity specification altogether
0 commit comments