summaryrefslogtreecommitdiff
path: root/testsuite/driver
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-10-13 11:43:51 -0400
committerBen Gamari <ben@smart-cactus.org>2020-10-16 00:15:31 -0400
commitc6b4be4bfc9754050a8014851f5adde9721589bc (patch)
tree17ba6126e324bb040954890383d36e0e4c64537a /testsuite/driver
parentbf7c5b6ddea5024baa2e04110ab2801f8797fafd (diff)
downloadhaskell-c6b4be4bfc9754050a8014851f5adde9721589bc.tar.gz
testsuite: Sort metrics by metric type
Closes #18838.
Diffstat (limited to 'testsuite/driver')
-rw-r--r--testsuite/driver/runtests.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index c4411977dd..591f9f5be9 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -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("")