diff options
author | Antonio Caggiano <antonio.caggiano@collabora.com> | 2021-02-22 20:06:04 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2021-05-20 14:01:33 +0200 |
commit | eee7d89611cf6dbafdd23f85b2f5f25ecc2d1ca3 (patch) | |
tree | 7965da933a3069383e21d48ac00e41be3aed2e5e /replayer | |
parent | 9f16a6a4581c6cb5bdbc830586d4bff7dd4d7ce7 (diff) |
tests: Replay profile frame times
Improve replay profile by adding a subcommand option which can be either
`compare` or `profile`. The profile command runs apitrace in benchmark
mode, loops over the final frame a number of times, and collects the GPU
durations of the frames.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/483>
Diffstat (limited to 'replayer')
-rwxr-xr-x | replayer/replayer.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/replayer/replayer.py b/replayer/replayer.py index a0ee4785e..87ec9cc15 100755 --- a/replayer/replayer.py +++ b/replayer/replayer.py @@ -3,6 +3,7 @@ # # Copyright (c) 2014, 2019 Intel Corporation # Copyright © 2020 Valve Corporation. +# Copyright © 2021 Collabora Ltd. # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation @@ -83,6 +84,7 @@ import framework.replay.programs.query as query import framework.replay.programs.download as download import framework.replay.programs.checksum as checksum import framework.replay.programs.dump as dump +import framework.replay.programs.profile as profile def main(): @@ -127,6 +129,12 @@ def main(): 'and their checksums for each device.')) parser_query.set_defaults(func=query.query) + parser_profile = subparsers.add_parser( + 'profile', + add_help=False, + help=('Measure frame times of a trace file.')) + parser_profile.set_defaults(func=profile.profile) + # Parse the known arguments (replayer compare or replayer query for # example), and then pass the arguments that this parser doesn't know about # to that executable |