#!/bin/sh

echo "start gitweb test (pid=$$, fork=$1, count=$2)"

for ((a=0; $a<$1; a=$a+1))
do
  ./gitweb.sh 0 $(($2*2)) &
done


for ((a=0; $a<$2; a=$a+1))
do
  curl -s -S "http://box1/cgi-bin/gitweb.cgi?p=cgit;a=shortlog" > /dev/null
  curl -s -S "http://box1/cgi-bin/gitweb.cgi?p=git;a=shortlog" > /dev/null
  curl -s -S "http://box1/cgi-bin/gitweb.cgi?p=linux-2.6.19;a=shortlog" > /dev/null
done

echo "test done (pid=$$)"
