Skip to main content

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

pytest_xdist_worker_stats-0.1.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pytest_xdist_worker_stats-0.1.5.tar.gz.

File metadata

File hashes

Hashes for pytest_xdist_worker_stats-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4d731fa917e34369a8f29de554d16d74df08ce889c2b2dd5d3003c7c338cac18
MD5 de976dd0e7a591a782428c3ccf65b354
BLAKE2b-256 4bda776f552026532626ec1c2568ff29d774cfc3304710aa51a60823659d6f3d

See more details on using hashes here.

Provenance

File details

Details for the file pytest_xdist_worker_stats-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_xdist_worker_stats-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c76740b141cdb308bb31b4732148fd3b9f0d532fbaab4c337389b9558435e38e
MD5 18adfdce5a5a5a93a6944fd417432def
BLAKE2b-256 2cd9ef072dfdd3983d55781588518c524651f98209c41d0822781264159f295d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page