blob: 1e3322defb99762ad52796ff761d7e1c64adf327 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
"""script for digesting profiling output
to profile functions, wrap them into decorator @profile('file_name.prof')
source: http://code.djangoproject.com/wiki/ProfilingDjango
"""
import hotshot.stats
import sys
stats = hotshot.stats.load(sys.argv[1])
#stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(20)
|