b01a265722b9a2c4cc95f5518d8864f1cf982c92
[pazpar2-moved-to-github.git] / perf / bash / par.sh
1 #!/bin/bash
2 DELAY=0.001
3 WAIT=5
4 NUMBER=40
5 ROUNDS=5
6 if test -n "$1"; then
7         . $1
8 fi
9 let r=0
10 while test $r -lt $ROUNDS; do
11         echo "$r"
12         let i=0
13         while test $i -lt $NUMBER; do
14                 ./client.sh $r.$i >$r.$i.log 2>&1 &
15                 sleep $DELAY
16                 let i=$i+1
17         done
18         sleep $WAIT
19         let r=$r+1
20 done
21 wait
22 wget -O x 'http://localhost:9004/?command=exit'