[Git][ghc/ghc][wip/T18838] testsuite: Sort metrics by metric type
Ben Gamari
gitlab at gitlab.haskell.org
Tue Oct 13 15:44:35 UTC 2020
Ben Gamari pushed to branch wip/T18838 at Glasgow Haskell Compiler / GHC
Commits:
72224228 by Ben Gamari at 2020-10-13T11:44:31-04:00
testsuite: Sort metrics by metric type
Closes #18838.
- - - - -
1 changed file:
- testsuite/driver/runtests.py
Changes:
=====================================
testsuite/driver/runtests.py
=====================================
@@ -457,7 +457,20 @@ 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 = {}
+ for stat in t.metrics:
+ if stat.metric not in groups:
+ groups[stat.metric] = []
+
+ groups[stat.metric].append(stat)
+
+ for metric_name, stats in groups.items():
+ heading = 'Metrics: %s' % metric_name
+ print(heading)
+ print('-' * len(heading))
+ print()
+ tabulate_metrics(stats)
else:
print("\nNone collected.")
print("")
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/72224228fbc53fc304af5706ed7e4f905f05f19e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/72224228fbc53fc304af5706ed7e4f905f05f19e
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201013/493fb64b/attachment-0001.html>
More information about the ghc-commits
mailing list