Skip to content

Instantly share code, notes, and snippets.

@jpata
Last active June 22, 2016 10:23
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 jpata/d9ef39c3f73606a05c4d6e808acac8a5 to your computer and use it in GitHub Desktop.
Save jpata/d9ef39c3f73606a05c4d6e808acac8a5 to your computer and use it in GitHub Desktop.
import cProfile, time
def func():
s = 0
for i in range(100000):
s += i
p = cProfile.Profile(time.clock)
p.runcall(func)
p.print_stats()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment