bloomberg / bloomberg/pytest-memray

Peak memory usage for parallel tests

Open
#143 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
423
Forks
39
Avg merge
5h 19m
Merged PRs (30d)
1

Description

## Feature Request

When running the memray plugin over multiple tests in parallel (using `pytest-xdist`), it shows only the N tests that used most memory.

While that's great, I would like to see a summary of the **total** memory used by all tests together (especially I'd like to know what's the peak memory usage).

A possible solution might be using the vanilla memray, but I'm not sure how to do that, and regardless of that - I think it's useful to show this information in addition to the existing one.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the plugin handles pytest-xdist workers and currently selects the N highest-memory tests. Define how total and peak memory should be aggregated across workers, then add coverage for a parallel run and verify the report includes both the existing top-N results and the new summary.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.