Mercurial > hg > mercurial-source
changeset 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 | bf7a6c3b2a4a |
children | 77d56a5e74a5 |
files | mercurial/dispatch.py mercurial/lsprof.py |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -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()