diff --git a/notes.odt b/notes.odt index 75318e8..cf63801 100644 Binary files a/notes.odt and b/notes.odt differ diff --git a/performance_tests.sh b/performance_tests.sh index a15b203..fa2b256 100755 --- a/performance_tests.sh +++ b/performance_tests.sh @@ -91,7 +91,7 @@ test4(){ #WITHOUT CHANGING ANYTHING 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 cd $REPO_NAME run git fetch --progress origin &> /dev/null @@ -107,7 +107,7 @@ test5(){ 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:]]*") + bw5=$(grep -e "\->" merging_text| grep -o "[[:digit:].]* -> [[:digit:].]* [[:alpha:]]*") echo "memory usage in a classic fetching and merging : $mem5" echo "bandwidth usage : $bw5" cd ../$REMOTE @@ -116,7 +116,36 @@ test5(){ 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 case $option in @@ -140,6 +169,7 @@ if [ "$ALL_TESTS" = true ]; then test3 $REMOTE test4 $REMOTE test5 $REMOTE + test6 $REMOTE elif [ -n "$TEST_NUM" ]; then case $TEST_NUM in @@ -155,6 +185,8 @@ elif [ -n "$TEST_NUM" ]; then test4 $REMOTE;; 5) test5 $REMOTE;; + 6) + test6 $REMOTE;; *) echo "Error: Invalid test number" die;;