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.
Example output
platform linux -- Python 3.10.11, pytest-7.3.2, pluggy-1.0.0
plugins: xdist-3.3.1, xdist-worker-stats-0.1.0
12 workers [359 items]
.............................................................................................. [ 25%]
.............................................................................................. [ 52%]
.............................................................................................. [ 78%]
............................................................................. [100%]
========================================= Worker statistics ==========================================
worker gw0 : 15 tests 12.25s runtime
worker gw1 : 14 tests 12.00s runtime
worker gw2 : 27 tests 11.66s runtime
worker gw3 : 13 tests 12.08s runtime
worker gw4 : 14 tests 12.59s runtime
worker gw5 : 27 tests 12.13s runtime
worker gw6 : 18 tests 12.22s runtime
worker gw7 : 78 tests 12.04s runtime
worker gw8 : 21 tests 12.01s runtime
worker gw9 : 59 tests 12.36s runtime
worker gw10 : 20 tests 11.79s runtime
worker gw11 : 53 tests 12.09s runtime
Tests : min 13, max 78, average 29.9
Runtime : min 11.66s, max 12.59s, average 12.10s
======================================== 359 passed in 21.52s ========================================
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.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
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
File details
Details for the file pytest_xdist_worker_stats-0.1.4.tar.gz
.
File metadata
- Download URL: pytest_xdist_worker_stats-0.1.4.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ca3067211ac285c073cbdb1824452e66dbc238ca79632f8491ab3440d12bd2 |
|
MD5 | c022d02bb17020b715fb9bffc874cb3d |
|
BLAKE2b-256 | 46bf3ad65871b0094d72c932bde68b72df16451b232d0d30bdfcc78ca22f163c |
Provenance
File details
Details for the file pytest_xdist_worker_stats-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: pytest_xdist_worker_stats-0.1.4-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8410e8b53464474a08efc6632bf0421a8ae2b2877678a26e5c8b266123a2c2e0 |
|
MD5 | 4159fcbee7b45a809f0b649dd64f02fb |
|
BLAKE2b-256 | ab95ade1d48f70fb33e7440422ce459d8756ca8fa23430ba045bef83269ee309 |