source: tests/scripts/benchmark.sh @ 3d24cc9

Last change on this file since 3d24cc9 was 3d24cc9, checked in by str4d <str4d@…>, 3 years ago

Move benchmarks into core

  • Property mode set to 100755
File size: 634 bytes
Line 
1#!/bin/sh
2
3CWD=$(dirname "$0")
4if [ "x$JAVA" = 'x' ]
5then
6    JAVA=java
7fi
8
9if [ "x$BENCHMARKS" = 'x' ]
10then
11    BENCHMARKS="$CWD/i2p-benchmarks.jar"
12    stat "$BENCHMARKS" >/dev/null 2>&1
13    if [ "x$?" != 'x0' ]
14    then
15        BENCHMARKS="$CWD/../../core/java/build/i2p-benchmarks.jar"
16    fi
17fi
18
19if [ "x$JBIGI" = 'x' ]
20then
21    JBIGI="$CWD/jbigi.jar"
22    stat "$JBIGI" >/dev/null 2>&1
23    if [ "x$?" != 'x0' ]
24    then
25        JBIGI="$CWD/../../build/jbigi.jar"
26    fi
27fi
28
29CLASSPATH="$BENCHMARKS"
30if [ "x${1:-}" = 'x--jbigi' ]
31then
32    CLASSPATH="$CLASSPATH:$JBIGI"
33    shift
34fi
35
36$JAVA -cp "$CLASSPATH" org.openjdk.jmh.Main "$@"
Note: See TracBrowser for help on using the repository browser.