[PATCH] ui: add optional timestamp to output
Jun Wu
quark at fb.com
Tue Apr 11 15:54:40 EDT 2017
Excerpts from Pierre-Yves David's message of 2017-04-11 20:24:00 +0200:
>
> 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.
That's what `stdbuf` solves. I don't think the "ts" feature should be in
core hg, either.
>
> In addition, `tr` won't handle timestamp for buffered and remote output.
>
> So I think this patches has value on its own.
>
> Cheers,
>
More information about the Mercurial-devel
mailing list