bloomberg / bloomberg/pytest-memray
Disable the caplog fixture by default
- Dominant language
- Python
- Stars
- 423
- Forks
- 39
- Avg merge
- 5h 19m
- Merged PRs (30d)
- 1
Description
When profiling a service that generates logs pytest by default automatically collects all log records. This makes the memory profile not true to real life as all log lines are part of the peak memory usage, though in practice after every log that record would be removed. This feature can be disabled for pytest via `-p no:logging`. At the very least we should document this under gotcha's or even better provide a marker that does this?
Contributor guide
Research direction
Start by reviewing how pytest's logging plugin and caplog fixture are enabled during a memray profile, then reproduce the memory impact with `-p no:logging` as the comparison. Done means profiling no longer includes unwanted retained log records, or the supported workaround and any marker behavior is documented under gotchas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100