[pypy-svn] r21036 - pypy/dist/pypy/translator/goal

ericvrp at codespeak.net ericvrp at codespeak.net
Sun Dec 11 13:23:16 CET 2005


Author: ericvrp
Date: Sun Dec 11 13:23:15 2005
New Revision: 21036

Modified:
   pypy/dist/pypy/translator/goal/bench-cronjob.py
   pypy/dist/pypy/translator/goal/bench-unix.py
Log:
* Limit the number of executables that are benchmarked

* cleanup *.pyc files and _cache before benchmarking


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	Sun Dec 11 13:23:15 2005
@@ -16,6 +16,12 @@
     os.system('make -j3 tools-only 2>&1')
 
 def compile(backend):
+    os.chdir(homedir + '/projects/pypy-dist')
+    os.system('rm `find . -name *.pyc`')
+
+    os.chdir(homedir + '/projects/pypy-dist/pypy/_cache')
+    os.system('rm *')
+
     os.chdir(homedir + '/projects/pypy-dist/pypy/translator/goal')
     os.system('python translate_pypy.py --backend=%(backend)s --text --batch targetpypystandalone 2>&1' % locals())
 
@@ -47,8 +53,9 @@
     if backends == []:
         backends = 'llvm c'.split()
     print time.ctime()
+    #if 'llvm' in backends:
+    #    update_llvm()
     update_pypy()
-    update_llvm()
     for backend in backends:
         try:
             compile(backend)

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	Sun Dec 11 13:23:15 2005
@@ -4,6 +4,7 @@
 
 import os, sys, time
 
+MAX_BENCHMARKS = 40
 PYSTONE_CMD = 'from test import pystone;pystone.main(%s)'
 PYSTONE_PATTERN = 'This machine benchmarks at'
 RICHARDS_CMD = 'from richards import *;main(iterations=%d)'
@@ -51,7 +52,7 @@
     ref_stone = run_pystone()
     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():
+    for exe in get_executables()[:MAX_BENCHMARKS]:
         exename = os.path.splitext(exe)[0].lstrip('./')
         ctime   = time.ctime( os.path.getctime(exename) )
         rich    = run_richards(exe, 1)



More information about the Pypy-commit mailing list