Show More
@@ -947,6 +947,9 b" coreconfigitem('profiling', 'showmax'," | |||||
947 | coreconfigitem('profiling', 'showmin', |
|
947 | coreconfigitem('profiling', 'showmin', | |
948 | default=dynamicdefault, |
|
948 | default=dynamicdefault, | |
949 | ) |
|
949 | ) | |
|
950 | coreconfigitem('profiling', 'showtime', | |||
|
951 | default=True, | |||
|
952 | ) | |||
950 | coreconfigitem('profiling', 'sort', |
|
953 | coreconfigitem('profiling', 'sort', | |
951 | default='inlinetime', |
|
954 | default='inlinetime', | |
952 | ) |
|
955 | ) |
@@ -1780,6 +1780,11 b' statistical text report generated from t' | |||||
1780 |
|
1780 | |||
1781 | The option is unused on other formats. |
|
1781 | The option is unused on other formats. | |
1782 |
|
1782 | |||
|
1783 | ``showtime`` | |||
|
1784 | Show time taken as absolute durations, in addition to percentages. | |||
|
1785 | Only used by the ``hotpath`` format. | |||
|
1786 | (default: true) | |||
|
1787 | ||||
1783 | ``progress`` |
|
1788 | ``progress`` | |
1784 | ------------ |
|
1789 | ------------ | |
1785 |
|
1790 |
@@ -147,6 +147,8 b' def statprofile(ui, fp):' | |||||
147 | # inconsistent config: profiling.showmin |
|
147 | # inconsistent config: profiling.showmin | |
148 | limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05) |
|
148 | limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05) | |
149 | kwargs[r'limit'] = limit |
|
149 | kwargs[r'limit'] = limit | |
|
150 | showtime = ui.configbool('profiling', 'showtime') | |||
|
151 | kwargs[r'showtime'] = showtime | |||
150 |
|
152 | |||
151 | statprof.display(fp, data=data, format=displayformat, **kwargs) |
|
153 | statprof.display(fp, data=data, format=displayformat, **kwargs) | |
152 |
|
154 |
@@ -678,6 +678,7 b' def display_hotpath(data, fp, limit=0.05' | |||||
678 | for sample in data.samples: |
|
678 | for sample in data.samples: | |
679 | root.add(sample.stack[::-1], sample.time - lasttime) |
|
679 | root.add(sample.stack[::-1], sample.time - lasttime) | |
680 | lasttime = sample.time |
|
680 | lasttime = sample.time | |
|
681 | showtime = kwargs.get(r'showtime', True) | |||
681 |
|
682 | |||
682 | def _write(node, depth, multiple_siblings): |
|
683 | def _write(node, depth, multiple_siblings): | |
683 | site = node.site |
|
684 | site = node.site | |
@@ -695,7 +696,9 b' def display_hotpath(data, fp, limit=0.05' | |||||
695 | # lots of string formatting |
|
696 | # lots of string formatting | |
696 | listpattern = ''.ljust(indent) +\ |
|
697 | listpattern = ''.ljust(indent) +\ | |
697 | ('\\' if multiple_siblings else '|') +\ |
|
698 | ('\\' if multiple_siblings else '|') +\ | |
698 |
' %4.1f%% |
|
699 | ' %4.1f%%' +\ | |
|
700 | (' %5.2fs' % node.count if showtime else '') +\ | |||
|
701 | ' %s %s' | |||
699 | liststring = listpattern % (node.count / root.count * 100, |
|
702 | liststring = listpattern % (node.count / root.count * 100, | |
700 | filename, function) |
|
703 | filename, function) | |
701 | codepattern = '%' + ('%d' % (55 - len(liststring))) + 's %d: %s' |
|
704 | codepattern = '%' + ('%d' % (55 - len(liststring))) + 's %d: %s' |
General Comments 0
You need to be logged in to leave comments.
Login now