1 | initial version |
Just for reference, here's a snippet on how to use cProfile:
import cProfile, pstats
cProfile.runctx("your_function(10000)", globals(), locals(), DATA + "Profile.prof")
s = pstats.Stats(DATA + "Profile.prof")
s.strip_dirs().sort_stats("time").print_stats()