Skip to main content

Run performance tests against the mainline code.

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-2023-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.13.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

pytest_perf-0.13.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-perf-0.13.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pytest-perf-0.13.1.tar.gz
Algorithm Hash digest
SHA256 0ec3bfeb0c8a6dcb8b1d3ea4ed1abb0b26685cfaff584e733395bd09608ab5a2
MD5 2dbd3178fda66cc32a6e6a0f9b7a58ee
BLAKE2b-256 d2748c112d99f595dc1718225ba50709ee3ed14a6f480bba7e5428a78ffaa94a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pytest_perf-0.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3847df54eca6055d14f383d84cad58ca1483dc4ad3532a83969ceebd511385cd
MD5 5d85c121ebf4af3262f7ba3a9f15beab
BLAKE2b-256 5707d0c7233ad11ca9afce2a5f2e30f0a76c1f51264097a5cf8ec2fd18cd8e53

See more details on using hashes here.

Provenance

Supported by

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