Photos
-
Tag Cloud
android awk bash bioservices books C CSS dictionary english fedora Firefox gimp git github graphviz HTML ipython latex Linux malloc matplotlib mount pandas PDF perl PHP pypi python R rest rpy rpy2 samtools sed sphinx ssh svn video vim virtualbox virtualenv web services wget xbmc yum
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
Follow me
-
Recent Posts
calendar
Recent Comments
- Anonymous on Python list: difference between append and extend
- Thomas Cokelaer on Solving a Linear Programming problem with Python (Pulp)
- Thomas Cokelaer on python: certificate verified failed
- Thomas Cokelaer on How to sort a dictionary by values in Python
- Set Colorbar Range in matplotlib – PythonCharm on matplotlib: difference between pcolor, pcolormesh and imshow
Archives
- December 2018
- October 2018
- August 2018
- May 2018
- March 2018
- February 2018
- January 2018
- December 2017
- October 2017
- September 2017
- August 2017
- June 2017
- May 2017
- January 2017
- November 2016
- October 2016
- September 2016
- March 2016
- February 2016
- January 2016
- June 2015
- May 2015
- February 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- July 2012
- June 2012
- April 2012
- March 2012
- February 2012
- January 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
Categories
Meta
Monthly Archives: October 2013
Profiling Python with valgrind
Tweet 1. Under Linux, install valgrind as follows (Fedora):
1 |
sudo yum install valgrind kcachegrind |
and pyprof2calltree:
1 |
pip install pyprof2calltree |
2. create a Python script (let us call it run.py) 3. Create the file containing the profile information using valgrind/callgrind
1 2 |
python -m cProfile -o profile_data.pyprof run.py pyprof2calltree -i profile_data.pyprof # this converts the stats into a callgrind format |
4. Visualisation
1 |
kcachegrind profile_data.pyprof.log |
Alternatively, for visualisation, … Continue reading