import pstats

p = pstats.Stats('results')
p.sort_stats('time').print_stats(50)