diff 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
line wrap: on
line diff
--- 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: