mingw: handle GITPERLLIB in t0021 in a Windows-compatible way
[git.git] / t / perf / p5302-pack-index.sh
blob99bdb16c8583a98b0c33cddadabb85f47b7d5c41
1 #!/bin/sh
3 test_description="Tests index-pack performance"
5 . ./perf-lib.sh
7 test_perf_large_repo
9 test_expect_success 'repack' '
10 git repack -ad &&
11 PACK=$(ls .git/objects/pack/*.pack | head -n1) &&
12 test -f "$PACK" &&
13 export PACK
16 test_expect_success 'create target repositories' '
17 for repo in t1 t2 t3 t4 t5 t6
19 git init --bare $repo
20 done
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
47 test_done