3 test_description
='performance of fetches from bitmapped packs'
6 test_fetch_bitmaps
() {
7 test_expect_success
'setup test directory' '
11 test_perf_default_repo
13 test_expect_success
'create bitmapped server repo' '
14 git config pack.writebitmaps true &&
15 git config pack.writeBitmapLookupTable '"$1"' &&
19 # simulate a fetch from a repository that last fetched N days ago, for
20 # various values of N. We do so by following the first-parent chain,
21 # and assume the first entry in the chain that is N days older than the current
22 # HEAD is where the HEAD would have been then.
23 for days
in 1 2 4 8 16 32 64 128; do
24 title
=$
(printf '%10s' "($days days)")
25 test_expect_success
"setup revs from $days days ago" '
26 now=$(git log -1 --format=%ct HEAD) &&
27 then=$(($now - ($days * 86400))) &&
28 tip=$(git rev-list -1 --first-parent --until=$then HEAD) &&
35 test_perf
"server $title (lookup=$1)" '
36 git pack-objects --stdout --revs \
37 --thin --delta-base-offset \
41 test_size
"size $title" '
45 test_perf
"client $title (lookup=$1)" '
46 git index-pack --stdin --fix-thin <tmp.pack
51 test_fetch_bitmaps true
52 test_fetch_bitmaps false