Skip to content

Instantly share code, notes, and snippets.

@Susensio
Last active February 10, 2024 07:53
Show Gist options
  • Save Susensio/efd9422e14556dff4122434c3603aff3 to your computer and use it in GitHub Desktop.
Save Susensio/efd9422e14556dff4122434c3603aff3 to your computer and use it in GitHub Desktop.
Python profiling with QCacheGrind
# Profile with cProfile python module and save to output
python -m cProfile -o output.cprof script.py
# Transform into tree format for QCacheGrind
pyprof2calltree -i output.cprof -o callgrind.cprof
# Open QCacheGrind and load callgrind.cprof file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment