pythonprofilers / memory_profiler

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

support profiling an existing process in mprof script #286

Open cr-dani-koretsky opened 4 years ago

cr-dani-koretsky commented 4 years ago

Hi,

The library already supports profiling existing processes. I decided to add this support to mprof script also, so it's easy to just do for example: mprof attach explorer.exe

and get a graph of other processes that are not being run by mprof itself.

I have created a PR to merge the code (already tested): https://github.com/pythonprofilers/memory_profiler/pull/285