Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-07-11 00:12:31 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-11 00:48:55 +0300
commitc489f47a649da8984a2240032e1d819e9a80ea2a (patch)
tree1d87922b2067d0566ee39f9ec2b85a0616312c83 /trace2.h
parent59c35fac54054b3f781b0275eac7d7c54468f0d5 (diff)
refs/packed-backend.c: add trace2 counters for jump list
The previous commit added low-level tests to ensure that the packed-refs iterator did not enumerate excluded sections of the refspace. However, there was no guarantee that these sections weren't being visited, only that they were being suppressed from the output. To harden these tests, add a trace2 counter which tracks the number of regions skipped by the packed-refs iterator, and assert on its value. Suggested-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2.h')
-rw-r--r--trace2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/trace2.h b/trace2.h
index 4ced30c0db..9452e291f5 100644
--- a/trace2.h
+++ b/trace2.h
@@ -551,6 +551,8 @@ enum trace2_counter_id {
TRACE2_COUNTER_ID_TEST1 = 0, /* emits summary event only */
TRACE2_COUNTER_ID_TEST2, /* emits summary and thread events */
+ TRACE2_COUNTER_ID_PACKED_REFS_JUMPS, /* counts number of jumps */
+
/* Add additional counter definitions before here. */
TRACE2_NUMBER_OF_COUNTERS
};