Skip to content

Instantly share code, notes, and snippets.

@avenet
Created May 16, 2014 21:19
Show Gist options
  • Save avenet/e7f4645d30630eb91096 to your computer and use it in GitHub Desktop.
Save avenet/e7f4645d30630eb91096 to your computer and use it in GitHub Desktop.
Print Python profiler debug stats
filename = "profiling_data.pyprof"
import pstats
p = pstats.Stats(filename)
p.strip_dirs().sort_stats(-1).print_stats()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment