[pypy-svn] r59925 - pypy/build/benchmem

xoraxax at codespeak.net xoraxax at codespeak.net
Sat Nov 15 11:12:45 CET 2008


Author: xoraxax
Date: Sat Nov 15 11:12:44 2008
New Revision: 59925

Modified:
   pypy/build/benchmem/report.py
Log:
Also show duration for appprofile runs.

Modified: pypy/build/benchmem/report.py
==============================================================================
--- pypy/build/benchmem/report.py	(original)
+++ pypy/build/benchmem/report.py	Sat Nov 15 11:12:44 2008
@@ -360,15 +360,18 @@
         tw.sep("=", "Appprofiles memory sampling")
         # result.mintimings -> [(name, timings_dict)]
         executables = self.getexecutables()
-        row0 = "run #snapshots min avg max".split()
+        row0 = "run duration #snapshots min avg max".split()
         rows = [row0]
         names = [result.benchname for result in self.resultset.results]
         for name in names:
             for result in self.resultset.results:
                 if name == result.benchname:
-                        rows.append(["%s-%s" %(result.executable, name),
-                            len(result.snapshots),
-                            result.min, "%.2f" % result.avg, result.max])
+                    timestamps = [float(ss.timestamp) for ss in result.snapshots]
+                    min_ts, max_ts = min(timestamps), max(timestamps)
+
+                    rows.append(["%s-%s" %(result.executable, name),
+                       "%.2f" % (max_ts - min_ts, ), len(result.snapshots),
+                       result.min, "%.2f" % result.avg, result.max])
         tw.line(asciitable(rows))
 
 



More information about the Pypy-commit mailing list