Updates to pz:authentication documentation
[pazpar2-moved-to-github.git] / perf / bash / par.sh
1 #!/bin/bash
2 DELAY=0.001
3 WAIT=5
4 NUMBER=5
5 ROUNDS=5
6 PORT=9004
7 SERVICE=perf_t
8 SHUTDOWN=1
9 HOST=127.0.0.1
10 if test -n "$1"; then
11         . $1
12 fi
13 let r=0
14 if [ "$SETTINGS" != "" ] ; then 
15     SETTINGS_OPT="--settings=\"$SETTINGS\" " 
16     echo $SETTINGS_OPT
17 else
18     unset SETTINGS_OPT
19 fi
20
21 while test $r -lt $ROUNDS; do
22         echo "$r"
23         let i=0
24         while test $i -lt $NUMBER; do
25             ./pp2client.sh --outfile=$r.$i --prefix=http://$HOST:${PORT}/search.pz2 --service=$SERVICE $SETTINGS_OPT >$r.$i.log 2>&1 &
26             sleep $DELAY
27             let i=$i+1
28         done
29         sleep $WAIT
30         let r=$r+1
31 done
32 wait
33 if [ "$SHUTDOWN" == "1" ] ; then 
34     wget -O x "http://localhost:${PORT}/search.pz2?command=exit"
35 fi