More tuning for bash-based perf test
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 12 Mar 2010 15:20:12 +0000 (16:20 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 12 Mar 2010 15:20:12 +0000 (16:20 +0100)
perf/bash/client.sh
perf/bash/par.sh

index a1072f3..06aa523 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-O=$1
-if test -z "$O"; then
-       O=1
+OF=$1
+if test -z "$OF"; then
+       OF=1
 fi
 H='http://localhost:9004/search.pz2'
-wget -q -O $O.init.xml "$H/?command=init&service=perf"
-S=`xsltproc get_session.xsl $O.init.xml`
-wget -q -O $O.search.xml "$H?command=search&query=utah&session=$S"
+wget -q -O $OF.init.xml "$H/?command=init&service=perf&extra=$OF"
+S=`xsltproc get_session.xsl $OF.init.xml`
+wget -q -O $OF.search.xml "$H?command=search&query=100&session=$S"
 sleep 0.5
-wget -q -O $O.show.xml "$H?command=show&session=$S"
+wget -q -O $OF.show.xml "$H?command=show&session=$S"
index d85b598..085e4fc 100755 (executable)
@@ -1,9 +1,17 @@
 #!/bin/bash
-DELAY=0.1
-NUMBER=10
-let i=0
-while test $i -lt $NUMBER; do
-       ./client.sh $i >$i.log 2>&1 &
-       sleep $DELAY
-       let i=$i+1
+DELAY=0.001
+NUMBER=40
+ROUNDS=5
+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
+       let r=$r+1
 done
+wait
+wget -O x 'http://localhost:9004/?command=exit'