pytest-extra-durations
A pytest plugin to get durations on a per-function basis and per module basis.
What it is and what it does
pytest-extra-durations is a pytest plugin that adds three layers of timing information to your test runs. It always displays the sum of all test, setup, and teardown durations—a figure independent of worker count or collection time. It also offers optional per-module and per-function duration summaries via command-line flags, similar to pytest's built-in `--durations` option but aggregating across workers in pytest-xdist runs.
The plugin integrates directly into pytest's reporting and requires only pytest as a dependency. It is designed to help developers identify slow tests and modules in their suite, particularly useful when running distributed tests with pytest-xdist where standard timing metrics can be obscured by parallelization overhead.
Use it for:
- Identify which test modules consume the most time in a large test suite
- Find individual test functions that are unexpectedly slow, even when run in parallel
- Compare total test execution time across runs without being affected by worker count
- Diagnose performance regressions by tracking per-module and per-function durations over time
- Optimize test parallelization by understanding which tests or modules are bottlenecks
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that reports test execution time broken down by module and individual test function, including setup and teardown durations, and works with pytest-xdist.
No. The package is abandoned (last release April 2020, no commits since) and has not been maintained for over four years. While it has low install friction and a permissive license, the lack of maintenance means it is unlikely to work reliably with current pytest versions and may break silently. For active test timing analysis, consider a maintained alternative or pytest's built-in `--durations` option.
Install
pytest-extra-durations on PyPI
pip
pip install pytest-extra-durationsuv
uv add pytest-extra-durationspoetry
poetry add pytest-extra-durationsInstalling pytest-extra-durations
Before you install
Installation is straightforward with low friction—a pure Python wheel with only pytest as a runtime dependency. However, the package has been abandoned since April 2020 and receives no maintenance, so it may not work reliably with recent pytest versions or Python releases.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in your own projects.
Quickstart
pip install pytest-extra-durations
pytest --modules-durations=4 ./path/to/test/directory
pytest --functions-durations=4 ./path/to/test/directory
Verify before relying
- Whether the plugin remains compatible with pytest versions released after April 2020
- Whether it works correctly with modern versions of pytest-xdist
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | abandoned — 2,306 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 108,031/month — #12,582 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_extra_durations-0.1.3-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-durationsA pytest plugin that measures and reports…
permissive · top 5,000 on PyPI
pytest-timerPytest plugin that measures and reports the…
permissive · top 15,000 on PyPI
pytest-timeoutsA pytest plugin that enforces separate timeout…
permissive · top 5,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
pytest-splitA pytest plugin that divides a test suite into…
permissive · top 5,000 on PyPI
pytest-timeoutAborts pytest tests that exceed a specified…
permissive · top 1,000 on PyPI
pytest-parallelA pytest plugin that runs tests in parallel…
permissive · top 15,000 on PyPI
pytest-retrypytest-retry is a pytest plugin that…
permissive · top 5,000 on PyPI
pytest-fail-slowA pytest plugin that marks tests as failed if…
permissive · top 15,000 on PyPI
xdoctestXdoctest finds and executes test code embedded…
permissive · top 5,000 on PyPI