# HG changeset patch # User Mads Kiilerich # Date 2013-02-08 21:54:48 # Node ID a40d608e2a7b7fca11238260cf4f2f668b67a355 # Parent 6204e4d4dd6d10834540357dbf1deac6636077c8 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. diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -1001,9 +1001,8 @@ profiling is done using lsprof. Default: 30. ``nested`` - Show at most this number of lines of drill-down info in a tree structure - after each main entry. This can help explain the difference between Total - and Inline. + Show at most this number of lines of drill-down info after each main entry. + This can help explain the difference between Total and Inline. Specific to the ``ls`` instrumenting profiler. Default: 5. diff --git a/mercurial/lsprof.py b/mercurial/lsprof.py --- a/mercurial/lsprof.py +++ b/mercurial/lsprof.py @@ -50,9 +50,9 @@ class Stats(object): ccount = 0 if climit and e.calls: for se in e.calls: - file.write(cols % ("+%s" % se.callcount, se.reccallcount, + file.write(cols % (se.callcount, se.reccallcount, se.totaltime, se.inlinetime, - "+%s" % label(se.code))) + " %s" % label(se.code))) count += 1 ccount += 1 if limit is not None and count == limit: