X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=perf%2Fbash%2Fclient.sh;h=ecf2e6f847cbde7b41a94042b710748c60a79d06;hb=d75ded7b6e101dd169662a89497d16fce9aa1f53;hp=6f9e076749de44fa9a462f51acc27dcf0d2c39da;hpb=79f0d945dbf4620860fde398a8fb22e2b7a1c150;p=pazpar2-moved-to-github.git diff --git a/perf/bash/client.sh b/perf/bash/client.sh index 6f9e076..ecf2e6f 100755 --- a/perf/bash/client.sh +++ b/perf/bash/client.sh @@ -1,11 +1,25 @@ #!/bin/bash -O=$1 -if test -z "$O"; then - O=1 -fi -H='http://localhost:9004/search.pz2' -wget -q -O $O.init.xml "$H/?command=init" -S=`xsltproc get_session.xsl $O.init.xml` -wget -q -O $O.search.xml "$H?command=search&query=utah&session=$S" -sleep 0.5 -wget -q -O $O.show.xml "$H?command=show&session=$S" +OF=$1 +if test -z "$OF"; then + OF=1 +fi + +PORT=$2 +if test -z "$PORT"; then + PORT=9004 +fi +SERVICE=$3 +if test -z "$SERVICE"; then + SERVICE=perf +fi +SETTINGS=$4 +WHAT=water +H="http://localhost:${PORT}/search.pz2" +wget -q -O $OF.init.xml "$H/?command=init&service=${SERVICE}&extra=$OF" +S=`xsltproc get_session.xsl $OF.init.xml` +if [ "$SETTINGS" != "" ] ; then + wget -q -O $OF.settings.xml "$H?command=settings&session=$S&$SETTINGS" +fi +wget -q -O $OF.search.xml "$H?command=search&query=$WHAT&session=$S" +sleep 1 +wget -q -O $OF.show.xml "$H?command=show&session=$S&sort=relevance&start=0&num=100&block=1"