[pypy-svn] r59603 - pypy/build/benchmem
xoraxax at codespeak.net
xoraxax at codespeak.net
Fri Oct 31 19:12:39 CET 2008
Author: xoraxax
Date: Fri Oct 31 19:12:38 2008
New Revision: 59603
Modified:
pypy/build/benchmem/report_graphic.py
Log:
Change graph reporter to use wall clock time instead of %. This is a bit annoying because of different running time but certainly more dependable because we do a lot of IO in the logger and have to expect scheduling issues. Fix graph reporter to check whether the benchlog contains the particular result sets at all.
Modified: pypy/build/benchmem/report_graphic.py
==============================================================================
--- pypy/build/benchmem/report_graphic.py (original)
+++ pypy/build/benchmem/report_graphic.py Fri Oct 31 19:12:38 2008
@@ -22,7 +22,8 @@
* ip data
* private rest
"""
-
+ if not results:
+ return
heap_private = numpy.array([result.snapshot.filter(group=HEAP).private
for result in results])
ip_code = numpy.array([result.snapshot.filter(group=result.executable,
@@ -64,7 +65,8 @@
private memory consumed for object allocation (without base interpreter
size)
"""
-
+ if not resultset.results:
+ return
def incremental_private(result):
return (result.snapshots[1].heap_private() -
result.snapshots[0].heap_private())
@@ -118,17 +120,31 @@
pylab.clf()
for name, results in resultset.filter(benchtype="appprofiles").getname2results():
plots = []
+ USE_TS = True
for result in results:
- lgt = len(result.snapshots)
- x = [(float(i)/lgt)*100 for i in range(lgt)]
- y = [snapshot.private - totals[result.executable]
+ if not USE_TS:
+ lgt = len(result.snapshots)
+ x = [(float(i)/lgt)*100 for i in range(lgt)]
+ else:
+ x = [float(ss.header['TS']) for ss in result.snapshots]
+ min_ts = min(x)
+ x = [val - min_ts for val in x]
+ if totals:
+ basesize = totals[result.executable]
+ else:
+ basesize = 0
+ # XXX measures also the used code pages, this is bad because we do not want to
+ # mix effects because of code generation and GC behaviour
+ y = [snapshot.private - basesize
for snapshot in result.snapshots]
pylab.title(name)
plots.append(pylab.plot(x, y))
pylab.legend(plots, [result.executable for result in results])
- pylab.xlabel("time (%)")
- pylab.ylabel("incremental private memory consumption")
+ xlabel = ["time (%)", "wall clock time (s)"][USE_TS]
+ pylab.xlabel(xlabel)
+ ylabel = ["", "incremental "][bool(basesize)] + "private memory consumption"
+ pylab.ylabel(ylabel)
pylab.savefig(BASE + 'appprofiles_%s.ps' % name)
if SHOW:
pylab.show()
More information about the Pypy-commit
mailing list