[Numpy-discussion] profiling line by line

David Cournapeau david at ar.media.kyoto-u.ac.jp
Mon Sep 15 23:12:19 EDT 2008


Robert Kern wrote:
> On Mon, Sep 15, 2008 at 21:43, David Cournapeau
> <david at ar.media.kyoto-u.ac.jp> wrote:
>   
>> You can do it with kcachegrind, which is arguably more powerful, but it
>> is a bit a pain to set up.
>>
>> http://jcalderone.livejournal.com/21124.html
>>     
>
> No, that's with cProfile, which doesn't support line-by-line profiling.
>   

You're right, I did it with hotshot, I did not paste the right link,
sorry. The right one should be:

http://ddaa.net/blog/python/lsprof-calltree

Both profiles (cProfile and hotshot) formats are usable with
kcachegrind, but you have to convert first the profiles, so it is not as
integrated as if everything was in python. It does give you information
similar as matlab, which is one thing I missed from matlab too when I
started using python.

cheers,

David



More information about the NumPy-Discussion mailing list