Created
July 10, 2015 20:31
-
-
Save gerrich/16263a9ab4f2af3d17e4 to your computer and use it in GitHub Desktop.
Python profile tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from http://thirld.com/blog/2014/11/30/visualizing-the-results-of-profiling-python-code/ | |
pip install pyprof2calltree | |
#Profile your program as usual: | |
python -m cProfile -o prof.out mycode.py | |
#Then visualize the results in KCacheGrind: | |
pyprof2calltree -i prof.out -k | |
pip install pyinstrument | |
python -m pyinstrument mycode.py | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment