From 4e8456c4fe0a759cb930c6476b3a00ecd6cdb94e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 22 Jun 2023 22:41:03 +0300 Subject: [PATCH 01/10] Set a dependabot schedule interval (#298) --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 13c177fa..8bd341ac 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,3 +2,5 @@ version: 2 updates: - package-ecosystem: "pip" directory: "/pyperformance/requirements" + schedule: + interval: "monthly" From 5a7ae4eb44063ac71421f4c172246d1fe8f1f30a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Jul 2023 21:06:25 +0900 Subject: [PATCH 02/10] Bump pyperf from 2.6.0 to 2.6.1 in /pyperformance/requirements (#304) Bumps [pyperf](https://github.com/psf/pyperf) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/psf/pyperf/releases) - [Changelog](https://github.com/psf/pyperf/blob/main/doc/changelog.rst) - [Commits](https://github.com/psf/pyperf/compare/2.6.0...2.6.1) --- updated-dependencies: - dependency-name: pyperf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyperformance/requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyperformance/requirements/requirements.txt b/pyperformance/requirements/requirements.txt index 988c67b1..d4aa6631 100644 --- a/pyperformance/requirements/requirements.txt +++ b/pyperformance/requirements/requirements.txt @@ -10,5 +10,5 @@ psutil==5.9.5 # via # -r requirements.in # pyperf -pyperf==2.6.0 +pyperf==2.6.1 # via -r requirements.in From eaa3d0cd8ed84244b530235267ae74bd735e40a4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 24 Jul 2023 19:48:52 +0200 Subject: [PATCH 03/10] Add .readthedocs.yaml configuration Set also the documentation configuration language to English. --- .readthedocs.yaml | 12 ++++++++++++ doc/conf.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..8ff5ab71 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,12 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: doc/conf.py diff --git a/doc/conf.py b/doc/conf.py index 05235328..20b805b5 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -62,7 +62,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. From e1e8385d003e5512c6ccbf68e6a6f31e97626997 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Thu, 10 Aug 2023 07:39:56 +0000 Subject: [PATCH 04/10] add asyncio_webockets benchmark --- pyperformance/data-files/benchmarks/MANIFEST | 1 + .../bm_asyncio_websockets/pyproject.toml | 9 +++++ .../bm_asyncio_websockets/requirements.txt | 1 + .../bm_asyncio_websockets/run_benchmark.py | 39 +++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 pyperformance/data-files/benchmarks/bm_asyncio_websockets/pyproject.toml create mode 100644 pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt create mode 100644 pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py diff --git a/pyperformance/data-files/benchmarks/MANIFEST b/pyperformance/data-files/benchmarks/MANIFEST index 4420f98b..b4d22f7b 100644 --- a/pyperformance/data-files/benchmarks/MANIFEST +++ b/pyperformance/data-files/benchmarks/MANIFEST @@ -21,6 +21,7 @@ async_tree_eager_io_tg async_tree_eager_memoization_tg asyncio_tcp asyncio_tcp_ssl +asyncio_websockets concurrent_imap coroutines coverage diff --git a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/pyproject.toml b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/pyproject.toml new file mode 100644 index 00000000..e985b0e1 --- /dev/null +++ b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/pyproject.toml @@ -0,0 +1,9 @@ +[project] +name = "pyperformance_bm_asyncio_websockets" +requires-python = ">=3.8" +dependencies = ["pyperf", "websockets"] +urls = {repository = "https://github.com/python/pyperformance"} +dynamic = ["version"] + +[tool.pyperformance] +name = "asyncio_websockets" diff --git a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt new file mode 100644 index 00000000..e3e82768 --- /dev/null +++ b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt @@ -0,0 +1 @@ +websockets==11.0.3 \ No newline at end of file diff --git a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py new file mode 100644 index 00000000..577ba813 --- /dev/null +++ b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py @@ -0,0 +1,39 @@ +""" +Benchmark for asyncio websocket server and client performance +transferring 10MB of data. +""" + +import pyperf +import websockets.server +import websockets.client +import asyncio + +CHUNK_SIZE = 1024 +DATA = b"x" * CHUNK_SIZE + +stop: asyncio.Event + + +async def handler(websocket) -> None: + for _ in range(100): + data = await websocket.recv() + assert data == DATA + + stop.set() + + +async def main() -> None: + global stop + t0 = pyperf.perf_counter() + stop = asyncio.Event() + async with websockets.server.serve(handler, "", 8001): + async with websockets.client.connect("ws://localhost:8001") as ws: + await asyncio.gather(*[ws.send(DATA) for _ in range(100)]) + await stop.wait() + return pyperf.perf_counter() - t0 + + +if __name__ == "__main__": + runner = pyperf.Runner() + runner.metadata['description'] = "Benchmark asyncio websockets" + runner.bench_async_func('asyncio_websockets', main) From ef1d636b7df36c7c5f82c83cce42e56ecf8ae6f7 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Thu, 10 Aug 2023 13:26:18 +0530 Subject: [PATCH 05/10] minor fixes for asyncio_websockets benchmark (#311) --- .../benchmarks/bm_asyncio_websockets/run_benchmark.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py index 577ba813..1f167f6f 100644 --- a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py @@ -1,6 +1,8 @@ """ Benchmark for asyncio websocket server and client performance -transferring 10MB of data. +transferring 1MB of data. + +Author: Kumar Aditya """ import pyperf @@ -8,7 +10,7 @@ import websockets.client import asyncio -CHUNK_SIZE = 1024 +CHUNK_SIZE = 1024 ** 2 DATA = b"x" * CHUNK_SIZE stop: asyncio.Event @@ -16,8 +18,7 @@ async def handler(websocket) -> None: for _ in range(100): - data = await websocket.recv() - assert data == DATA + await websocket.recv() stop.set() From 662454d067fc4520ad9231c12844d80e85f0bc81 Mon Sep 17 00:00:00 2001 From: Diego Russo Date: Wed, 27 Sep 2023 17:44:45 +0100 Subject: [PATCH 06/10] Expose --min-time from pyperf to pyperformance CLI (#301) --- pyperformance/cli.py | 3 +++ pyperformance/run.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pyperformance/cli.py b/pyperformance/cli.py index 330d6e57..34544a11 100644 --- a/pyperformance/cli.py +++ b/pyperformance/cli.py @@ -72,6 +72,9 @@ def parse_args(): cmd.add_argument("--append", metavar="FILENAME", help="Add runs to an existing file, or create it " "if it doesn't exist") + cmd.add_argument("--min-time", metavar="MIN_TIME", + help="Minimum duration in seconds of a single " + "value, used to calibrate the number of loops") filter_opts(cmd) # show diff --git a/pyperformance/run.py b/pyperformance/run.py index 65e1a9e9..aa2b3744 100644 --- a/pyperformance/run.py +++ b/pyperformance/run.py @@ -206,5 +206,7 @@ def get_pyperf_opts(options): opts.append('--track-memory') if options.inherit_environ: opts.append('--inherit-environ=%s' % ','.join(options.inherit_environ)) + if options.min_time: + opts.append('--min-time=%s' % options.min_time) return opts From 2b3a50b1002378449a4173ac9c46eb072466c2f5 Mon Sep 17 00:00:00 2001 From: Mohamad Fazeli Date: Tue, 3 Oct 2023 14:16:06 +0330 Subject: [PATCH 07/10] Fixed broken link in benchmarks.rst (#313) Co-authored-by: Hugo van Kemenade --- doc/benchmarks.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/benchmarks.rst b/doc/benchmarks.rst index b0cff367..54c5e69c 100644 --- a/doc/benchmarks.rst +++ b/doc/benchmarks.rst @@ -453,7 +453,7 @@ Copyright Callum and Tony Garnock-Jones, 2008. This file may be freely redistributed under the MIT license, http://www.opensource.org/licenses/mit-license.php -From http://www.lshift.net/blog/2008/10/29/toy-raytracer-in-python +From https://leastfixedpoint.com/tonyg/kcbbs/lshift_archive/toy-raytracer-in-python-20081029.html .. image:: images/bm_raytrace.jpg :alt: Pure Python raytracer From 1d4042115f5f95a1c42d430a4a6c213789825a34 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 16 Oct 2023 20:50:19 +0300 Subject: [PATCH 08/10] Bump coverage to 7.3.2 for compatibilty with 3.13 (#317) --- .../data-files/benchmarks/bm_coverage/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt b/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt index 755f8b95..b13cbb7c 100644 --- a/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt @@ -1 +1 @@ -coverage==6.4.1 +coverage==7.3.2 From 624a0cf3fc01bf3f146bcee073c749460cb85109 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sun, 22 Oct 2023 20:19:50 +0900 Subject: [PATCH 09/10] .github: Add experimental CI for CPython 3.13 (gh-320) --- .github/workflows/main.yml | 19 ++++++++----------- .../requirements.txt | 2 +- .../bm_sqlalchemy_imperative/requirements.txt | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index becf1a59..8f1a8748 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,29 +23,26 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest] - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python: ["3.8", "3.9", "3.10", "3.11", "3.12"] experimental: [false] include: # As the experimental task for the dev version. - os: ubuntu-latest - python: "3.12-dev" + python: "3.13-dev" experimental: true # Also test PyPy, macOS, and Windows: - os: ubuntu-latest - python: pypy-3.9 - experimental: false - - os: ubuntu-latest - python: pypy-3.8 + python: pypy-3.10 experimental: false - os: ubuntu-latest - python: pypy-3.7 + python: pypy-3.9 experimental: false - os: macos-latest - python: "3.10" - experimental: false + python: "3.12" + experimental: true - os: windows-latest - python: "3.10" - experimental: false + python: "3.12" + experimental: true steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python }} diff --git a/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt b/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt index af076efe..9578d705 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt @@ -1,2 +1,2 @@ -greenlet==2.0.0a2 +greenlet==3.0.0rc3 sqlalchemy==1.4.19 diff --git a/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt b/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt index af076efe..9578d705 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt @@ -1,2 +1,2 @@ -greenlet==2.0.0a2 +greenlet==3.0.0rc3 sqlalchemy==1.4.19 From f8a4463d4b515a274678aa9586d00ffe0542cf52 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sun, 22 Oct 2023 20:55:29 +0900 Subject: [PATCH 10/10] Prepare release 1.10.0 (#321) --- doc/changelog.rst | 7 +++++++ pyperformance/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 34eae5ed..de5c0126 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,13 @@ Changelog ========= +Version 1.10.0 (2023-10-22) +-------------- +* Add benchmark for asyncio_webockets +* Expose --min-time from pyperf to pyperformance CLI +* Bump coverage to 7.3.2 for compatibilty with 3.13 +* Bump greenlet to 3.0.0rc3 for compatibilty with 3.13 + Version 1.0.9 (2023-06-14) ------------- * Vendor lib2to3 for Python 3.13+ diff --git a/pyperformance/__init__.py b/pyperformance/__init__.py index 92479b50..3941313b 100644 --- a/pyperformance/__init__.py +++ b/pyperformance/__init__.py @@ -2,7 +2,7 @@ import sys -VERSION = (1, 0, 9) +VERSION = (1, 10, 0) __version__ = '.'.join(map(str, VERSION)) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy