git/list[1] front-page[2] threads[3] people[4] search[5] about
 

GIT_TRACE_PERFORMANCE and pager

From
Christian Couder <christian.couder@gmail.com>
Date
Feb 29, 2016, 11:25 UTC
Message-ID
<CAP8UFD2zFBV7gRVvLB-gGEB=cfZJmYKrfiD2vdTdxgEgYU6jHQ@mail.gmail.com>
Hi,

It looks like setting GIT_TRACE_PERFORMANCE to 1 or 2 (for stdout or stderr) does not always work well with commands that use a pager, for example:

-------------
> GIT_TRACE_PERFORMANCE=2 git log -1
commit f02fbc4f9433937ee0463d0342d6d7d97e1f6f1e
Author: Junio C Hamano <gitster@pobox.com>
Date:   Fri Feb 26 13:45:26 2016 -0800
    Git 2.8-rc0
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
-------------
In the above the GIT_TRACE_PERFORMANCE output is missing.
When I use "--no-pager", I get the GIT_TRACE_PERFORMANCE output:
-------------
> GIT_TRACE_PERFORMANCE=2 git --no-pager log -1
commit f02fbc4f9433937ee0463d0342d6d7d97e1f6f1e
Author: Junio C Hamano <gitster@pobox.com>
Date:   Fri Feb 26 13:45:26 2016 -0800
    Git 2.8-rc0
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
12:16:31.258462 trace.c:420             performance: 0.001415428 s:
git command: 'git' '--no-pager' 'log' '-1'
-------------

Setting GIT_TRACE to 1 or 2 seems to work, but maybe it is because it outputs stuff at the beginning of the process and not at the end.

Cheers, Christian.

Next: Jeff King
Message 1 of 5 in “GIT_TRACE_PERFORMANCE and pager”
  1. Christian CouderFeb 29, 2016
  2. Jeff KingFeb 29, 2016
  3. Christian CouderFeb 29, 2016
  4. Jeff KingFeb 29, 2016
  5. Junio C HamanoFeb 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.