[pypy-svn] r60143 - pypy/build/benchmem
hpk at codespeak.net
hpk at codespeak.net
Tue Nov 25 20:47:41 CET 2008
Author: hpk
Date: Tue Nov 25 20:47:39 2008
New Revision: 60143
Modified:
pypy/build/benchmem/runbench.py
Log:
for my device i needed to provide an exact path to the executable
and modify the order of benchmarks for the speed benchmarks,
running gcbench last would consistently lead to failed commands.
(go figure)
Modified: pypy/build/benchmem/runbench.py
==============================================================================
--- pypy/build/benchmem/runbench.py (original)
+++ pypy/build/benchmem/runbench.py Tue Nov 25 20:47:39 2008
@@ -119,11 +119,12 @@
for _ in xrange(self.numiter):
popen = Popen(cmds, shell=True, stdout=PIPE,
stderr=PIPE, close_fds=True, env=env)
- if popen.wait():
- print "ERROR in command " + cmds
- continue
output_error = popen.stderr.read()
output = popen.stdout.read()
+ if popen.wait():
+ print "ERROR in command", cmds
+ print "stderr:", output_error
+ continue
timelines = output_error.strip().splitlines()[-3:]
times = {}
@@ -148,7 +149,8 @@
('importos', '-S -c "import os"'),
('importoptparse', '-S -c "import optparse"'),
):
- cmd = "%s %s " % (self.executable, cmdpostfix)
+ executable = py.path.local.sysfind(self.executable)
+ cmd = "%s %s " % (executable, cmdpostfix)
times = self.timecommand(cmd)
print >>self.logstream, "%s:%r" % (name, times)
@@ -161,11 +163,12 @@
def run(self):
self.write_benchheader("benchtime")
for name, cmdpostfix, pattern in (
+ ('gcbench', '-c "import gcbench_runner; gcbench_runner.main()"', "T: "),
('pystone', '-c "import pystone; pystone.main(10000)"', PYSTONE_PATTERN),
('richards', '-c "import richards; richards.main(iterations=1)"', RICHARDS_PATTERN),
- ('gcbench', '-c "import gcbench_runner; gcbench_runner.main()"', "T: "),
):
- cmd = "%s %s " % (self.executable, cmdpostfix)
+ executable = py.path.local.sysfind(self.executable)
+ cmd = "%s %s " % (executable, cmdpostfix)
times = self.timecommand(cmd, str(benchmarkdir), pattern)
print >>self.logstream, "%s:%r" % (name, times)
More information about the Pypy-commit
mailing list