Skip to main content

pytest-perf

Project description

https://img.shields.io/pypi/v/pytest-perf.svg https://img.shields.io/pypi/pyversions/pytest-perf.svg tests Code style: Black https://img.shields.io/badge/skeleton-2021-informational

Run performance tests against the mainline code.

Usage

To use it, include pytest-perf in the test dependencies for your project, then create some Python module in your package. The plugin will include any module that contains the text “pytest_perf” and will run performance tests on each function containing “perf” in the name.

Tests don’t execute the module directly, but instead parse out the code of the function in two parts, the warmup and the test, separated by a “# end warmup” comment, and then passes those to the timeit module.

See the exercises.py module for example usage.

Design

pytest-perf works by creating two installs, the control and the experiment, and measuring the performance of some python code against each.

Under the hood, it uses pip-run to install from the upstream main branch (e.g. https://github.com/jaraco/pytest-perf) for the control and from . for the experiment. It then runs each of the experiments against each of the enviroments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-perf-0.12.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_perf-0.12.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest-perf-0.12.0.tar.gz.

File metadata

  • Download URL: pytest-perf-0.12.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pytest-perf-0.12.0.tar.gz
Algorithm Hash digest
SHA256 008abdf145c9a693499fc45f3cec60226c74ce0b4d0bfed3357134387309a66a
MD5 dca6ad4d2cfc407d85bacb1b8872a774
BLAKE2b-256 d230abc855aab357e72a4f4f9ab55513bc6bb42c0c3f45283dd5eedf2b0860e4

See more details on using hashes here.

File details

Details for the file pytest_perf-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_perf-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pytest_perf-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18bf93b48847333454ed2076f9bda9a542c8ba6e692fd61dfc07eaee68188ce7
MD5 44d6e53fa14e74c8abf33dab65a6baad
BLAKE2b-256 c8de29401c8080600c884e1cdea55112c259d300addbae775f6e1de976d1cb15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page