[PATCH 2 of 6 v2] util: add an elapsed time wrapper

Simon Farnsworth simonfar at fb.com
Fri Feb 3 18:04:54 EST 2017



On 03/02/2017 23:00, Bryan O'Sullivan wrote:
>
> On Fri, Feb 3, 2017 at 2:55 PM, Simon Farnsworth <simonfar at fb.com
> <mailto:simonfar at fb.com>> wrote:
>
>     We already capture start and exit times in the external wrapper
>     process - so your added detail of measuring "useful work" (in
>     addition to "total time") tells us if we're seeing a huge overhead
>     in setup/teardown of Mercurial.
>
>
> I think you might have missed a bit of crucial detail. If Mercurial sits
> for 100 minutes after writing its output to the pager before the user
> quits the pager, that's not going to show up as I/O time with your
> scheme, but it is going to show up as elapsed time. This is why
> capturing that measuring elapsed time is not useful. There's an
> indeterminate amount of time where literally nothing is happening (it's
> not teardown, and it's not overhead, it's just waiting for the pager)
> that you need to be able to discount.

Yes - I'd accounted for that in an early prototype (which included 
pager.wait() in stdio time) but lost it by this version.

Thanks for the reminder!
-- 
Simon Farnsworth


More information about the Mercurial-devel mailing list