fabianp/memory_profiler — pull request #70 by guillermo-carrasco (2014-01-27 20:21:53+00:00)
Title: Add include_children parameter when creating MemTimer object for external processes

Hi,

With a bit of debugging I found the problem, and a solution for issue #69. It is just a forgotten parameter when creating the object MemTimer when benchmarking external processes.

Also, I noticed that even if psutil module is found, the ```_get_memory``` function will calculate the memory twice if ```os.name == 'posix'```, which was the case in my Mac OSX. I just put an ```elif``` there.

I have tested this fix executing memory_usage on functions that create threads (i.e with multiprocessing.Pool), as well as with functions that call external programs that in turn create several threads (i.e subprocess.check_call).

Hope that helps!