comparison mercurial/profiling.py @ 34412:83dfbda40e67

configitems: register the 'profiling.type' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:44:00 +0200
parents fecea78ff2af
children 7b86aa31b004
comparison
equal deleted inserted replaced
34411:f5c16e6507e8 34412:83dfbda40e67
181 return 181 return
182 self._started = True 182 self._started = True
183 profiler = encoding.environ.get('HGPROF') 183 profiler = encoding.environ.get('HGPROF')
184 proffn = None 184 proffn = None
185 if profiler is None: 185 if profiler is None:
186 profiler = self._ui.config('profiling', 'type', default='stat') 186 profiler = self._ui.config('profiling', 'type')
187 if profiler not in ('ls', 'stat', 'flame'): 187 if profiler not in ('ls', 'stat', 'flame'):
188 # try load profiler from extension with the same name 188 # try load profiler from extension with the same name
189 proffn = _loadprofiler(self._ui, profiler) 189 proffn = _loadprofiler(self._ui, profiler)
190 if proffn is None: 190 if proffn is None:
191 self._ui.warn(_("unrecognized profiler '%s' - ignored\n") 191 self._ui.warn(_("unrecognized profiler '%s' - ignored\n")