]> git.ipfire.org Git - thirdparty/git.git/blame - t/perf/p5302-pack-index.sh
Merge branch 'pb/request-pull-verify-remote-ref' into maint
[thirdparty/git.git] / t / perf / p5302-pack-index.sh
CommitLineData
b8a2486f
NTND
1#!/bin/sh
2
3test_description="Tests index-pack performance"
4
5. ./perf-lib.sh
6
7test_perf_large_repo
8
9test_expect_success 'repack' '
10 git repack -ad &&
47176591 11 PACK=$(ls .git/objects/pack/*.pack | head -n1) &&
b8a2486f
NTND
12 test -f "$PACK" &&
13 export PACK
14'
15
16test_perf 'index-pack 0 threads' '
775c71e1
JK
17 rm -rf repo.git &&
18 git init --bare repo.git &&
19 GIT_DIR=repo.git git index-pack --threads=1 --stdin < $PACK
b8a2486f
NTND
20'
21
22test_perf 'index-pack 1 thread ' '
775c71e1
JK
23 rm -rf repo.git &&
24 git init --bare repo.git &&
25 GIT_DIR=repo.git GIT_FORCE_THREADS=1 git index-pack --threads=1 --stdin < $PACK
b8a2486f
NTND
26'
27
28test_perf 'index-pack 2 threads' '
775c71e1
JK
29 rm -rf repo.git &&
30 git init --bare repo.git &&
31 GIT_DIR=repo.git git index-pack --threads=2 --stdin < $PACK
b8a2486f
NTND
32'
33
34test_perf 'index-pack 4 threads' '
775c71e1
JK
35 rm -rf repo.git &&
36 git init --bare repo.git &&
37 GIT_DIR=repo.git git index-pack --threads=4 --stdin < $PACK
b8a2486f
NTND
38'
39
40test_perf 'index-pack 8 threads' '
775c71e1
JK
41 rm -rf repo.git &&
42 git init --bare repo.git &&
43 GIT_DIR=repo.git git index-pack --threads=8 --stdin < $PACK
b8a2486f
NTND
44'
45
46test_perf 'index-pack default number of threads' '
775c71e1
JK
47 rm -rf repo.git &&
48 git init --bare repo.git &&
49 GIT_DIR=repo.git git index-pack --stdin < $PACK
b8a2486f
NTND
50'
51
52test_done