#!/bin/bash

export CLASSPATH=$CLASSPATH:../../../../../build
begintime=`date`
if [[ "$1" = "test1" ]]; then
    java com.mongodb.framework.Test1
#elif [[ "$1" = "count1" ]]; then
#    java com.mongodb.framework.Count1 > $2
elif [[ "$1" = "find" ]]; then
    java com.mongodb.framework.Find
elif [[ "$1" = "find1" ]]; then
    java com.mongodb.framework.Find1 > $2
elif [[ "$1" = "remove" ]]; then
    java com.mongodb.framework.Remove
elif [[ "$1" = "capped" ]]; then
    java com.mongodb.framework.Capped
#elif [[ "$1" = "circular" ]]; then
#    java com.mongodb.framework.Circular
elif [[ "$1" = "dbs" ]]; then
    java com.mongodb.framework.Dbs > $2
elif [[ "$1" = "stress1" ]]; then
    java com.mongodb.framework.Stress1
#elif [[ "$1" = "admin" ]]; then
#    java com.mongodb.framework.Admin > $2
else
    exit 0
fi
exitval=$?
endtime=`date`

echo "begintime:$begintime" >> $2
echo "endtime:$endtime" >> $2
echo "exit_code:$exitval" >> $2

