Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 16263:be92ddc636e3
profile: add undocumented config options for profiler output
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 15 Mar 2012 15:59:26 -0500 |
parents | cc2da4a5ed9a |
children | 531e69ff348f |
line wrap: on
line diff
--- 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()