Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r439:0a0be263be14 Date: 2020-01-29 23:01 +0200 http://bitbucket.org/pypy/benchmarks/changeset/0a0be263be14/
Log: update for cpython run via run_local.py diff --git a/benchmarks.py b/benchmarks.py --- a/benchmarks.py +++ b/benchmarks.py @@ -25,7 +25,7 @@ def _register_new_bm_twisted(name, bm_name, d, **opts): def Measure(python, options): def parser(line): - number = float(line.split(" ")[0]) + number = float(line.split(b" ")[0]) if name == 'tcp': return 100*1024*1024/number elif name == 'iteration': diff --git a/run_local.py b/run_local.py --- a/run_local.py +++ b/run_local.py @@ -16,12 +16,12 @@ --fast --args=ARGS arguments to give to pypy-c, must not contain a comma! """ - +from __future__ import print_function import sys, os import subprocess if len(sys.argv) < 2 or sys.argv[1].startswith('-'): - print __doc__ + print(__doc__) sys.exit(2) pypy_c = sys.argv[1] @@ -36,11 +36,11 @@ '--changed', os.path.join(localdir, 'nullpython.py'), '--full-store', ] + sys.argv[1:] -print -print 'Executing', cmdline -print +print('') +print('Executing', cmdline) +print('') r = subprocess.call(cmdline) if r: - print >> sys.stderr, '*** exit code %r ***' % (r,) + print('*** exit code %r ***' % (r,), file=sys.stderr) sys.exit(r) diff --git a/savecpython.py b/savecpython.py --- a/savecpython.py +++ b/savecpython.py @@ -21,12 +21,20 @@ res_type = b[1] results = b[2] value = 0 - if res_type == "SimpleComparisonResult" or res_type == 'RawResult': + if res_type == "SimpleComparisonResult" + if base: + value = results['base_time'] + else: + value = results['changed_time'] + if value is None: + continue + value = value[0] + elif res_type == 'RawResult': if base: value = results['base_times'] else: value = results['changed_times'] - if value is None: + if value is None or len(value) == 0: continue value = value[0] elif res_type == "ComparisonResult": @@ -92,6 +100,6 @@ print parser.usage sys.exit(1) results = json.load(open(args[1]))['results'] - save('cpython', options.revision, results, None, 'cpython', 'tannit', + save('cpython', options.revision, results, None, 'cpython', 'benchmarker', testing=False, base=options.base) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit