3 test_description="Tests index-pack performance"
9 test_expect_success 'repack' '
11 PACK=$(ls .git/objects/pack/*.pack | head -n1) &&
16 test_perf 'index-pack 0 threads' '
18 git init --bare repo.git &&
19 GIT_DIR=repo.git git index-pack --threads=1 --stdin < $PACK
22 test_perf 'index-pack 1 thread ' '
24 git init --bare repo.git &&
25 GIT_DIR=repo.git GIT_FORCE_THREADS=1 git index-pack --threads=1 --stdin < $PACK
28 test_perf 'index-pack 2 threads' '
30 git init --bare repo.git &&
31 GIT_DIR=repo.git git index-pack --threads=2 --stdin < $PACK
34 test_perf 'index-pack 4 threads' '
36 git init --bare repo.git &&
37 GIT_DIR=repo.git git index-pack --threads=4 --stdin < $PACK
40 test_perf 'index-pack 8 threads' '
42 git init --bare repo.git &&
43 GIT_DIR=repo.git git index-pack --threads=8 --stdin < $PACK
46 test_perf 'index-pack default number of threads' '
48 git init --bare repo.git &&
49 GIT_DIR=repo.git git index-pack --stdin < $PACK