[Git][ghc/ghc][master] Sort deterministically metric output

Marge Bot gitlab at gitlab.haskell.org
Thu May 21 16:24:05 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
8a816e5f by Krzysztof Gogolewski at 2020-05-21T12:23:55-04:00
Sort deterministically metric output

Previously, we sorted according to the test name and way,
but the metrics (max_bytes_used/peak_megabytes_allocated etc.)
were appearing in nondeterministic order.

- - - - -


1 changed file:

- testsuite/driver/runtests.py


Changes:

=====================================
testsuite/driver/runtests.py
=====================================
@@ -339,7 +339,7 @@ def cleanup_and_exit(exitcode):
     exit(exitcode)
 
 def tabulate_metrics(metrics: List[PerfMetric]) -> None:
-    for metric in sorted(metrics, key=lambda m: (m.stat.test, m.stat.way)):
+    for metric in sorted(metrics, key=lambda m: (m.stat.test, m.stat.way, m.stat.metric)):
         print("{test:24}  {metric:40}  {value:15.3f}".format(
             test = "{}({})".format(metric.stat.test, metric.stat.way),
             metric = metric.stat.metric,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a816e5fbe02c476f51ec92563cad8247ffc90ba

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a816e5fbe02c476f51ec92563cad8247ffc90ba
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/20200521/7ef21451/attachment-0001.html>


More information about the ghc-commits mailing list