[pypy-svn] r20950 - pypy/dist/pypy/translator/goal
ericvrp at codespeak.net
ericvrp at codespeak.net
Fri Dec 9 17:34:00 CET 2005
Author: ericvrp
Date: Fri Dec 9 17:33:59 2005
New Revision: 20950
Modified:
pypy/dist/pypy/translator/goal/bench-cronjob.py
pypy/dist/pypy/translator/goal/bench-unix.py
Log:
* don't stop when one of the backends is unable to generate an exe.
* enhance benchmark output
* post the benchmark result on http://codespeak.net/~ericvrp/benchmark/
Modified: pypy/dist/pypy/translator/goal/bench-cronjob.py
==============================================================================
--- pypy/dist/pypy/translator/goal/bench-cronjob.py (original)
+++ pypy/dist/pypy/translator/goal/bench-cronjob.py Fri Dec 9 17:33:59 2005
@@ -2,21 +2,6 @@
import time, os, sys, stat
-current_result = '''
-executable richards pystone
-python 2.4.2c1 855ms ( 1.00x) 44642 ( 1.00x)
-pypy-llvm-17884 11034ms ( 12.91x) 3362 ( 13.28x)
-pypy-llvm-17881 11702ms ( 13.69x) 3240 ( 13.78x)
-pypy-llvm-17870 12683ms ( 14.83x) 3073 ( 14.53x)
-pypy-llvm-17862 13053ms ( 15.27x) 3017 ( 14.79x)
-pypy-llvm-17797 13497ms ( 15.79x) 2832 ( 15.76x)
-pypy-llvm-17792 13808ms ( 16.15x) 2818 ( 15.84x)
-pypy-llvm-17758 16998ms ( 19.88x) 2237 ( 19.96x)
-pypy-c-17853 22389ms ( 26.19x) 1651 ( 27.04x)
-pypy-c-17806 22328ms ( 26.11x) 1660 ( 26.88x)
-pypy-c-17758 23485ms ( 27.47x) 1598 ( 27.92x)
-'''
-
homedir = os.getenv('HOME')
os.putenv('PATH','~/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3.6')
@@ -27,7 +12,8 @@
def update_llvm():
os.chdir(homedir + '/projects/llvm')
os.system('cvs -q up 2>&1')
- os.system('make tools-only 2>&1')
+ os.system('make clean 2>&1')
+ os.system('make -j3 tools-only 2>&1')
def compile(backend):
os.chdir(homedir + '/projects/pypy-dist/pypy/translator/goal')
@@ -51,7 +37,11 @@
os.system('cat /proc/cpuinfo')
os.system('free')
os.chdir(homedir + '/projects/pypy-dist/pypy/translator/goal')
- os.system('python bench-unix.py 2>&1' % locals())
+ os.system('python bench-unix.py 2>&1 | tee benchmark.txt' % locals())
+ os.system('echo "<html><body><pre>" > benchmark.html')
+ os.system('cat benchmark.txt >> benchmark.html')
+ os.system('echo "</pre></body></html>" >> benchmark.html')
+ os.system('scp benchmark.html ericvrp at codespeak.net:public_html/benchmark/index.html')
def main(backends=[]):
if backends == []:
@@ -60,7 +50,10 @@
update_pypy()
update_llvm()
for backend in backends:
- compile(backend)
+ try:
+ compile(backend)
+ except:
+ pass
benchmark()
print time.ctime()
print 80*'-'
Modified: pypy/dist/pypy/translator/goal/bench-unix.py
==============================================================================
--- pypy/dist/pypy/translator/goal/bench-unix.py (original)
+++ pypy/dist/pypy/translator/goal/bench-unix.py Fri Dec 9 17:33:59 2005
@@ -2,20 +2,7 @@
# to be executed in the goal folder,
# where a couple of pypy-* files is expected.
-import os, sys
-
-current_result = '''
-executable richards pystone
-python 2.4.2c1 864ms ( 1.00x) 43103 ( 1.00x)
-pypy-llvm-17870 12574ms ( 14.55x) 3069 ( 14.04x)
-pypy-llvm-17862 12980ms ( 15.02x) 3041 ( 14.17x)
-pypy-llvm-17797 13473ms ( 15.59x) 2824 ( 15.26x)
-pypy-llvm-17792 13755ms ( 15.92x) 2823 ( 15.27x)
-pypy-llvm-17758 17057ms ( 19.74x) 2229 ( 19.34x)
-pypy-c-17853 22411ms ( 25.94x) 1653 ( 26.07x)
-pypy-c-17806 22315ms ( 25.83x) 1656 ( 26.03x)
-pypy-c-17758 23500ms ( 27.20x) 1570 ( 27.45x)
-'''
+import os, sys, time
PYSTONE_CMD = 'from test import pystone;pystone.main(%s)'
PYSTONE_PATTERN = 'This machine benchmarks at'
@@ -54,21 +41,22 @@
exes = [s[1] for s in exes]
return exes
-HEADLINE = 'executable richards pystone'
-FMT = '%-30s %6dms (%6.2fx) %6d (%6.2fx)'
+HEADLINE = 'date executable richards pystone'
+FMT = '%-26s %-30s %6dms (%6.2fx) %6d (%6.2fx)'
def main():
print HEADLINE
sys.stdout.flush()
ref_rich = run_richards()
ref_stone = run_pystone()
- print FMT % ('python %s' % sys.version.split()[0], ref_rich, 1.0, ref_stone, 1.0)
+ print FMT % (time.ctime(), 'python %s' % sys.version.split()[0], ref_rich, 1.0, ref_stone, 1.0)
sys.stdout.flush()
for exe in get_executables():
exename = os.path.splitext(exe)[0].lstrip('./')
+ ctime = time.ctime( os.path.getctime(exename) )
rich = run_richards(exe, 1)
stone = run_pystone(exe)
- print FMT % (exename, rich, rich / ref_rich, stone, ref_stone / stone)
+ print FMT % (ctime, exename, rich, rich / ref_rich, stone, ref_stone / stone)
sys.stdout.flush()
if __name__ == '__main__':
More information about the Pypy-commit
mailing list