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>
This commit is contained in:

committed by
Junio C Hamano

parent
59c35fac54
commit
c489f47a64
@ -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. */
|
||||
};
|
||||
|
Reference in New Issue
Block a user