3 test_description="Tests index-pack performance"
9 test_expect_success 'repack' '
11 PACK=$(ls .git/objects/pack/*.pack | head -n1) &&
16 test_expect_success 'create target repositories' '
17 for repo in t1 t2 t3 t4 t5 t6
23 test_perf 'index-pack 0 threads' '
24 GIT_DIR=t1 git index-pack --threads=1 --stdin < $PACK
27 test_perf 'index-pack 1 thread ' '
28 GIT_DIR=t2 GIT_FORCE_THREADS=1 git index-pack --threads=1 --stdin < $PACK
31 test_perf 'index-pack 2 threads' '
32 GIT_DIR=t3 git index-pack --threads=2 --stdin < $PACK
35 test_perf 'index-pack 4 threads' '
36 GIT_DIR=t4 git index-pack --threads=4 --stdin < $PACK
39 test_perf 'index-pack 8 threads' '
40 GIT_DIR=t5 git index-pack --threads=8 --stdin < $PACK
43 test_perf 'index-pack default number of threads' '
44 GIT_DIR=t6 git index-pack --stdin < $PACK