3 import hotshot, hotshot.stats
7 from osc import commandline
10 if __name__ == '__main__':
12 (fd, filename) = tempfile.mkstemp(prefix = 'osc_profiledata_', dir = '/dev/shm')
17 prof = hotshot.Profile(filename)
19 prof.runcall(commandline.main)
20 print 'run complete. analyzing.'
23 stats = hotshot.stats.load(filename)
25 stats.sort_stats('time', 'calls')