FSO has support for running automated performance benchmarks using the -benchmark_mode command line. This option currently has the following effects:
- The pilot selection is automatically accepted (make sure there is a pilot to accept)
- FSO will quit after running one mission
This feature can be combined with -profile_frame_time to gather detailed performance data without requiring any interaction while running the test.
-profile_frame_time and -profile_write_file
When FSO is started with these options, it will write information about the frame times to a file called profiling.csv in the main FSO directory. Each line contains the system time and the frametime of each rendered frame in the format <system time>;<frametime>. Both time values are measured in microseconds. system time is measured from an arbitrary point in the past. To get consistent results with it the first system time value should be subtracted from all system time values. The first two frames are usually very long because the timer is set at engine startup so you might want to exclude those from your data. This script uses python and numpy to generate two graphs from two sets of data which can be used to compare two different versions of the engine.
To actually run a mission you could use the commandline option -start_mission <mission> which will start the specified mission after entering the main hall. To keep the tests non interactive the started mission should be a cutscene which automatically ends when the end is reached. Here is a list of mods that contain such missions:
- Blue Planet Complete
- bp2-17.fs2: Icarus cutscene of War in Heaven. A very demanding mission which is great for testing performance.
- bp2-00.fs2: Intro cutscene of War in Heaven. Also great for performance testing.
- -nomovies: Can be used to disable playback of movies which speeds up game startup.
- -no_unfocused_pause: Disables automatic pausing when the FSO window isn't focused. Can be used to use another application while the benchmark is running.
- -noninteractive: Disables all dialogs or other things that may require interaction. This makes sure that FSO exits in a finite time. If it doesn't please create an issue on the GitHub bug tracker.
- -profile_frame_time: Shows the amount per frame that each subsystem takes to complete on the left side of the screen.