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 Ruff https://img.shields.io/badge/skeleton-2026-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.16.0.tar.gz (15.5 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.16.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pytest_perf-0.16.0.tar.gz.

File metadata

  • Download URL: pytest_perf-0.16.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pytest_perf-0.16.0.tar.gz
Algorithm Hash digest
SHA256 0f1bc1ce63fbb095c43a2835ef2af1a83cb308ac86c75471bf070de7abe2f83b
MD5 3157860939e8ef56ea1be1ca8cb01bbc
BLAKE2b-256 31aa22c552bfc70cddbe2fd0a39bcceda410e4e4f845c6284bf1fea587529cc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_perf-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pytest_perf-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9607632c7867268d318fccaff1367e19e16598af8a6ebc290a0c93258da7b55b
MD5 aacba0182d951dd818d3d15371da4720
BLAKE2b-256 e1672fa953689dc5181222522073b7e4bfe583bad0a7f14057f040c420f374ff

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