Skip to content

Instantly share code, notes, and snippets.

@yinyin
Created August 28, 2015 00:53
Show Gist options
  • Save yinyin/044b4609915183f44306 to your computer and use it in GitHub Desktop.
Save yinyin/044b4609915183f44306 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import sys
import pstats
input_path = sys.argv[1]
output_path = sys.argv[2]
fp = open(output_path, "w")
s = pstats.Stats(input_path, stream=fp)
s.sort_stats("tottime").print_stats()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment