t5326: test propagating hashcache values
commit54156af0d66b64cfa290ffce302af05d256d9b9c
authorTaylor Blau <me@ttaylorr.com>
Fri, 17 Sep 2021 21:21:29 +0000 (17 17:21 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Sep 2021 21:34:48 +0000 (17 14:34 -0700)
tree1a2fff963a8c3a53f07b7fa2e9ea509ecc353a48
parentbf4a60874af992655c139c612c06758353495e3b
t5326: test propagating hashcache values

Now that we both can propagate values from the hashcache, and respect
the configuration to enable the hashcache at all, test that both of
these function correctly by hardening their behavior with a test.

Like the hash-cache in classic single-pack bitmaps, this helps more
proportionally the more up-to-date your bitmap coverage is. When our
bitmap coverage is out-of-date with the ref tips, we spend more time
proportionally traversing, and all of that traversal gets the name-hash
filled in.

But for the up-to-date bitmaps, this helps quite a bit. These numbers
are on git.git, with `pack.threads=1` to help see the difference
reflected in the overall runtime.

    Test                            origin/tb/multi-pack-bitmaps   HEAD
    -------------------------------------------------------------------------------------
    5326.4: simulated clone         1.87(1.80+0.07)                1.46(1.42+0.03) -21.9%
    5326.5: simulated fetch         2.66(2.61+0.04)                1.47(1.43+0.04) -44.7%
    5326.6: pack to file (bitmap)   2.74(2.62+0.12)                1.89(1.82+0.07) -31.0%

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5326-multi-pack-bitmaps.sh