Mercurial > repos > rhope
diff procprofile.py @ 116:60906f8803ef
Improved profiling
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 13 Oct 2010 02:51:56 -0400 |
parents | fd23ab2c1a73 |
children |
line wrap: on
line diff
--- a/procprofile.py Wed Oct 13 01:18:53 2010 +0000 +++ b/procprofile.py Wed Oct 13 02:51:56 2010 -0400 @@ -27,15 +27,16 @@ count,_,rest = rest.partition('\tTime: ') total,_,rest = rest.partition('\tAvg: ') avg,_,rest = rest.partition('\tSelf: ') - self,_,selfavg = rest.partition('\tAvg: ') - records.append((names[int(funcid)], int(count), int(total), float(avg), int(self), float(selfavg))) + self,_,rest = rest.partition('\tAvg: ') + selfavg,_,nestcount = rest.partition('\tNested Count: ') + records.append((names[int(funcid)], int(count), int(total), float(avg), int(self), float(selfavg), int(nestcount))) records.sort(key=lambda el: el[3]) print 'Func\tCount\tTotal(us)\tAvg(us)\tSelf(us)\tSelf Avg(us)' for record in records: - print '%s\t%d\t%d\t%f\t%d\t%f' % record + print '%s\t%d\t%d\t%f\t%d\t%f\t%d' % record