Move benchmarks into core

This commit is contained in:
str4d
2017-09-08 11:16:40 +00:00
parent 7346ce1c89
commit 3d24cc9e92
7 changed files with 66 additions and 112 deletions

36
tests/scripts/benchmark.sh Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
CWD=$(dirname "$0")
if [ "x$JAVA" = 'x' ]
then
JAVA=java
fi
if [ "x$BENCHMARKS" = 'x' ]
then
BENCHMARKS="$CWD/i2p-benchmarks.jar"
stat "$BENCHMARKS" >/dev/null 2>&1
if [ "x$?" != 'x0' ]
then
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
JBIGI="$CWD/../../build/jbigi.jar"
fi
fi
CLASSPATH="$BENCHMARKS"
if [ "x${1:-}" = 'x--jbigi' ]
then
CLASSPATH="$CLASSPATH:$JBIGI"
shift
fi
$JAVA -cp "$CLASSPATH" org.openjdk.jmh.Main "$@"