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
path: root/trace2
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
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')
-rw-r--r--trace2/tr2_ctr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/trace2/tr2_ctr.c b/trace2/tr2_ctr.c
index b342d3b1a3..50570d0165 100644
--- a/trace2/tr2_ctr.c
+++ b/trace2/tr2_ctr.c
@@ -27,6 +27,11 @@ static struct tr2_counter_metadata tr2_counter_metadata[TRACE2_NUMBER_OF_COUNTER
.name = "test2",
.want_per_thread_events = 1,
},
+ [TRACE2_COUNTER_ID_PACKED_REFS_JUMPS] = {
+ .category = "packed-refs",
+ .name = "jumps_made",
+ .want_per_thread_events = 0,
+ },
/* Add additional metadata before here. */
};