sparse-index: count lstat() calls
commitc4e8c42c19ecc354abacd97c61c808383c0870fa
authorDerrick Stolee <stolee@gmail.com>
Fri, 28 Jun 2024 12:43:24 +0000 (28 12:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Jun 2024 19:32:12 +0000 (28 12:32 -0700)
tree0cfb09a2d265253e184f038cec54a6d96114aac8
parent23dd6f8bcc11fc4a468f0863b64f3ebe27a173cd
sparse-index: count lstat() calls

The clear_skip_worktree.. methods already report some statistics about
how many cache entries are checked against path_found() due to having
the skip-worktree bit set. However, due to path_found() performing some
caching, this isn't the only information that would be helpful to
report.

Add a new lstat_count member to the path_found_data struct to count the
number of times path_found() calls lstat(). This will be helpful to help
explain performance problems in this method as well as to demonstrate
future changes to the caching algorithm in a more concrete way than
end-to-end timings.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sparse-index.c