[PATCH 7 of 8 v4] extdiff: log time spent in external diff program
Simon Farnsworth
simonfar at fb.com
Mon Feb 13 13:25:11 EST 2017
On 13/02/2017 18:04, Bryan O'Sullivan wrote:
>
> On Mon, Feb 13, 2017 at 9:29 AM, Simon Farnsworth <simonfar at fb.com
> <mailto:simonfar at fb.com>> wrote:
>
> + with ui.timeblockedsection('extdiff'):
> + ui.system(cmdline, cwd=tmproot)
>
>
> Why not simply instrument ui.system directly, and leave its callers
> untouched?
I want the caller to tell me what tag to apply to this blocking reason,
so that I can account for the blocking in hook.py (where it's running a
non-interactive process) and sshpeer.py (where it's network blocking as
we talk to a server) differently to extdiff.py and filemerge.py (where
it's an interactive process).
I could push the instrumentation into ui.system, conditional on being
passed a tag (with a catch-all for "not tagged") if people think that
would be more useful?
--
Simon Farnsworth
More information about the Mercurial-devel
mailing list