Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 104 lines (79 sloc) 1.87 KB
#!/bin/bash
. ./init
usage="$(basename $0) (tdb|quack|quack2) label"
if [ $# = 0 ]
then
set "tdb"
fi
if [ $# != 2 -a $# != 1 ]
then
echo "$usage" 1>&2
exit 1
fi
ABASE="$1"
case "$ABASE" in
tdb|quack|quack2) ;;
*)
echo "$usage" 1>&2
echo " Run type not recognized: $ABASE" 1>&2
exit 1
esac
LABEL="${2:-BSBM}"
[ -d "$JENADB" ] || { echo "Not a directory: $JENADB" ; exit 1 ; }
DIRS="${SIZES:-50k 250k 1m 5m 25m 100m 200m}"
echo "Directories: $DIRS"
# TestDriver args
# -seed 808080
# Need more runs
## ARGS="-runs 1 -w 0"
ARGS="${ARGS:--runs 25 -w 50}"
## ARGS="-runs 1 -w 0 -ucf usecases/businessIntelligence/sparql.txt"
# TDB logging.
## ????TDB_ARGS="-Dtdb:logExec=true"
PROGRAM=benchmark.testdriver.TestDriver
## ----
## ABASE="quack"
## ABASE="tdb"
## ABASE="quack2"
echo "Test set: $ABASE"
genKey() {
local K="$1"
local i=1
while [ -e "$K-$i.html" ]
do
i=$((i+1))
done
echo "$K-$i.html"
}
## rm -rf Results
## mkdir Results
JVM_ARGS="-Xmx2000M -server"
rm -f Results/*.xml
echo "Run with $ARGS"
for d in $DIRS
do
SET="$DATADIR/data-$d"
DB="$JENADB/DB-$d"
if [ ! -e "$DB/Store" ]
then
echo "No database for $DB/Store"
continue
fi
echo "==== Performance run for $d"
echo "== Start: $(date +"%Y-%m-%d %H:%M:%S")"
java -cp "$CLASSPATH" $JVM_ARGS \
-Dlog4j.configuration=file:log4j.properties \
$PROGRAM \
$ARGS -idir "$SET" -o "Results/res-$d.xml" \
"jena:$DB/assembler-${ABASE}.ttl"
#"http://localhost:3030/ds/sparql"
echo "== Finish: $(date +"%Y-%m-%d %H:%M:%S")"
done
F=$(genKey "Reports/results")
runResults \
--label="$LABEL" \
--label="$ARGS" \
--label="Engine: $ABASE" \
--label="Run: $(date --iso-8601=seconds)" \
Results/res*xml > $F
rm -f Results/res*xml