Skip to content

Instantly share code, notes, and snippets.

@re9ulus re9ulus/
Last active May 21, 2016

What would you like to do?
Python profiler example
# cProfile
import cProfile
source = open('path/to/src').read(), sort='tottime)
# Line profiler (using IPython)
%load_ext line_profiler
from mypackage import foo, bar
%lprun -f bar foo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.