diff --git a/creation_repo.sh b/creation_repo.sh index 8fbd66a..5c1c012 100755 --- a/creation_repo.sh +++ b/creation_repo.sh @@ -8,9 +8,12 @@ cd performance_testing git init git branch -m main git remote add origin $1 +git fetch origin +git merge dd if=/dev/urandom of=sample0 bs=1M count=1 git add . git commit -m"first 1M sample created" + git push -u origin main git tag start dd if=/dev/urandom of=sample1 bs=1M count=1 @@ -22,7 +25,7 @@ git checkout secondary dd if=/dev/urandom of=sample2 bs=500K count=1 git add sample2 git commit -m"first 500K sample created in branch secondary" -git push +git push -u origin secondary git checkout main dd if=/dev/urandom of=sample3 bs=1M count=1 git add sample3 diff --git a/performance_tests.sh b/performance_tests.sh index 95cae5a..b43fb84 100755 --- a/performance_tests.sh +++ b/performance_tests.sh @@ -1,3 +1,15 @@ #!/bin/bash . driglibash-args -run ./creation_repo.sh $1 \ No newline at end of file +#prerequisite: creation_repo.sh has been run +#remove the local copy +rm -rf performance_testing + +section TEST0 +echo "TEST 0 : case of classic cloning." +git clone $1 +: ' +mem0=$(du ./performance_testing | tail -n1 | tr -cd [:digit:]) +bw0=$(grep -e "Receiving objects:" cloning_text| grep -o "[[:digit:].]* MiB ") +echo "memory usage in a classic cloning : $mem0" +echo "bandwidth usage : $bw0" +' \ No newline at end of file