pythonprofilers / memory_profiler

Monitor Memory usage of Python code
http://pypi.python.org/pypi/memory_profiler
Other
4.39k stars 380 forks source link

No prompt running memory profiler against pytest #355

Open hectorcanto opened 2 years ago

hectorcanto commented 2 years ago

I'm trying to run memory_profiler against pytest but no prompt or logging is shown (while it does record a dat file for the plot).

I tried:

python -m memory_profiler pytest
mprof run pytest 
mprof run python -m pytest
pytest

with @profile, with pytest -s to avoid prompt capture or

fp = open('memory_profiler.log', 'w+')

@profile(stream=fp)

I added the decorator, either in a single test or in a function being used by that single test.

Relevant information:

Any suggestions? Thanks for any help