|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +#!/bin/bash |
| 18 | +set -x |
| 19 | +if [ "$#" -ne 2 ];then |
| 20 | + echo "Usage: sh run-benchmark.sh path/to/JDKwithoutAESNIsupport path/to/JDKwithAESNIsupport \n JDK7u45 or higher supports AES-NI." |
| 21 | + exit 1 |
| 22 | +fi |
| 23 | +echo "This benchmark will evaluate the performance of Chimera in different transfomations, ciphers and JDK versions" |
| 24 | + |
| 25 | +if [ ! -f "conf/benchmark.properties" ];then |
| 26 | + echo "Not able to find the benchmark.propety, will use default propety instead" |
| 27 | + cp conf/benchmark.properties.template conf/benchmark.properties |
| 28 | +fi |
| 29 | + |
| 30 | +CRYPTO_JAR=`find . -name commons-crypto*.jar` |
| 31 | + |
| 32 | +echo "Using JDK in path $1 to evalue the performance" |
| 33 | +$1/bin/java -Djava.library.path="$PATH" -cp $CRYPTO_JAR:target/test-classes org.apache.commons.crypto.benchmark.CommonsCryptoBenchmark conf/benchmark.properties |
| 34 | +echo "Using JDK in path $2 to evaluate the performance" |
| 35 | +$2/bin/java -Djava.library.path="$PATH" -cp $CRYPTO_JAR:target/test-classes org.apache.commons.crypto.benchmark.CommonsCryptoBenchmark conf/benchmark.properties |
0 commit comments