msvc: avoid calling `access("NUL", flags)`
[alt-git.git] / t / perf / p5311-pack-bitmaps-fetch.sh
blob47c3fd7581cc99d562bb5796f3374e207573a304
1 #!/bin/sh
3 test_description='performance of fetches from bitmapped packs'
4 . ./perf-lib.sh
6 test_perf_default_repo
8 test_expect_success 'create bitmapped server repo' '
9 git config pack.writebitmaps true &&
10 git repack -ad
13 # simulate a fetch from a repository that last fetched N days ago, for
14 # various values of N. We do so by following the first-parent chain,
15 # and assume the first entry in the chain that is N days older than the current
16 # HEAD is where the HEAD would have been then.
17 for days in 1 2 4 8 16 32 64 128; do
18 title=$(printf '%10s' "($days days)")
19 test_expect_success "setup revs from $days days ago" '
20 now=$(git log -1 --format=%ct HEAD) &&
21 then=$(($now - ($days * 86400))) &&
22 tip=$(git rev-list -1 --first-parent --until=$then HEAD) &&
24 echo HEAD &&
25 echo ^$tip
26 } >revs
29 test_perf "server $title" '
30 git pack-objects --stdout --revs \
31 --thin --delta-base-offset \
32 <revs >tmp.pack
35 test_size "size $title" '
36 wc -c <tmp.pack
39 test_perf "client $title" '
40 git index-pack --stdin --fix-thin <tmp.pack
42 done
44 test_done