Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r374:3d7dc7b9b33e Date: 2017-03-08 11:36 +0100 http://bitbucket.org/pypy/benchmarks/changeset/3d7dc7b9b33e/
Log: Swap baseline and changed interpreters. Needed for BM_translate() diff --git a/display_local.py b/display_local.py --- a/display_local.py +++ b/display_local.py @@ -7,11 +7,11 @@ two arguments, computes statistics and displays the differences. (Details: each file must result from a '--full-store' execution of -'runner.py'. The "changed_times" keys are used and the "base_times" -keys are discarded. The option '--base1' and/or '--base2' can be used -to pick the "base_times" instead in the first/second file. These -options are not useful if the files are produced by 'run_local.py' -because it uses nullpython as the base.) +'runner.py'. The "base_times" keys are used and the "changed_times" +keys are discarded. The option '--changed1' and/or '--changed2' can be +used to pick the "changed_times" instead in the first/second file. +These options are not useful if the files are produced by 'run_local.py' +because it uses nullpython as the changed interpreter.) """ import sys @@ -136,12 +136,12 @@ usage="%prog first-filename [second-filename]", description=__doc__) - parser.add_option("--base1", default=False, action="store_true", - help='Pick the "base_times" keys instead of the "changed_times"' - ' ones in the first file') - parser.add_option("--base2", default=False, action="store_true", - help='Pick the "base_times" keys instead of the "changed_times"' - ' ones in the second file') + parser.add_option("--changed1", default=False, action="store_true", + help='Pick the "changed_times" keys instead of the "base_times"' + ' keys in the first file') + parser.add_option("--changed2", default=False, action="store_true", + help='Pick the "changed_times" keys instead of the "base_times"' + ' keys in the second file') options, args = parser.parse_args(argv) if len(args) == 0: @@ -149,9 +149,9 @@ elif len(args) > 2: parser.error("too many filenames") - times1 = load_times(args[0], base_times=options.base1) + times1 = load_times(args[0], base_times=not options.changed1) if len(args) > 1: - times2 = load_times(args[1], base_times=options.base2) + times2 = load_times(args[1], base_times=not options.changed2) else: times2 = None display(times1, times2) diff --git a/run_local.py b/run_local.py --- a/run_local.py +++ b/run_local.py @@ -28,9 +28,12 @@ localdir = os.path.dirname(sys.argv[0]) or '.' +# note: we use nullpython.py as the "changed" interpreter, not the +# "baseline" one, because BM_translate() happens to run only with the +# baseline interpreter and not the changed one. Messy. cmdline = [sys.executable, os.path.join(localdir, 'runner.py'), - '--changed', pypy_c, - '--baseline', os.path.join(localdir, 'nullpython.py'), + '--baseline', pypy_c, + '--changed', os.path.join(localdir, 'nullpython.py'), '--full-store', ] + sys.argv[1:] print _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit