mercurial/dispatch.py
changeset 16263 be92ddc636e3
parent 15781 cc2da4a5ed9a
child 16279 531e69ff348f
--- a/mercurial/dispatch.py	Thu Mar 15 15:58:55 2012 -0500
+++ b/mercurial/dispatch.py	Thu Mar 15 15:59:26 2012 -0500
@@ -694,6 +694,8 @@
 
     if options['profile']:
         format = ui.config('profiling', 'format', default='text')
+        field = ui.config('profiling', 'sort', default='inlinetime')
+        climit = ui.configint('profiling', 'nested', default=5)
 
         if not format in ['text', 'kcachegrind']:
             ui.warn(_("unrecognized profiling format '%s'"
@@ -728,8 +730,8 @@
             else:
                 # format == 'text'
                 stats = lsprof.Stats(p.getstats())
-                stats.sort()
-                stats.pprint(top=10, file=ostream, climit=5)
+                stats.sort(field)
+                stats.pprint(limit=30, file=ostream, climit=climit)
 
             if output:
                 ostream.close()