Show More
@@ -732,6 +732,9 b' def display_hotpath(data, fp, limit=0.05' | |||||
732 | i += 1 |
|
732 | i += 1 | |
733 | if i < len(stack): |
|
733 | if i < len(stack): | |
734 | child.add(stack[i:], time) |
|
734 | child.add(stack[i:], time) | |
|
735 | else: | |||
|
736 | # Normally this is done by the .add() calls | |||
|
737 | child.count += time | |||
735 |
|
738 | |||
736 | root = HotNode(None) |
|
739 | root = HotNode(None) | |
737 | lasttime = data.samples[0].time |
|
740 | lasttime = data.samples[0].time | |
@@ -749,12 +752,8 b' def display_hotpath(data, fp, limit=0.05' | |||||
749 | ] |
|
752 | ] | |
750 | if site: |
|
753 | if site: | |
751 | indent = depth * 2 - 1 |
|
754 | indent = depth * 2 - 1 | |
752 | filename = b'' |
|
755 | filename = (site.filename() + b':').ljust(15) | |
753 |
function = |
|
756 | function = site.function | |
754 | if len(node.children) > 0: |
|
|||
755 | childsite = list(pycompat.itervalues(node.children))[0].site |
|
|||
756 | filename = (childsite.filename() + b':').ljust(15) |
|
|||
757 | function = childsite.function |
|
|||
758 |
|
757 | |||
759 | # lots of string formatting |
|
758 | # lots of string formatting | |
760 | listpattern = ( |
|
759 | listpattern = ( |
@@ -100,6 +100,8 b' Various statprof formatters work' | |||||
100 |
|
100 | |||
101 | $ hg --profile --config profiling.statformat=hotpath sleep 2>../out || cat ../out |
|
101 | $ hg --profile --config profiling.statformat=hotpath sleep 2>../out || cat ../out | |
102 | $ cat ../out | statprofran |
|
102 | $ cat ../out | statprofran | |
|
103 | $ grep sleepext.py ../out | |||
|
104 | .* [0-9.]+% [0-9.]+s sleepext.py:\s*sleep line 7: time\.sleep.* (re) | |||
103 |
|
105 | |||
104 | $ hg --profile --config profiling.statformat=json sleep 2>../out || cat ../out |
|
106 | $ hg --profile --config profiling.statformat=json sleep 2>../out || cat ../out | |
105 | $ cat ../out |
|
107 | $ cat ../out |
General Comments 0
You need to be logged in to leave comments.
Login now