Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r376:8602542d6a2c
Date: 2017-03-08 14:41 +0100
http://bitbucket.org/pypy/benchmarks/changeset/8602542d6a2c/

Log:    Display the geom. average of all items dropping the 1st and last,
        too

diff --git a/display_local.py b/display_local.py
--- a/display_local.py
+++ b/display_local.py
@@ -92,6 +92,7 @@
 
     l_avg1 = []
     l_avg2 = []
+    l_diff = []
     for name in all_names:
         row = [name, '']
         table.append(row)
@@ -103,6 +104,7 @@
             row.append(perf.TimeDelta(t_avg1, t_avg2))
             l_avg1.append(t_avg1)
             l_avg2.append(t_avg2)
+            l_diff.append(t_avg1 / t_avg2)
 
     table.append([])
     if len(l_avg1) == len(all_names):
@@ -113,6 +115,18 @@
                '', '', str(round(g_avg2, 3)), '', '', '',
                perf.TimeDelta(g_avg1, g_avg2)]
         table.append(row)
+        if len(l_avg1) > 3:
+            l_avg = zip(l_diff, l_avg1, l_avg2)
+            l_avg.sort()
+            del l_avg[0]
+            del l_avg[-1]
+            g_avg1 = geometric_average([y for x,y,z in l_avg])
+            g_avg2 = geometric_average([z for x,y,z in l_avg])
+            row = ['without 1st/last', '',
+                   '', '', str(round(g_avg1, 3)), '', '', '',
+                   '', '', str(round(g_avg2, 3)), '', '', '',
+                   perf.TimeDelta(g_avg1, g_avg2)]
+        table.append(row)
         table.append([])
 
     lengths = []
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to