svn L&P testing in 10 lines or less

I needed a quantifiable test that can measure svn performance during a check out. This script take 2 arguments, number of checkouts and parallelism. For example if I want to run 100 checkout 2 at a time ./ 100 2 or 100 checkouts 50 at a time ./ 100 50.

while [ $i -lt $1 ] ; do mkdir $i; let i=$i+1; done
DATE=`date +%m%d%y%H%M%S`;
find -type d ! -name . -maxdepth 1 2> /dev/null | sed "s/\.\///g" | xargs -I'{}' -P$2 time -o {}/time.dat svn co $url {}
find -iname time.dat -exec cat {} >> total_$1_$2_$DATE.dat \;
cat total_$1_$2_$DATE.dat | grep -v swaps | sed "s/user /\t/g" | sed "s/system /\t/g" | sed "s/elapsed.*//g" | sort -n > res_$1_$2_$DATE.csv

while [ $i -lt $1 ] ; do rm -rf $i; let i=$i+1; done


The results are recorded in a file with both test parameters and the date. A little bit of sed magic and you can create a csv which will make pretty graphs in excel or libre office calc. Enjoy.