Comment 1 for bug 133080

Revision history for this message
Anand Chitipothu (anandology) wrote :

The above patch does the work of capturestdout also. Here is much cleaner fix.

def print_stats():
    stats = hotshot.stats.load(temp.name)
    stats.strip_dirs()
    stats.sort_stats('time', 'calls')
    stats.print_stats(40)
    stats.print_callers()

x = '\n\ntook '+ str(stime) + ' seconds\n'
x += capturestdout(print_stats)()