ethan-s
3/29/2016 - 11:25 PM

Dump Python pstats file to stdout sorted by cumulative stat

Dump Python pstats file to stdout sorted by cumulative stat

if __name__ == "__main__":
    import sys
    import pstats

    stats = pstats.Stats(sys.argv[1])
    stats.strip_dirs()
    stats.sort_stats('cumulative')
    stats.print_stats()