Created
December 12, 2012 23:02
-
-
Save durden/4272487 to your computer and use it in GitHub Desktop.
Dump Python pstats file to stdout sorted by cumulative stat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
import sys | |
import pstats | |
stats = pstats.Stats(sys.argv[1]) | |
stats.strip_dirs() | |
stats.sort_stats('cumulative') | |
stats.print_stats() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment