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

Re: [RFC PATCH] pack-objects: write objects packed to trace2

From
Duy Nguyen <pclouds@gmail.com>
Date
Apr 10, 2019, 05:08 UTC
Message-ID
<CACsJy8CV-NxoapFcedNpCiahS3jrsWL00v2JfZkGzsrPNDmiaA@mail.gmail.com>
In-Reply-To
<20190409214420.90898-1-jonathantanmy@google.com>
On Wed, Apr 10, 2019 at 4:45 AM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 27 quoted lines
>
> This is useful when investigating performance of pushes, and other times
> when no progress information is written (because the pack is written to
> stdout).
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
> We're trying to improve push performance, and it would be nice to be
> able to observe the number of objects sent over each push, both to
> correlate it with time taken (which is already traced) and to notice
> situations when significantly more objects are being sent than needed.
>
> Sending this as an RFC because this patch works but is somewhat ad-hoc -
> perhaps someone else has a more comprehensive solution.
> ---
>  builtin/pack-objects.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index a154fc29f6..ac464d7d07 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -964,6 +964,7 @@ static void write_pack_file(void)
>         if (written != nr_result)
>                 die(_("wrote %"PRIu32" objects while expecting %"PRIu32),
>                     written, nr_result);
> +       trace2_printf("packed %d objects", nr_result);
The die() line right above uses %PRIu32 instead of %d
Show 6 quoted lines
>  }
>
>  static int no_try_delta(const char *path)
> --
> 2.21.0.392.gf8f6787159e-goog
>
-- 
Duy
Previous: Junio C HamanoNext: Jeff Hostetler
Message 3 of 5 in “pack-objects: write objects packed to trace2”
  1. pack-objects: write objects packed to trace2Jonathan Tan, Apr 9, 2019
  2. Junio C HamanoApr 10, 2019
  3. Duy NguyenApr 10, 2019
  4. Jeff HostetlerApr 10, 2019
  5. pack-objects: write objects packed to trace2Jonathan Tan, Apr 11, 2019

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.