From b12e677af4e849c40306a1966b7768bfa0e496fe Mon Sep 17 00:00:00 2001 From: Itamar Ostricher Date: Fri, 14 Apr 2023 13:56:13 -0700 Subject: [PATCH 1/2] Upgrade to pyperf 2.6.0 --- pyperformance/data-files/requirements.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyperformance/data-files/requirements.txt b/pyperformance/data-files/requirements.txt index 28a0a032..9c1bbf8f 100644 --- a/pyperformance/data-files/requirements.txt +++ b/pyperformance/data-files/requirements.txt @@ -1,16 +1,18 @@ # -# This file is autogenerated by pip-compile with python 3.11 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: # # pip-compile --output-file=requirements.txt requirements.in # packaging==21.3 # via -r requirements.in psutil==5.9.0 - # via -r requirements.in + # via + # -r requirements.in + # pyperf pyparsing==3.0.8 # via packaging -pyperf==2.5.0 +pyperf==2.6.0 # via -r requirements.in toml==0.10.2 # via -r requirements.in From b3427bce321955dedceab999c2b09bdf7fb910a9 Mon Sep 17 00:00:00 2001 From: Itamar Ostricher Date: Sat, 22 Apr 2023 07:58:29 -0600 Subject: [PATCH 2/2] Remove use of pypy warmup kwarg in all (3) benchmarks See discussion in https://github.com/python/pyperformance/pull/272#issuecomment-1518622125 This argument doesn't do anything [since 2017](https://github.com/psf/pyperf/commit/d21fee833b26a6170a2e5e2533821d2e9a650b0b#diff-80086baf88b49811bed7ea6f51429845ec5c6494f2c5ed0214f94add87631e54L140), and was [removed from the runner interface](https://github.com/psf/pyperf/commit/d5349bb409cc94eaca6a6646ca5df9010e3f94db#diff-d1600cb0c5deea10c84136091897ee5086097ac9e35be850235c1f28b7a48316L74). --- pyperformance/data-files/benchmarks/bm_go/run_benchmark.py | 6 +----- .../data-files/benchmarks/bm_hexiom/run_benchmark.py | 6 +----- .../data-files/benchmarks/bm_tornado_http/run_benchmark.py | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/pyperformance/data-files/benchmarks/bm_go/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_go/run_benchmark.py index b1caf8f6..90422eb4 100644 --- a/pyperformance/data-files/benchmarks/bm_go/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_go/run_benchmark.py @@ -452,10 +452,6 @@ def versus_cpu(): if __name__ == "__main__": - kw = {} - if pyperf.python_has_jit(): - # PyPy needs to compute more warmup values to warmup its JIT - kw['warmups'] = 50 - runner = pyperf.Runner(**kw) + runner = pyperf.Runner() runner.metadata['description'] = "Test the performance of the Go benchmark" runner.bench_func('go', versus_cpu) diff --git a/pyperformance/data-files/benchmarks/bm_hexiom/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_hexiom/run_benchmark.py index 8073d71a..eb74deb8 100644 --- a/pyperformance/data-files/benchmarks/bm_hexiom/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_hexiom/run_benchmark.py @@ -651,11 +651,7 @@ def add_cmdline_args(cmd, args): if __name__ == "__main__": - kw = {'add_cmdline_args': add_cmdline_args} - if pyperf.python_has_jit(): - # PyPy needs to compute more warmup values to warmup its JIT - kw['warmups'] = 15 - runner = pyperf.Runner(**kw) + runner = pyperf.Runner(add_cmdline_args=add_cmdline_args) levels = sorted(LEVELS) runner.argparser.add_argument("--level", type=int, choices=levels, diff --git a/pyperformance/data-files/benchmarks/bm_tornado_http/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_tornado_http/run_benchmark.py index 4ff3fbf6..408fd06a 100644 --- a/pyperformance/data-files/benchmarks/bm_tornado_http/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_tornado_http/run_benchmark.py @@ -96,11 +96,7 @@ def run_client(): import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) - kw = {} - if pyperf.python_has_jit(): - # PyPy needs to compute more warmup values to warmup its JIT - kw['warmups'] = 30 - runner = pyperf.Runner(**kw) + runner = pyperf.Runner() runner.metadata['description'] = ("Test the performance of HTTP requests " "with Tornado.") runner.bench_time_func('tornado_http', bench_tornado)