|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"""Script allowing to replay a given trace file. |
|
Example usage: |
|
python replay.py --trace_file=/tmp/dumps/shutdown_20190521-165136974075.dump |
|
""" |
|
|
|
from __future__ import absolute_import |
|
from __future__ import division |
|
from __future__ import print_function |
|
|
|
from gfootball.env import script_helpers |
|
|
|
from absl import app |
|
from absl import flags |
|
|
|
FLAGS = flags.FLAGS |
|
|
|
flags.DEFINE_string('trace_file', None, 'Trace file to replay') |
|
flags.DEFINE_integer('fps', 10, 'How many frames per second to render') |
|
flags.mark_flag_as_required('trace_file') |
|
|
|
|
|
def main(_): |
|
script_helpers.ScriptHelpers().replay(FLAGS.trace_file, FLAGS.fps) |
|
|
|
|
|
if __name__ == '__main__': |
|
app.run(main) |
|
|