DIRNAME=`dirname $0`
SCRIPTDIR=`cd "$DIRNAME" && pwd`
MEMTOTAL_BYTES=`free -b | grep Mem: | awk '{print $2}'`
NUM_CPU=$(grep -c '^processor' /proc/cpuinfo)

# MM Test Parameters
export MMTESTS="reaim"
export SKIP_WARMUP=yes

# Profiling parameters
export SKIP_NOPROFILE=no
export SKIP_FINEPROFILE=yes
export SKIP_COARSEPROFILE=yes
export OPROFILE_REPORT_ANNOTATE=no
export OPROFILE_REPORT_CALLGRAPH=

# Fixups
if [ "`which check-confidence.pl 2> /dev/null`" = "" ]; then
	export PATH=$SCRIPTDIR/bin:$PATH
fi
if [ "`which record-extfrag 2> /dev/null`" = "" ]; then
	export PATH=$SCRIPTDIR/fraganalysis:$PATH
fi
if [ "`which oprofile_report.sh 2> /dev/null`" = "" ]; then
	export PATH=$SCRIPTDIR/vmr/bin:$PATH
fi

# Machine configuration
# Swap configuration can be one of default, partitions, swapfile, NFS
#export VM_DIRTY_RATIO=20
export VM_TRANSPARENT_HUGEPAGES_DEFAULT=default
export SWAP_CONFIGURATION=default
export SWAP_PARTITIONS=
export SWAP_SWAPFILE_SIZEMB=$((MEMTOTAL_BYTES/1048576))
export SWAP_NFS_MOUNT=192.168.10.7:/exports/`hostname`-swapfile
export SWAP_NBD_DEVICE=/dev/nbd0
export SWAP_NBD_HOST=mcp
export SWAP_NBD_PORT=10001

# List of monitors
export RUN_MONITOR=yes
export MONITORS_ALWAYS=
export MONITORS_PLAIN=
export MONITORS_GZIP="proc-vmstat top slabinfo"
export MONITORS_WITH_LATENCY="vmstat iostat"
export MONITOR_UPDATE_FREQUENCY=10

# Re-aim
export REAIM_FILESIZE=10k
export REAIM_POOLSIZE=1m
export REAIM_STARTUSERS=1
export REAIM_INCREMENT=$((NUM_CPU/2))
export REAIM_ENDUSERS=$((NUM_CPU*2+REAIM_INCREMENT))
export REAIM_ITERATIONS=5
export REAIM_WORKFILE=workfile.compute
