3 import hotshot, hotshot.stats
7 from osc import commandline
8 from osc.core import init_basicauth
11 if __name__ == '__main__':
13 (fd, filename) = tempfile.mkstemp(prefix = 'osc_profiledata_', dir = '/dev/shm')
18 prof = hotshot.Profile(filename)
21 prof.runcall(commandline.main)
22 print 'run complete. analyzing.'
25 stats = hotshot.stats.load(filename)
27 stats.sort_stats('time', 'calls')