#!/bin/bash -e

make

TARGET="$1"
COUNT=10

if [ "$TARGET" == "" ] ; then
   TARGET="localhost:9000"
fi

i=0
while [ $i -lt $COUNT ] ; do
   let i=$i+1
   ./netperfmeter $TARGET -vector=x$i.vec -scalar=x$i.sca \
      -tcp const80:const10000:const80:const10000 \
      -udp const10:const1400:const10:const1400 \
      -sctp const20:const10000:const20:const10000 const20:const10000:const20:const10000 \
      -dccp const80:const1400:const80:const1400 \
      -runtime=10 &
done
wait
