A pytest plugin to list worker statistics after a xdist run.
Project description
pytest-xdist-worker-stats
A pytest plugin to list worker statistics after a xdist run.
Installation
$ pip install pytest-xdist-worker-stats
Usage
All that is needed is to have xdist installed & enabled, and to run tests in multiple workers.
Default mode
pytest {all_your_options}
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0
plugins: xdist-worker-stats-0.2.0, xdist-3.5.0
created: 2/2 workers
2 workers [4 items]
.... [100%]
============================== Worker statistics ===============================
worker gw0 : 2 tests 0.00s runtime
worker gw1 : 2 tests 0.00s runtime
Tests : min 2, max 2, average 2.0
Runtime : min 0.00s, max 0.00s, average 0.00s
============================== 4 passed in 1.82s ===============================
Summary mode
pytest {all_your_options} --no-xdist-runtimes
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0
plugins: xdist-worker-stats-0.2.0, xdist-3.5.0
created: 2/2 workers
2 workers [4 items]
.... [100%]
============================== Worker statistics ===============================
Tests : min 2, max 2, average 2.0
Runtime : min 0.00s, max 0.00s, average 0.00s
============================== 4 passed in 1.82s ===============================
Breakdown mode
pytest {all_your_options} --xdist-breakdown
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0
plugins: xdist-worker-stats-0.2.0, xdist-3.5.0
created: 2/2 workers
2 workers [4 items]
.... [100%]
============================== Worker statistics ===============================
worker gw0 : 2 tests 0.00s runtime
test_plugin.py::test_bar[1]
test_plugin.py::test_foo
worker gw1 : 2 tests 0.00s runtime
test_plugin.py::test_bar[2]
test_plugin.py::test_bar[3]
Tests : min 2, max 2, average 2.0
Runtime : min 0.00s, max 0.00s, average 0.00s
============================== 4 passed in 1.82s ===============================
Development
Poetry (dependencies) and pre-commit (coding standards) are required for development.
$ poetry install
$ pre-commit install
Thanks
Many thanks to Denys Korytkin for the article How to get data from pytest-xdist nodes.
Changelog
0.4.0 (November 10, 2025)
- Support Pytest 9
- Use
time.monotonic()instead oftime.time()
0.3.1 (November 10, 2025)
- Support Python 3.14
0.3.0 (March 15, 2025)
- Remove support for Python 3.8, add support for 3.13
0.2.0 (Apr 16, 2024)
- Support all modern pytest and pytest-xdist
- Add support for test breakdown per worker
0.1.4 (Aug 8, 2023)
- Summarize statistics
0.1.3 (Aug 8, 2023)
- Add CI
0.1.2 (Jun 19, 2023)
- Fix several issues
0.1.1 (Jun 15, 2023)
- First Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_xdist_worker_stats-0.4.0.tar.gz.
File metadata
- Download URL: pytest_xdist_worker_stats-0.4.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a209b81b08b3e3d7879212c2e0b5ebef97a8f1424e5de77667de7371ce96b196
|
|
| MD5 |
32d45c1238bfba93af934043252ed26b
|
|
| BLAKE2b-256 |
4d3dd7de52e0902297ab94564255257a3899bf31eadefc640951752d3355555f
|
Provenance
The following attestation bundles were made for pytest_xdist_worker_stats-0.4.0.tar.gz:
Publisher:
build.yml on mikicz/pytest-xdist-worker-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_xdist_worker_stats-0.4.0.tar.gz -
Subject digest:
a209b81b08b3e3d7879212c2e0b5ebef97a8f1424e5de77667de7371ce96b196 - Sigstore transparency entry: 954471630
- Sigstore integration time:
-
Permalink:
mikicz/pytest-xdist-worker-stats@79aa0f564855d543a2e25f1d96c63cad078f2d1d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mikicz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@79aa0f564855d543a2e25f1d96c63cad078f2d1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_xdist_worker_stats-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pytest_xdist_worker_stats-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77c4add5a112e425eed37554a1808b95c768b8182d9e56e4422ea9daa8b54b8d
|
|
| MD5 |
ec241a9b0255d6fa364ea159583ef4c3
|
|
| BLAKE2b-256 |
6d8e3d963381cb0b41d2fa7842a5e9ab58f7f13363b655a5a8b0ed9f789fc999
|
Provenance
The following attestation bundles were made for pytest_xdist_worker_stats-0.4.0-py3-none-any.whl:
Publisher:
build.yml on mikicz/pytest-xdist-worker-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_xdist_worker_stats-0.4.0-py3-none-any.whl -
Subject digest:
77c4add5a112e425eed37554a1808b95c768b8182d9e56e4422ea9daa8b54b8d - Sigstore transparency entry: 954471631
- Sigstore integration time:
-
Permalink:
mikicz/pytest-xdist-worker-stats@79aa0f564855d543a2e25f1d96c63cad078f2d1d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mikicz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@79aa0f564855d543a2e25f1d96c63cad078f2d1d -
Trigger Event:
push
-
Statement type: