From: Adam Dickmeiss Date: Sun, 21 Feb 2010 11:02:58 +0000 (+0100) Subject: Performance tests - bash based X-Git-Tag: v1.4.0~127 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=79f0d945dbf4620860fde398a8fb22e2b7a1c150;p=pazpar2-moved-to-github.git Performance tests - bash based --- diff --git a/perf/bash/.gitignore b/perf/bash/.gitignore new file mode 100644 index 0000000..0da406c --- /dev/null +++ b/perf/bash/.gitignore @@ -0,0 +1,2 @@ +*.log +*.xml diff --git a/perf/bash/README b/perf/bash/README new file mode 100644 index 0000000..7433b58 --- /dev/null +++ b/perf/bash/README @@ -0,0 +1,17 @@ +# Script to test performance for local ztest's. + +client.sh - single session dong init, search, show +par.sh - parallel invocation of client.sh +get_session.xsl - get session from response + +Start in one session pazpar2: +cd etc +../src/pazpar2 -f perf.xml -X + +Start in one session yaz-ztest: +yaz-ztest + +Start the par.sh: +./par.sh + + diff --git a/perf/bash/client.sh b/perf/bash/client.sh new file mode 100755 index 0000000..6f9e076 --- /dev/null +++ b/perf/bash/client.sh @@ -0,0 +1,11 @@ +#!/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" diff --git a/perf/bash/get_session.xsl b/perf/bash/get_session.xsl new file mode 100644 index 0000000..e26eb76 --- /dev/null +++ b/perf/bash/get_session.xsl @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/perf/bash/par.sh b/perf/bash/par.sh new file mode 100755 index 0000000..d85b598 --- /dev/null +++ b/perf/bash/par.sh @@ -0,0 +1,9 @@ +#!/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 +done