1#!/bin/sh23test_description="Tests index-pack performance"45. ./perf-lib.sh67test_perf_large_repo89test_expect_success 'repack' '10git repack -ad &&11PACK=$(ls .git/objects/pack/*.pack | head -n1) &&12test -f "$PACK" &&13export PACK14'1516test_expect_success 'create target repositories' '17for repo in t1 t2 t3 t4 t5 t618do19git init --bare $repo20done21'2223test_perf 'index-pack 0 threads' '24GIT_DIR=t1 git index-pack --threads=1 --stdin < $PACK25'2627test_perf 'index-pack 1 thread ' '28GIT_DIR=t2 GIT_FORCE_THREADS=1 git index-pack --threads=1 --stdin < $PACK29'3031test_perf 'index-pack 2 threads' '32GIT_DIR=t3 git index-pack --threads=2 --stdin < $PACK33'3435test_perf 'index-pack 4 threads' '36GIT_DIR=t4 git index-pack --threads=4 --stdin < $PACK37'3839test_perf 'index-pack 8 threads' '40GIT_DIR=t5 git index-pack --threads=8 --stdin < $PACK41'4243test_perf 'index-pack default number of threads' '44GIT_DIR=t6 git index-pack --stdin < $PACK45'4647test_done