Mercurial > hg
annotate hgext/__init__.py @ 38797:8751d1e2a7ff
util: create a context manager to handle timing
The context manager is pulled out of the timed decorator function, and
refactored to provide a stats instance, with added tests.
author | Martijn Pieters <mj@zopatista.com> |
---|---|
date | Wed, 01 Aug 2018 16:05:41 +0200 |
parents | 155e3308289c |
children | 2372284d9457 |
rev | line source |
---|---|
28450
155e3308289c
hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1360
diff
changeset
|
1 from __future__ import absolute_import |
155e3308289c
hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1360
diff
changeset
|
2 import pkgutil |
155e3308289c
hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1360
diff
changeset
|
3 __path__ = pkgutil.extend_path(__path__, __name__) |