#!/bin/bash
# $1 heap size start
# $2 heap size max
# $3 msg count
. /etc/autobench.conf || . functions

pushd $AUTODIR/sources/volanomark
echo "Running with start heap = $1 max heap = $2 msg_count = $3" > run.log
#hack for broken Redhat NPTL
export LD_ASSUME_KERNEL=2.4
start_profile
start_sar

./server.sh $1 $2 &
./client.sh $1 $2 $3

stop_sar
stop_profile
killall server.sh
killall java
mv *.log $LOGDIR/benchmark
popd
