Skip to content

perf(tests): Run unit suite in parallel with pytest-xdist#1425

Merged
srtab merged 1 commit into
mainfrom
perf/parallel-unit-tests
Jul 23, 2026
Merged

perf(tests): Run unit suite in parallel with pytest-xdist#1425
srtab merged 1 commit into
mainfrom
perf/parallel-unit-tests

Conversation

@srtab

@srtab srtab commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

make test ran the 4232-test unit suite serially on a single core, despite pytest-xdist already being a project dependency. Adding -n auto parallelizes the run across all available cores.

Impact

  • ~95s → ~50s (~2× faster), coverage report preserved (89.26% TOTAL), all 4232 tests green.
  • -n auto adapts to the machine — fewer workers on smaller CI runners.

Notes

Deeper levers were investigated and rejected as not worthwhile: lazy imports (~7% of per-worker startup) and trimming the autouse fixtures (<1s wall under -n auto). --dist worksteal is ~20% faster still, but exposed a rare flaky failure (a latent test-isolation bug) and is deferred until that is root-caused.

`make test` ran the 4232-test unit suite serially on a single core
despite pytest-xdist already being a dependency. Adding `-n auto`
parallelizes collection across all cores, cutting the run from ~95s
to ~50s (~2x) with coverage preserved and all tests green.
@srtab srtab self-assigned this Jul 22, 2026
@srtab
srtab merged commit 82d0b1d into main Jul 23, 2026
6 checks passed
@srtab
srtab deleted the perf/parallel-unit-tests branch July 23, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant