Re: [PATCH v6 05/11] trace: add infrastructure to augment trace output with additional info

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v6 05/11] trace: add infrastructure to augment trace output with additional info

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:01:43

Karsten Blees [off-list ref] writes:
To be able to add a common prefix or suffix to all trace output (e.g.
a timestamp or file:line of the caller), factor out common setup and
cleanup tasks of the trace* functions.

Some unit-tests use trace output to verify internal state, and variable
output such as timestamps and line numbers are not useful there. Disable
additional trace output if GIT_TRACE_BARE is set.
Hmph, this makes me wonder if we are better off making these
additional trace output optional, i.e. not disabling with
GIT_TRACE_BARE like this, but show the new output only when
explicitly asked for by setting GIT_TRACE_PERF or something.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [PATCH v6 05/11] trace: add infrastructure to augment trace output with additional info

From: Karsten Blees <hidden>
Date: 2016-06-15 23:01:43

Am 21.06.2014 00:33, schrieb Junio C Hamano:
Karsten Blees [off-list ref] writes:
quoted
To be able to add a common prefix or suffix to all trace output (e.g.
a timestamp or file:line of the caller), factor out common setup and
cleanup tasks of the trace* functions.

Some unit-tests use trace output to verify internal state, and variable
output such as timestamps and line numbers are not useful there. Disable
additional trace output if GIT_TRACE_BARE is set.
Hmph, this makes me wonder if we are better off making these
additional trace output optional, i.e. not disabling with
GIT_TRACE_BARE like this, but show the new output only when
explicitly asked for by setting GIT_TRACE_PERF or something.
GIT_TRACE_VERBOSE perhaps? It affects all trace output, not just
GIT_TRACE_PERFORMANCE. The tests would still have to disable it
explicitly, though, in case someone sets it in their profile.

However, IIRC conclusion of v4 discussion was that this would be
useful for all trace output [1], so I think it should be the default.

[1] https://groups.google.com/forum/#!topic/msysgit/UMKTvmZX5aI

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [PATCH v6 05/11] trace: add infrastructure to augment trace output with additional info

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:01:43

On Fri, Jun 20, 2014 at 4:32 PM, Karsten Blees [off-list ref] wrote:
Am 21.06.2014 00:33, schrieb Junio C Hamano:
quoted
Karsten Blees [off-list ref] writes:
GIT_TRACE_VERBOSE perhaps? It affects all trace output, not just
GIT_TRACE_PERFORMANCE. The tests would still have to disable it
explicitly, though, in case someone sets it in their profile.

However, IIRC conclusion of v4 discussion was that this would be
useful for all trace output [1], so I think it should be the default.

[1] https://groups.google.com/forum/#!topic/msysgit/UMKTvmZX5aI
Hmph, after re-reading of that thread, I recall that I thought Peff's
quoted
Would it make
sense to just tie this to regular trace_* calls, and if
GIT_TRACE_PERFORMANCE is set, add a timestamp to each line?
was the conclusion (i.e. by default no change, ask with GIT_TRACE_PERFORMANCE),
and that I found that reasonable back then.

As to the need to disable in the tests, yes, you are right. Just like
we give predictiable
environment to tests by setting EDITOR, HOME, etc. in test-lib.sh, we
should do the
same for these new settings there.

Thanks.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help