Mercurial > public > mercurial-scm > hg
comparison mercurial/lsprof.py @ 18642:a40d608e2a7b
profiling: replace '+' markup of nested lines with indentation
The display of nested lines for hg --profile was very non-obvious and made it
look like sort didn't work.
The '+' immediately before CallCount was not related to the CallCount and did
not mean plus in any integer sense.
The '+' before module looked like a part of the module name and not like ascii
art.
Instead we now indent the subordinate module names to clearly show the
structure.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 08 Feb 2013 22:54:48 +0100 |
parents | a455a18bfdac |
children | 9c75daf89450 |
comparison
equal
deleted
inserted
replaced
18641:6204e4d4dd6d | 18642:a40d608e2a7b |
---|---|
48 if limit is not None and count == limit: | 48 if limit is not None and count == limit: |
49 return | 49 return |
50 ccount = 0 | 50 ccount = 0 |
51 if climit and e.calls: | 51 if climit and e.calls: |
52 for se in e.calls: | 52 for se in e.calls: |
53 file.write(cols % ("+%s" % se.callcount, se.reccallcount, | 53 file.write(cols % (se.callcount, se.reccallcount, |
54 se.totaltime, se.inlinetime, | 54 se.totaltime, se.inlinetime, |
55 "+%s" % label(se.code))) | 55 " %s" % label(se.code))) |
56 count += 1 | 56 count += 1 |
57 ccount += 1 | 57 ccount += 1 |
58 if limit is not None and count == limit: | 58 if limit is not None and count == limit: |
59 return | 59 return |
60 if climit is not None and ccount == climit: | 60 if climit is not None and ccount == climit: |