[pypy-svn] r31265 - pypy/dist/pypy/tool

mwh at codespeak.net mwh at codespeak.net
Fri Aug 11 17:39:16 CEST 2006


Author: mwh
Date: Fri Aug 11 17:39:15 2006
New Revision: 31265

Added:
   pypy/dist/pypy/tool/rundictbenchmarks.py
Modified:
   pypy/dist/pypy/tool/readdictinfo.py
Log:
stuff to make my benchmarking runs more reproducible.
may not be terribly usable unless you're me.


Modified: pypy/dist/pypy/tool/readdictinfo.py
==============================================================================
--- pypy/dist/pypy/tool/readdictinfo.py	(original)
+++ pypy/dist/pypy/tool/readdictinfo.py	Fri Aug 11 17:39:15 2006
@@ -84,7 +84,7 @@
         print >>output
 
 if __name__ == '__main__':
-    reportDictInfos()
+#    reportDictInfos()
 
     # interactive stuff:
 
@@ -105,3 +105,10 @@
         import rlcompleter
         readline.parse_and_bind('tab: complete')
 
+    if len(sys.argv) > 2:
+        attrs = sys.argv[2].split(',')
+        if attrs == ['all']:
+            attrs = slots
+        Rify("R.txt", *attrs)
+        
+

Added: pypy/dist/pypy/tool/rundictbenchmarks.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/tool/rundictbenchmarks.py	Fri Aug 11 17:39:15 2006
@@ -0,0 +1,26 @@
+import sys, os
+
+# this file runs some benchmarks with a pypy-c that is assumed to be
+# built using the MeasuringDictImplementation.
+
+# it should be run with pypy/translator/goal as the cwd, and you'll
+# need to hack a copy of rst2html for yourself (svn docutils
+# required).
+
+try:
+    os.unlink("dictinfo.txt")
+except os.error:
+    pass
+
+progs = [('pystone', ['-c', 'from test import pystone; pystone.main()']),
+         ('richards', ['richards.py']),
+         ('docutils', ['rst2html.py', '../../doc/coding-guide.txt', 'foo.html']),
+         ('translate', ['translate.py', '--backendopt', '--no-compile', '--batch',
+                        '--text', 'targetrpystonedalone.py'])
+         ]
+
+EXE = sys.argv[1]
+
+for suffix, args in progs:
+    os.spawnv(os.P_WAIT, EXE, [EXE] + args)
+    os.rename('dictinfo.txt', 'dictinfo-%s.txt'%suffix)



More information about the Pypy-commit mailing list