summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-12-09 16:07:44 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-27 10:02:25 -0400
commit16df6058cd234b81b3e4a86e986f1598b45e1cd1 (patch)
treee1c86f54c772fd602c1bc46ef5b7325a1f5132a7
parent360dc2bc2de3ddcb9c77ce85db7f257d95d9ce56 (diff)
downloadhaskell-16df6058cd234b81b3e4a86e986f1598b45e1cd1.tar.gz
testsuite: Report minimum and maximum stat changes
As suggested in #20733.
-rw-r--r--testsuite/driver/runtests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 5510adfdef..6a68b67714 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -419,15 +419,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: