Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python High Performance

You're reading from   Mastering Python High Performance Learn how to optimize your code and Python performance with this vital guide to Python performance profiling and benchmarking

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781783989300
Length 260 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Fernando Donglio Fernando Donglio
Author Profile Icon Fernando Donglio
Fernando Donglio
Arrow right icon
View More author details
Toc

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 lsprofcalltree.py (https://people.gnome.org/~johan/lsprofcalltree.py). It tries to behave more like the kcachegrind-converter (https://packages.debian.org/en/stable/kcachegrind-converters) package from Debian. We'll use the tool to transform the output from cProfile into something KCacheGrind can understand.

Installation

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image