Book Image

Mastering Python High Performance

Book Image

Mastering Python High Performance

Overview of this book

Table of Contents (15 chapters)

KCacheGrind – pyprof2calltree

The first GUI tool we will see is KCacheGrind. It is a data visualization tool designed to parse and display different formats of profiling data. For our case, we will display the output from cProfile. However, to do this, we'll also need the help from the command-line tool called pyprof2calltree.

This tool is a rebranding of a very popular one called ( It tries to behave more like the kcachegrind-converter ( package from Debian. We'll use the tool to transform the output from cProfile into something KCacheGrind can understand.


To install pyprof2calltree, you'll first need to install the pip command-line utility. Then, just use the following command:

$ pip install pyprof2calltree

Note that all installation steps and instructions are meant for the Ubuntu 14.04 Linux distribution, unless otherwise noted.

Now, for KCacheGrind...