]> git.ipfire.org Git - thirdparty/git.git/commit
pack-objects: add tracing for various packfile metrics
authorTaylor Blau <me@ttaylorr.com>
Thu, 14 Dec 2023 22:24:36 +0000 (17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Dec 2023 22:38:09 +0000 (14:38 -0800)
commit54393e4e68f2b4cf1ebaab8a934e83c9384595af
tree1775a93e24a8c44aa28913d4b5178ace329751c7
parent519e17ff75180c3e94a7c120c3028b926f2a781e
pack-objects: add tracing for various packfile metrics

As part of the multi-pack reuse effort, we will want to add some tests
that assert that we reused a certain number of objects from a certain
number of packs.

We could do this by grepping through the stderr output of
`pack-objects`, but doing so would be brittle in case the output format
changed.

Instead, let's use the trace2 mechanism to log various pieces of
information about the generated packfile, which we can then use to
compare against desired values.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c