Revision 848
Added by Aaron Marcuse-Kubitza almost 13 years ago
bin/profile_stats | ||
---|---|---|
1 |
#!/usr/bin/env python |
|
2 |
# Analyzes a profiling statistics file |
|
3 |
|
|
4 |
import pstats |
|
5 |
import sys |
|
6 |
|
|
7 |
def main(): |
|
8 |
try: _prog_name, stats_path = sys.argv |
|
9 |
except ValueError: |
|
10 |
raise SystemExit('Usage: '+sys.argv[0]+' stats_file') |
|
11 |
|
|
12 |
stats = pstats.Stats(stats_path) |
|
13 |
stats.strip_dirs() |
|
14 |
stats.sort_stats('cumulative') |
|
15 |
stats.print_stats() |
|
16 |
|
|
17 |
main() |
|
0 | 18 |
Also available in: Unified diff
Added profile_stats to analyze a profiling statistics file