| 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()
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.