Files
i2p.i2p/tests/scripts/benchmark.sh

37 lines
634 B
Bash
Raw Normal View History

#!/bin/sh
CWD=$(dirname "$0")
if [ "x$JAVA" = 'x' ]
then
JAVA=java
fi
if [ "x$BENCHMARKS" = 'x' ]
then
2017-09-08 11:16:40 +00:00
BENCHMARKS="$CWD/i2p-benchmarks.jar"
stat "$BENCHMARKS" >/dev/null 2>&1
if [ "x$?" != 'x0' ]
then
2017-09-08 11:16:40 +00:00
BENCHMARKS="$CWD/../../core/java/build/i2p-benchmarks.jar"
fi
fi
if [ "x$JBIGI" = 'x' ]
then
JBIGI="$CWD/jbigi.jar"
stat "$JBIGI" >/dev/null 2>&1
if [ "x$?" != 'x0' ]
then
2017-09-08 11:16:40 +00:00
JBIGI="$CWD/../../build/jbigi.jar"
fi
fi
CLASSPATH="$BENCHMARKS"
if [ "x${1:-}" = 'x--jbigi' ]
then
CLASSPATH="$CLASSPATH:$JBIGI"
shift
fi
2017-09-08 11:16:40 +00:00
$JAVA -cp "$CLASSPATH" org.openjdk.jmh.Main "$@"