premier test de fetch fini

This commit is contained in:
eleonore12345 2024-07-03 16:55:26 +02:00
parent 7b935f6e1e
commit 1e1926d5ea

View File

@ -94,21 +94,26 @@ test5(){
run echo 'TEST 5 : case of classic fetching and merging'
run git clone $1 &> /dev/null
cd $REPO_NAME
run git fetch -v origin &> fetching_text
run git merge -v &> merging_text
run git fetch --progress origin &> /dev/null
run git merge --progress origin &> /dev/null
mem5before=$(du . | tail -n1 | tr -cd [:digit:])
#modification of the remote repo
cd $REMOTE
run dd if=/dev/urandom of=sample5 bs=1M count=1 #adding a 1M file
run git add sample5
run git commit -m"fourth 1M sample created"
cd -
run git fetch -v origin &> fetching_text
run git merge -v &> merging_text
cd ../$REMOTE
run dd if=/dev/urandom of=sample5 bs=1M count=1 &> /dev/null #adding a 1M file
run git add sample5
run git commit --quiet -m"fourth 1M sample created"
cd ../../$REPO_NAME
run git fetch --progress origin &> fetching_text
run git merge --progress &> merging_text
mem5after=$(du . | tail -n1 | tr -cd [:digit:])
mem5=$(($mem5after-$mem5before))
bw5=$(grep -o "[[:digit:].]* bytes" merging_text| grep -o "[[:digit:].]* [[:alpha:]]*")
echo "memory usage in a classic fetching and merging : $mem5"
#echo "bandwidth usage : $bw5"
echo "bandwidth usage : $bw5"
cd ../$REMOTE
git reset --hard -q a99be63309fc4f4600210000583546d966d12d4f
cd ../..
rm -rf performance_testing
}
#test 6 : shallow exclude
@ -159,3 +164,4 @@ else
fi
#optimize in case all tests are run
#adapt in case of different units