Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 39509:3a86f7eb8b78
extensions: trace the total time of running all extsetup callbacks
Differential Revision: https://phab.mercurial-scm.org/D4511
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 06 Sep 2018 16:21:42 -0400 |
parents | 1a2bfc4d756a |
children | 1ab185c78cc3 |
comparison
equal
deleted
inserted
replaced
39508:1a2bfc4d756a | 39509:3a86f7eb8b78 |
---|---|
293 broken.add(name) | 293 broken.add(name) |
294 log(' > uisetup for %r took %s\n', name, stats) | 294 log(' > uisetup for %r took %s\n', name, stats) |
295 log('> all uisetup took %s\n', alluisetupstats) | 295 log('> all uisetup took %s\n', alluisetupstats) |
296 | 296 |
297 log('- executing extsetup hooks\n') | 297 log('- executing extsetup hooks\n') |
298 for name in _order[newindex:]: | 298 with util.timedcm('all extsetup') as allextetupstats: |
299 if name in broken: | 299 for name in _order[newindex:]: |
300 continue | 300 if name in broken: |
301 log(' - running extsetup for %r\n', name) | 301 continue |
302 with util.timedcm('extsetup %r', name) as stats: | 302 log(' - running extsetup for %r\n', name) |
303 if not _runextsetup(name, ui): | 303 with util.timedcm('extsetup %r', name) as stats: |
304 log(' - the %r extension extsetup failed\n', name) | 304 if not _runextsetup(name, ui): |
305 broken.add(name) | 305 log(' - the %r extension extsetup failed\n', name) |
306 log(' > extsetup for %r took %s\n', name, stats) | 306 broken.add(name) |
307 log(' > extsetup for %r took %s\n', name, stats) | |
308 log('> all extsetup took %s\n', allextetupstats) | |
307 | 309 |
308 for name in broken: | 310 for name in broken: |
309 log(' - disabling broken %r extension\n', name) | 311 log(' - disabling broken %r extension\n', name) |
310 _extensions[name] = None | 312 _extensions[name] = None |
311 | 313 |