changeset 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 6204e4d4dd6d
children cc28a84db8c9
files mercurial/help/config.txt mercurial/lsprof.py
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help/config.txt	Sun Feb 10 04:04:22 2013 -0600
+++ b/mercurial/help/config.txt	Fri Feb 08 22:54:48 2013 +0100
@@ -1001,9 +1001,8 @@
     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.
 
--- a/mercurial/lsprof.py	Sun Feb 10 04:04:22 2013 -0600
+++ b/mercurial/lsprof.py	Fri Feb 08 22:54:48 2013 +0100
@@ -50,9 +50,9 @@
             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: