am, rebase--merge: do not overlook --skip'ed commits with post-rewrite
[git/debian.git] / t / perf / p5311-pack-bitmaps-fetch.sh
blobb04575951f51ea1a41229aa7a17643aa0380dbf5
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 config pack.writebitmaphashcache true &&
11 git repack -ad
14 # simulate a fetch from a repository that last fetched N days ago, for
15 # various values of N. We do so by following the first-parent chain,
16 # and assume the first entry in the chain that is N days older than the current
17 # HEAD is where the HEAD would have been then.
18 for days in 1 2 4 8 16 32 64 128; do
19 title=$(printf '%10s' "($days days)")
20 test_expect_success "setup revs from $days days ago" '
21 now=$(git log -1 --format=%ct HEAD) &&
22 then=$(($now - ($days * 86400))) &&
23 tip=$(git rev-list -1 --first-parent --until=$then HEAD) &&
25 echo HEAD &&
26 echo ^$tip
27 } >revs
30 test_perf "server $title" '
31 git pack-objects --stdout --revs \
32 --thin --delta-base-offset \
33 <revs >tmp.pack
36 test_size "size $title" '
37 wc -c <tmp.pack
40 test_perf "client $title" '
41 git index-pack --stdin --fix-thin <tmp.pack
43 done
45 test_done