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