X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=perf%2Fbash%2Fpar_fixed_clients.sh;h=a885aae81250578bd1d16836244e5aca2b767a5b;hb=8f8357dcdb83ee79a40da189387140ea90d2869c;hp=7dc8779dd299a6de47c583559e5726c2ff900b25;hpb=e72d48d1064abc3e3c304ebbf2492570a46d48ce;p=pazpar2-moved-to-github.git diff --git a/perf/bash/par_fixed_clients.sh b/perf/bash/par_fixed_clients.sh index 7dc8779..a885aae 100755 --- a/perf/bash/par_fixed_clients.sh +++ b/perf/bash/par_fixed_clients.sh @@ -1,18 +1,25 @@ #!/bin/bash +NUMBER=$1 +if [ -z "$NUMBER" ] ; then + NUMBER=20 +fi + DELAY=0.001 WAIT=1 -NUMBER=100 -ROUNDS=5 +#NUMBER=100 +ROUNDS=2 let r=0 +PORT=9005 +CLIENT_SCRIPT="client_timed.sh" while test $r -lt $ROUNDS; do echo "$r" i=0 while test $i -lt $NUMBER; do - ./client.sh $r.$i >$r.$i.log 2>&1 & - CLIENTS=`ps -ef |grep -c client.sh` + ./${CLIENT_SCRIPT} $r.$i $PORT >$r.$i.log 2>&1 & + CLIENTS=`ps -ef |grep -c ${CLIENT_SCRIPT}` while test $CLIENTS -ge $NUMBER ; do sleep $WAIT - CLIENTS=`ps -ef |grep -c client.sh` + CLIENTS=`ps -ef |grep -c ${CLIENT_SCRIPT}` echo "Active $CLIENTS" done let i=$i+1 @@ -20,4 +27,6 @@ while test $r -lt $ROUNDS; do let r=$r+1 done wait -wget -O x 'http://localhost:8010/?command=exit' +cat *.time > timed.$NUMBER.log +#wget --tries=1 -O x "http://localhost:${PORT}/?command=exit" +sleep 5 \ No newline at end of file