From 7a072e5ff8ce755a8bd76f16e774f8a2e14f2529 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 17 Mar 2010 13:52:53 +0100 Subject: [PATCH] new timed client script --- perf/bash/client_timed.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 perf/bash/client_timed.sh diff --git a/perf/bash/client_timed.sh b/perf/bash/client_timed.sh new file mode 100755 index 0000000..7757947 --- /dev/null +++ b/perf/bash/client_timed.sh @@ -0,0 +1,29 @@ +#!/bin/bash +OF=$1 +if test -z "$OF"; then + OF=1 +fi + +PORT=$2 +if test -z "$PORT"; then + PORT=9004 +fi + +QUERY=100 +SERVICE=perf_t + +H="http://localhost:${PORT}/search.pz2" + +/usr/bin/time --format "$OF, init, %e" wget -q -O $OF.init.xml "$H/?command=init&service=${SERVICE}&extra=$OF" 2> $OF.init.time +S=`xsltproc get_session.xsl $OF.init.xml` +/usr/bin/time --format "$OF, search, %e" wget -q -O $OF.search.xml "$H?command=search&query=${QUERY}&session=$S" 2> $OF.search.time +sleep 1 +# First show +/usr/bin/time --format "$OF, show, %e" wget -q -O $OF.show.xml "$H?command=show&session=$S" 2> $OF.show.time +AC=`xsltproc get_activeclients.xsl ${OF}.show.xml` +echo "Active clients: $AC " +if [ "${AC}" != "0" ] ; then + echo "Active clients: ${AC}" + /usr/bin/time --format "$OF, show2, %e" wget -q -O $OF.show.xml "$H?command=show&session=$S" 2>> $OF.show.time + AC=`xsltproc get_session.xsl $OF.show.xml` +fi -- 1.7.10.4