This post originated from an RSS feed registered with Python Buzz
by Ted Leung.
Original Post: Visualizing Python profiling data with kcachegrind
Feed Title: Ted Leung on the air : computers/programming/python
Feed URL: http://www.sauria.com/blog/computers/programming/python?flav=rss
Feed Description: Ted Leung on the air: Open Source, Java, Python, and ...
Today I started to do some work on the big RSS feed test that I've been working on for Chandler. While Googling around, I discovered this
announcement of a method for using kcachegrind to give you a nice visualization of the profiler data produced by Python's hotshot profiler. It requires KDE libraries, so I decided to try to get this working on Linux first, being afraid to try and fink the necessary libraries for KDE. Turns out that there is a kcachegrind package for debian (in unstable). Unfortunately, that version doesn't include the scripts needed to make this work. So I grabbed the unstable version of kcachegrind, unwrapped it and used the script in there. Every thing seems to work just fine, and its a nice way to manipulate the profile data. Thanks to X11.app, I can at least view the visualization on the Mac. I'm not sure if I'm up for KDE libs on the Mac just yet.
On tip if you decide to do this. The input file to kcachegrind must be of the form cachegrind.out.NN where NN is a number. That was really a nasty pain to figure out.