Jump to content

Page navigation

Content

Visual profiling for Python

I am doing a lot of profiling of Python code recently. Although I usually prefer command line tools, analysing such large amounts of data is pretty inefficient - mostly because lines are often too long and get wrapped, disrupting the table layout.

I was looking for a GUI application that could handle profile or hotshot data, but without success so far.

Now I accidently found a reference to hotshot2calltree which is part of KCachegrind. It converts the hotshot data into a format that KCachegrind can read. KCachegrind does a pretty good job in visualizing the profile data, including nice stuff like call trees, grouping by module etc.

As a side effect, I am now able to use hotshot which is much faster than the profile module. I was not able to use it before, because my application triggered Bug #900092 and I was not able to load the hotshot data. hotshot2calltree does not suffer from this problem (and the output looks sane so far).

You are reading the (archived) weblog of Benjamin Niemann. This weblog has been closed, no new articles will be posted here.
If you can read german, you may have a look at my new weblog.

Navigation:

Archive:

Small print