You can run benchmarks from the command line
Benchmarking GameMaker » Devlog


If you just wanna see results without clicking on a bunch of stuff, you can now run benchmarks through the command line.
You can pass command line arguments as:
- a name of a benchmark (use a quoted string if the name contains spaces) (quoted strings work correctly in Windows PowerShell, not sure about other terminals)
- -trials or -iter followed by a number to set the trial and iteration count of the previous benchmark (defaults to 4 and 100,000 if not specified, the same as in the GUI)
- -file followed by the name of the file to output; if the file is a .csv it’ll output a spreadsheet like the one you can export through the GUI, otherwise it’ll output a text file with the results written out in a list
- -dontkill, if you don’t want the GUI to immediately close if it outputs results; the benchmarks that you ran through the command line will have their results shown in the list
For example:
GMBenchmark.exe "Fast inverse square root" -trials 5 -file "results.txt" "Math Functions" "Fast Loops"
will run “Fast inverse square root” with 5 trials, and “Math Functions” and “Fast Loops” with 4 trials, and output the results to “results.txt”.
The GameMaker IDE currently doesn’t support command line arguments, so if you want to emulate this behavior through the IDE, go down to the bottom of the file GM_Benchmark and edit the ide_cmd_args array with the same arguments as if they were command line arguments.
var ide_cmd_args = [
"Fast inverse square root", "-trials", 5,
"-dontkill", "-file", "C:/Users/drago/results.txt",
"Math Functions", "Fast Loops"
];
Files
GMBenchmark-Windows.zip 3.2 MB
15 days ago
GMBenchmark-Windows-YYC.zip 3.8 MB
15 days ago
Get Benchmarking GameMaker
Download NowName your own price
Benchmarking GameMaker
People who like to micro-optimize their code, this one's for you.
More posts
- Added lines for +/- 5% margins on the graph54 days ago
- There's now a version you can play with in the browserNov 22, 2024
- Added a CSV exportNov 17, 2023
Leave a comment
Log in with itch.io to leave a comment.