Fix: use pp2client.sh
[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 while test $r -lt $ROUNDS; do
15         echo "$r"
16         let i=0
17         while test $i -lt $NUMBER; do
18                 ./pp2client.sh --outfile=$r.$i --prefix=http://$HOST:${PORT}/search.pz2 --service=$SERVICE >$r.$i.log 2>&1 &
19                 sleep $DELAY
20                 let i=$i+1
21         done
22         sleep $WAIT
23         let r=$r+1
24 done
25 wait
26 if [ "$SHUTDOWN" == "1" ] ; then 
27     wget -O x "http://localhost:${PORT}/search.pz2?command=exit"
28 fi