[PATCH] ui: add optional timestamp to output
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Apr 11 14:24:00 EDT 2017
On 04/11/2017 07:49 PM, Bryan O'Sullivan wrote:
>
> On Tue, Apr 11, 2017 at 7:15 AM, Augie Fackler <raf at durin42.com
> <mailto:raf at durin42.com>> wrote:
>
> I'm missing some context. Why do we want timestamps in our output
> like this?
This is useful to audit the timing of various steps when debugging (eg:
discovery, cache computations, etc…).
(I'm the one behind who motivated Mathieu to write this patch. I need
this feature on a regular basis)
> That's what the ts command gives us on Linux. I don't think this needs
> to be integrated into Mercurial proper.
Yes, `ts` can do this. However, piping to `ts` enable buffered output
for Python (and Mercurial). As a result the timestamp of line has no
relation with the time it was requested in the code. Sure one can
request non-buffered output, but at that point there start to be enough
obstacle than is get in the "complex" territory when requesting a trace
to a random user.
In addition, `tr` won't handle timestamp for buffered and remote output.
So I think this patches has value on its own.
Cheers,
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list