Commit c6b4be4b authored by Ben Gamari's avatar Ben Gamari 🐢

testsuite: Sort metrics by metric type

Closes #18838.
parent bf7c5b6d
......@@ -457,7 +457,21 @@ else:
if config.baseline_commit:
print('Performance baseline: %s\n' % config.baseline_commit)
if any(t.metrics):
tabulate_metrics(t.metrics)
# Group metrics by metric type
groups = {} # type: Dict[MetricName, List[PerfMetric]]
for m in t.metrics:
if m.stat.metric not in groups:
groups[m.stat.metric] = []
groups[m.stat.metric].append(m)
for metric_name, stats in groups.items():
heading = 'Metrics: %s' % metric_name
print()
print(heading)
print('-' * len(heading))
print()
tabulate_metrics(stats)
else:
print("\nNone collected.")
print("")
......
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