diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-13 11:43:51 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-16 00:15:31 -0400 |
commit | c6b4be4bfc9754050a8014851f5adde9721589bc (patch) | |
tree | 17ba6126e324bb040954890383d36e0e4c64537a /testsuite | |
parent | bf7c5b6ddea5024baa2e04110ab2801f8797fafd (diff) | |
download | haskell-c6b4be4bfc9754050a8014851f5adde9721589bc.tar.gz |
testsuite: Sort metrics by metric type
Closes #18838.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/driver/runtests.py | 16 |
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("") |