123456789101112131415161718192021 |
- import sys
- counters = {}
- for l in open(sys.argv[1], "r"):
- r = l.rsplit(" : ", 1)
- if len(r) == 2:
- func, time = r
- time = float(time)
- counters[func] = counters.get(func, 0.0) + time
- c = 0
- for time, func in reversed(sorted([(counters[k], k) for k in counters])):
- if func.startswith("jit"):
- continue
- else:
- print("%s = %s" % (func, time))
- c += 1
- if c > 30:
- break
|