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.6.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for pytest_xdist_worker_stats-0.1.6.tar.gz
Algorithm Hash digest
SHA256 cc761107207fed0200f61013445130cb8a64e3b1dc0a9c5949b2a65126f4a383
MD5 14f2935fb69d63e9375229357d632bee
BLAKE2b-256 6e71d49a95bd268a73a826a88408ffb2e5199b09e9b2ab21bd1d931d88028f4f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for pytest_xdist_worker_stats-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3bb74cd60e3398a4c700bd1e40829a4bdf54130a1af8d069ebcf33630f745cf8
MD5 01242c927af63e7b6ca1a7190010ddde
BLAKE2b-256 271b56eb968bd56546f54516e65126e40ccd86be0b4fc6436141feb26820ef55

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