]> git.ipfire.org Git - thirdparty/git.git/commit - wrapper.c
wrapper: use trace2 counters to collect fsync stats
authorBeat Bolli <dev+git@drbeat.li>
Thu, 20 Jul 2023 16:48:23 +0000 (18:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jul 2023 18:52:53 +0000 (11:52 -0700)
commita27eecea75b3858b4052b191143f144a7e966869
tree23a314b2ea37269e2fedd0b3a46260fa87293030
parentcba07a324d2cda06dd7a7b35b4579f800de024aa
wrapper: use trace2 counters to collect fsync stats

As mentioned in the thread starting at [1], trace2 counters should be
used to count events instead of ad-hoc static variables.

Convert the two fsync static variables to trace2 counters, reducing the
coupling between wrapper.c and the trace2 subsystem. Adjust t/t5351 to
match the trace2 counter output format.

The counters are not per-thread because the ones being replaced also
were not.

[1] https://lore.kernel.org/git/20230627195251.1973421-2-calvinwan@google.com/

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5351-unpack-large-objects.sh
trace2.c
trace2.h
trace2/tr2_ctr.c
wrapper.c
wrapper.h