Commit 8f0c7aca authored by Benedikt Schemmer's avatar Benedikt Schemmer Committed by Marek Olšák

si-report: Show biggest improvements also

Sometimes it is nice (and useful) to not just see if you've messed up
but also if you've made an improvement.
Signed-off-by: 's avatarMarek Olšák <marek.olsak@amd.com>
parent e03fd1a6
......@@ -686,6 +686,30 @@ def print_tables(before_all_results, after_all_results):
break
if num > 0:
print
# biggest improvements
metrics = si_stats().metrics
for i in range(len(metrics)):
field = metrics[i][0]
num = 0
more_is_better = metrics[i][0] == 'maxwaves'
if more_is_better:
sort_key = lambda v: -v[1].diff.__dict__[field]
else:
sort_key = lambda v: v[1].diff.__dict__[field]
for name, stats in sorted(shaders.items(), key = sort_key):
if more_is_better:
if stats.diff.__dict__[field] <= 0:
continue
else:
if stats.diff.__dict__[field] >= 0:
continue
if num == 0:
print_yellow(" BIGGEST IMPROVEMENTS - {:64}".format(metrics[i][1]))
print_yellow(" Before After Delta Percentage")
stats.print_regression(name, field)
num += 1
if num == num_listed:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment