diff options
author | Rob Clark <robdclark@chromium.org> | 2019-08-13 09:19:40 -0700 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2019-10-24 23:21:49 +0000 |
commit | feca90cd56d096321ce33bbba514652b05d81d09 (patch) | |
tree | 079f256ca9cabe2199b5f0541fe6737237ddd14e /report.py | |
parent | 26740802166aab88b90cb42b05561b14c5f04744 (diff) |
report: add arg to filter on shader stage
Useful to filter down how a compiler change effects a given shader
stage.
Diffstat (limited to 'report.py')
-rwxr-xr-x | report.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -8,7 +8,7 @@ from scipy import stats import numpy as np -def get_results(filename): +def get_results(filename, args): file = open(filename, "r") lines = file.read().split('\n') @@ -33,6 +33,9 @@ def get_results(filename): stage = groups[1] stats = groups[2] + if args.stage and args.stage != stage: + continue + result_group = {} for stat in stats.split(', '): stat_split_spaces = stat.split(' ') @@ -130,12 +133,13 @@ def main(): help="do not show the per-shader helped / hurt data") parser.add_argument("--changes-only", "-c", action="store_true", default=False, help="only show measurements that have changes") + parser.add_argument("--stage", "-S", help="limit results to specified shader stage") parser.add_argument("before", help="the output of the original code") parser.add_argument("after", help="the output of the new code") args = parser.parse_args() - before = get_results(args.before); - after = get_results(args.after); + before = get_results(args.before, args); + after = get_results(args.after, args); # Grab these and remove them from the dictionary time_before = before.pop("time") |