Performance testing by replaying recordings

From FlightGear wiki
Jump to navigation Jump to search

Overview

Continuous recordings can record and replay the main window's size and the view (view type, direction, zoom), so replaying can be used to do standardised performance testing of the rendering code.

We have a Python script in the flightgear repository called flightgear/scripts/python/performance_replay.py that replays a recording in Flightgear while gathering frame-time information, from which is outputs statistics such as average and standard deviation frame times and average frame rate.

Recordings can be replayed from a URL, which simplifies various use cases.

As of 2021-11-8, these changes have been pushed to next; See: FlightGear commit 50a4d869617e6d

Usage

Example usage replaying a short recording of the Harrier-GR3 at LOWI, replaying window size and view changes, and then showing frame-rate statistics:

   ./flightgear/scripts/python/performance_replay.py -f ./run_fgfs.sh -i http://op59.net/harrier-gr3-20211107-162046-continuous.fgtape

Future

  • Improve communication - at the moment, the telnet protocol is slow and limits how much data can be transfered, which restricts the amount of data sent from Flightgear to performance_replay.py after replay has finished.
  • Specify a fixed set of weather parameters, possibly including a fixed seed for random number generation. Also see Advanced_weather#Connection_with_the_multiplayer_system.
  • Write output data to a file so it can be available to other programmes, e.g. for plotting.

Other