Skip to content

Instantly share code, notes, and snippets.

@rcanepa
Created December 21, 2017 14:10
Show Gist options
  • Save rcanepa/28edabc6d035836dd50a9a04bfb4697d to your computer and use it in GitHub Desktop.
Save rcanepa/28edabc6d035836dd50a9a04bfb4697d to your computer and use it in GitHub Desktop.
Python profiling
Ref: https://stackoverflow.com/questions/582336/how-can-you-profile-a-script
- Using kcachegrind and pyprof2calltree
$ python -m cProfile -o script.profile script.py
$ pyprof2calltree -i script.profile -o script.calltree
$ kcachegrind script.calltree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment