Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
each worker
pytest -nx
is set up sequentially, and takes about 0.04 to 0.05s to spawn a new Python instance . If you run pytest -n32 on a file, ~2s is just startup. this doesn't have a huge impact in CI because there's only 8 workers (~0.4s)the line that takes the most time per node/worker:
https://github.com/pytest-dev/pytest-xdist/blob/239def9be9a489526f0a56e6ba442149f17cb919/src/xdist/workermanage.py#L106
pytest-xdist PR: pytest-dev/pytest-xdist#1229
When you run a file with 1 test with -n0 vs -n1, there is still a difference of >0.05s, so xdist still is doing other operations taking up time that should be able to be optimized, but I don't know how much we want to spend on this. pytest does seem to be the best runner (tooling, test API, ease of use) from what I've seen looking around online.