pytest-perf


Namepytest-perf JSON
Version 0.15.0 PyPI version JSON
download
home_pageNone
SummaryRun performance tests against the mainline code.
upload_time2024-05-20 18:21:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://img.shields.io/pypi/v/pytest-perf.svg
   :target: https://pypi.org/project/pytest-perf

.. image:: https://img.shields.io/pypi/pyversions/pytest-perf.svg

.. image:: https://github.com/jaraco/pytest-perf/actions/workflows/main.yml/badge.svg
   :target: https://github.com/jaraco/pytest-perf/actions?query=workflow%3A%22tests%22
   :alt: tests

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff

.. .. image:: https://readthedocs.org/projects/PROJECT_RTD/badge/?version=latest
..    :target: https://PROJECT_RTD.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/badge/skeleton-2024-informational
   :target: https://blog.jaraco.com/skeleton

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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytest-perf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "\"Jason R. Coombs\" <jaraco@jaraco.com>",
    "download_url": "https://files.pythonhosted.org/packages/95/e7/2871d59de12088c74519b3c48a9f19fe3ec8bcecf5290a2287df49fef5ad/pytest_perf-0.15.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/pytest-perf.svg\n   :target: https://pypi.org/project/pytest-perf\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-perf.svg\n\n.. image:: https://github.com/jaraco/pytest-perf/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/jaraco/pytest-perf/actions?query=workflow%3A%22tests%22\n   :alt: tests\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Ruff\n\n.. .. image:: https://readthedocs.org/projects/PROJECT_RTD/badge/?version=latest\n..    :target: https://PROJECT_RTD.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2024-informational\n   :target: https://blog.jaraco.com/skeleton\n\nRun performance tests against the mainline code.\n\nUsage\n=====\n\nTo 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.\n\nTests 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.\n\nSee the ``exercises.py`` module for example usage.\n\nDesign\n======\n\n``pytest-perf`` works by creating two installs, the control and the experiment, and measuring the performance of some python code against each.\n\nUnder 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.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Run performance tests against the mainline code.",
    "version": "0.15.0",
    "project_urls": {
        "Homepage": "https://github.com/jaraco/pytest-perf"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "739bd2d3907a15c88ad7250f22cc8deb1f394b7a4d28ba5765d22dfd97086a22",
                "md5": "7fd878714de842b74d191cf94e51f0fe",
                "sha256": "70f4393221435d310f1a1d825c84461468cc2c26b62aaf9ff18d7381af2f844f"
            },
            "downloads": -1,
            "filename": "pytest_perf-0.15.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fd878714de842b74d191cf94e51f0fe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7684,
            "upload_time": "2024-05-20T18:21:55",
            "upload_time_iso_8601": "2024-05-20T18:21:55.371833Z",
            "url": "https://files.pythonhosted.org/packages/73/9b/d2d3907a15c88ad7250f22cc8deb1f394b7a4d28ba5765d22dfd97086a22/pytest_perf-0.15.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95e72871d59de12088c74519b3c48a9f19fe3ec8bcecf5290a2287df49fef5ad",
                "md5": "88811a5129a5193384fa798eab915fb5",
                "sha256": "900fe2ed9f74b25a5401210fb9a010010b3db945244951a4e878e745c9bc32d2"
            },
            "downloads": -1,
            "filename": "pytest_perf-0.15.0.tar.gz",
            "has_sig": false,
            "md5_digest": "88811a5129a5193384fa798eab915fb5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13013,
            "upload_time": "2024-05-20T18:21:56",
            "upload_time_iso_8601": "2024-05-20T18:21:56.575464Z",
            "url": "https://files.pythonhosted.org/packages/95/e7/2871d59de12088c74519b3c48a9f19fe3ec8bcecf5290a2287df49fef5ad/pytest_perf-0.15.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-20 18:21:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jaraco",
    "github_project": "pytest-perf",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-perf"
}
        
Elapsed time: 0.36929s