diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-12-09 16:07:44 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-04-21 12:08:20 -0400 |
commit | 6673f78fc62a27a33f25ad086c8ecad4ef07e4e1 (patch) | |
tree | 061046c82874b3a6cc2153af967144f94587a50d | |
parent | 0c02c9199c26bebde17cd0afd378802c6d622a88 (diff) | |
download | haskell-wip/T20733.tar.gz |
testsuite: Report minimum and maximum stat changeswip/T20733
As suggested in #20733.
-rw-r--r-- | testsuite/driver/runtests.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 0d458924d0..a8852d0197 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -416,15 +416,19 @@ def tabulate_metrics(metrics: List[PerfMetric]) -> None: "{}".format(x.change.hint()) )) for x in sorted(metrics, key = lambda m: (m.stat.test, m.stat.way, m.stat.metric))] - geoMean = geometric_mean([ + + changes = [ x.stat.value / x.baseline.perfStat.value for x in metrics if x.baseline is not None - ]) + ] dataRows += [ row(("", "", "", "", "", "", "", "")), - row(("geo. mean", "", "", "", "", "", "{:+4.1f}%".format(100*(geoMean-1)), "")) + row(("geo. mean", "", "", "", "", "", "{:+4.1f}%".format(100*(geometric_mean(changes)-1)), "")), + row(("minimum ", "", "", "", "", "", "{:+4.1f}%".format(100*(min(changes)-1)), "")), + row(("maximum ", "", "", "", "", "", "{:+4.1f}%".format(100*(max(changes)-1)), "")), ] + print_table(headerRows, dataRows, 1) print("") if hasBaseline: |