[IPython-dev] Guppy (Heapy) for variables in %who?

Josh Wasserstein ribonucleico@gmail....
Tue Aug 20 14:11:08 CDT 2013


Thanks Thomas. On this topic, how do I profile a script from IPython with
%mprun? Do I necessarily need to import it as a module to profile it?

Josh



On Tue, Aug 20, 2013 at 2:27 PM, Thomas Kluyver <takowl@gmail.com> wrote:

> Hi Josh,
>
> On 20 August 2013 10:48, Josh Wasserstein <ribonucleico@gmail.com> wrote:
>
>> As you may already know, Heapy provides nice memory statistics of the
>> object heap. Here are a couple of links discussing it:
>> *
>> http://stackoverflow.com/questions/110259/which-python-memory-profiler-is-recommended
>> * http://guppy-pe.sourceforge.net/#Heapy
>>
>> IPython already has a magic for printing interactive variables: *who*,
>> similar to MATLAB's *who*:
>> http://www.mathworks.com/help/matlab/ref/who.html except that the
>> IPython version does not show the size of objects in memory. This is where
>> Guppy comes into play, since it can provide memory statistics of the object
>> heap.
>>
>> I was wondering if there have been any efforts or discussions in
>> integrating Heapy (or any other memory profiler) into IPython.
>>
>
> I don't recall any discussion about Heapy. The memory_profiler module has
> IPython integration:
>
> https://pypi.python.org/pypi/memory_profiler/0.27#ipython-integration
>
> If you're interested, the best thing is to write an IPython extension to
> do what you want:
>
>
> http://ipython.org/ipython-doc/stable/config/extensions/index.html#writing-extensions
>
> Best wishes,
> Thomas
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130820/e7f3bb59/attachment.html 


More information about the IPython-dev mailing list