X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=perf%2Fbash%2Fpar.sh;h=0374b469066758f26dfda8fd1329c3edb7e276a5;hb=597e3dd2c4a931753a9e0cb65fa7e0fabcd903b5;hp=d85b598ce8f6071d3ca2393d86c279fefd07477f;hpb=79f0d945dbf4620860fde398a8fb22e2b7a1c150;p=pazpar2-moved-to-github.git diff --git a/perf/bash/par.sh b/perf/bash/par.sh index d85b598..0374b46 100755 --- a/perf/bash/par.sh +++ b/perf/bash/par.sh @@ -1,9 +1,22 @@ #!/bin/bash -DELAY=0.1 +DELAY=0.001 +WAIT=5 NUMBER=10 -let i=0 -while test $i -lt $NUMBER; do - ./client.sh $i >$i.log 2>&1 & - sleep $DELAY - let i=$i+1 +ROUNDS=5 +if test -n "$1"; then + . $1 +fi +let r=0 +while test $r -lt $ROUNDS; do + echo "$r" + let i=0 + while test $i -lt $NUMBER; do + ./client.sh $r.$i >$r.$i.log 2>&1 & + sleep $DELAY + let i=$i+1 + done + sleep $WAIT + let r=$r+1 done +wait +wget -O x 'http://localhost:9004/?command=exit'