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 ./load.sh 100 2 or 100 checkouts 50 at a time ./load.sh 100 50

#!/bin/bash

i=0; 

url="<a href="http://mysvnrepo"

while">http://mysvnrepo"

while</a> [ $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

i=0;

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 Microsoft Excel or LibreOffice Calc. Enjoy.

Leave a comment

Your email address will not be published. Required fields are marked *

X