From 1e1926d5eabcc748e54733cf338d1122e997683f Mon Sep 17 00:00:00 2001 From: eleonore12345 Date: Wed, 3 Jul 2024 16:55:26 +0200 Subject: [PATCH] premier test de fetch fini --- performance_tests.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/performance_tests.sh b/performance_tests.sh index 9663a00..a15b203 100755 --- a/performance_tests.sh +++ b/performance_tests.sh @@ -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 \ No newline at end of file