Mercurial > public > mercurial-scm > hg
comparison mercurial/statprof.py @ 40381:4613f9274fc0
statprof: update the name as the i increases (issue6003)
2864f8d3fcd6 while working on py3 fix, take out the name building out of the
loop so we were not building the new stack-name for each i, rather we were using
the first one again and again.
The test changes shows the profile is now working.
Differential Revision: https://phab.mercurial-scm.org/D5172
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 19 Oct 2018 23:30:56 +0300 |
parents | 7df42042636d |
children | fc4c598dd4a0 |
comparison
equal
deleted
inserted
replaced
40380:1ce4fe0603a6 | 40381:4613f9274fc0 |
---|---|
662 i = 1 | 662 i = 1 |
663 # Skip boiler plate parts of the stack | 663 # Skip boiler plate parts of the stack |
664 name = r'%s:%s' % (stack[i].filename(), stack[i].function) | 664 name = r'%s:%s' % (stack[i].filename(), stack[i].function) |
665 while i < len(stack) and name in skips: | 665 while i < len(stack) and name in skips: |
666 i += 1 | 666 i += 1 |
667 name = r'%s:%s' % (stack[i].filename(), stack[i].function) | |
667 if i < len(stack): | 668 if i < len(stack): |
668 child.add(stack[i:], time) | 669 child.add(stack[i:], time) |
669 | 670 |
670 root = HotNode(None) | 671 root = HotNode(None) |
671 lasttime = data.samples[0].time | 672 lasttime = data.samples[0].time |