[categories] [index] [all (553)] [latest]
Let the profiler execute the code
import hotshot
prof = hotshot.Profile("hotshot_stats.prof")
prof.runcall(my_function)
prof.close()
Display results
from hotshot import stats
s = stats.load("hotshot_stats.prof")
s.strip_dirs()
s.sort_stats('time', 'calls')
s.print_stats(20)