From 098b558355b375d17f6fff413b836b2ae8438e65 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 12 Mar 2010 16:20:12 +0100 Subject: [PATCH] More tuning for bash-based perf test --- perf/bash/client.sh | 14 +++++++------- perf/bash/par.sh | 22 +++++++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/perf/bash/client.sh b/perf/bash/client.sh index a1072f3..06aa523 100755 --- a/perf/bash/client.sh +++ b/perf/bash/client.sh @@ -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" diff --git a/perf/bash/par.sh b/perf/bash/par.sh index d85b598..085e4fc 100755 --- a/perf/bash/par.sh +++ b/perf/bash/par.sh @@ -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' -- 1.7.10.4