Skip to content

Instantly share code, notes, and snippets.

@randy3k
Created June 17, 2018 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save randy3k/dc30f9ed6778366e3d910e969f98fa31 to your computer and use it in GitHub Desktop.
Save randy3k/dc30f9ed6778366e3d910e969f98fa31 to your computer and use it in GitHub Desktop.
python inline profiling
import cProfile, pstats
pr = cProfile.Profile()
pr.enable()
pr.disable()
ps = pstats.Stats(pr).sort_stats('time')
ps.print_stats(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment