pypy / pypy / tool / rundictbenchmarks.py

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).

if __name__ == '__main__':
    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',
                            '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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.