test7 de fetching après suppression d'un fichier
This commit is contained in:
parent
1e1926d5ea
commit
f468cd0ba2
@ -91,7 +91,7 @@ test4(){
|
|||||||
#WITHOUT CHANGING ANYTHING
|
#WITHOUT CHANGING ANYTHING
|
||||||
test5(){
|
test5(){
|
||||||
section TEST5
|
section TEST5
|
||||||
run echo 'TEST 5 : case of classic fetching and merging'
|
run echo 'TEST 5 : case of classic fetching and merging, after addition of a 1M file'
|
||||||
run git clone $1 &> /dev/null
|
run git clone $1 &> /dev/null
|
||||||
cd $REPO_NAME
|
cd $REPO_NAME
|
||||||
run git fetch --progress origin &> /dev/null
|
run git fetch --progress origin &> /dev/null
|
||||||
@ -107,7 +107,7 @@ test5(){
|
|||||||
run git merge --progress &> merging_text
|
run git merge --progress &> merging_text
|
||||||
mem5after=$(du . | tail -n1 | tr -cd [:digit:])
|
mem5after=$(du . | tail -n1 | tr -cd [:digit:])
|
||||||
mem5=$(($mem5after-$mem5before))
|
mem5=$(($mem5after-$mem5before))
|
||||||
bw5=$(grep -o "[[:digit:].]* bytes" merging_text| grep -o "[[:digit:].]* [[:alpha:]]*")
|
bw5=$(grep -e "\->" merging_text| grep -o "[[:digit:].]* -> [[:digit:].]* [[:alpha:]]*")
|
||||||
echo "memory usage in a classic fetching and merging : $mem5"
|
echo "memory usage in a classic fetching and merging : $mem5"
|
||||||
echo "bandwidth usage : $bw5"
|
echo "bandwidth usage : $bw5"
|
||||||
cd ../$REMOTE
|
cd ../$REMOTE
|
||||||
@ -116,7 +116,36 @@ test5(){
|
|||||||
rm -rf performance_testing
|
rm -rf performance_testing
|
||||||
}
|
}
|
||||||
|
|
||||||
#test 6 : shallow exclude
|
test6(){
|
||||||
|
section TEST5
|
||||||
|
run echo 'TEST 6 : case of classic fetching and merging, after removal of a 1M file'
|
||||||
|
run git clone $1 &> /dev/null
|
||||||
|
cd $REPO_NAME
|
||||||
|
run git fetch --progress origin &> /dev/null
|
||||||
|
run git merge --progress origin &> /dev/null
|
||||||
|
mem6before=$(du . | tail -n1 | tr -cd [:digit:])
|
||||||
|
#modification of the remote repo
|
||||||
|
cd ../$REMOTE
|
||||||
|
run rm sample0
|
||||||
|
run git add sample0
|
||||||
|
run git commit --quiet -m"1M sample0 deleted"
|
||||||
|
cd ../../$REPO_NAME
|
||||||
|
run git fetch --progress origin &> fetching_text
|
||||||
|
run git merge --progress &> merging_text
|
||||||
|
mem6after=$(du . | tail -n1 | tr -cd [:digit:])
|
||||||
|
mem6=$(($mem6after-$mem6before))
|
||||||
|
bw6=$(grep -e "\->" merging_text| grep -o "[[:digit:].]* -> [[:digit:].]* [[:alpha:]]*")
|
||||||
|
echo "memory usage in a classic fetching and merging : $mem6"
|
||||||
|
echo "bandwidth usage : $bw6"
|
||||||
|
cd ../$REMOTE
|
||||||
|
git reset --hard -q a99be63309fc4f4600210000583546d966d12d4f
|
||||||
|
cd ../..
|
||||||
|
rm -rf performance_testing
|
||||||
|
}
|
||||||
|
|
||||||
|
#modify to have a history of changes
|
||||||
|
#test 7 : --depth=1
|
||||||
|
#normalement supprime aussi l'historique
|
||||||
|
|
||||||
while getopts ":hn:a" option; do
|
while getopts ":hn:a" option; do
|
||||||
case $option in
|
case $option in
|
||||||
@ -140,6 +169,7 @@ if [ "$ALL_TESTS" = true ]; then
|
|||||||
test3 $REMOTE
|
test3 $REMOTE
|
||||||
test4 $REMOTE
|
test4 $REMOTE
|
||||||
test5 $REMOTE
|
test5 $REMOTE
|
||||||
|
test6 $REMOTE
|
||||||
|
|
||||||
elif [ -n "$TEST_NUM" ]; then
|
elif [ -n "$TEST_NUM" ]; then
|
||||||
case $TEST_NUM in
|
case $TEST_NUM in
|
||||||
@ -155,6 +185,8 @@ elif [ -n "$TEST_NUM" ]; then
|
|||||||
test4 $REMOTE;;
|
test4 $REMOTE;;
|
||||||
5)
|
5)
|
||||||
test5 $REMOTE;;
|
test5 $REMOTE;;
|
||||||
|
6)
|
||||||
|
test6 $REMOTE;;
|
||||||
*)
|
*)
|
||||||
echo "Error: Invalid test number"
|
echo "Error: Invalid test number"
|
||||||
die;;
|
die;;
|
||||||
|
Loading…
Reference in New Issue
Block a user