Skip to content

Commit

Permalink
Add quotes for install_and_test to java benchmarks
Browse files Browse the repository at this point in the history
Signed-off-by: acarbonetto <[email protected]>
  • Loading branch information
acarbonetto committed Nov 8, 2023
1 parent 76d3e9f commit 05c40cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions benchmarks/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ chosenClients="all"
host="localhost"
port=6379
tlsFlag="--tls"
javaTlsFlag="--tls"
javaTlsFlag="-tls"

function runPythonBenchmark(){
# generate protobuf files
Expand Down Expand Up @@ -73,8 +73,8 @@ function runCSharpBenchmark(){

function runJavaBenchmark(){
cd ${BENCH_FOLDER}/../java
echo "./gradlew run --args=\"-resultsFile ${BENCH_FOLDER}/$1 -dataSize $2 -concurrentTasks $concurrentTasks -clientCount $clientCount -clients $chosenClients -host $host $javaPortFlag $javaTlsFlag $javaClusterFlag\""
./gradlew run --args="-resultsFile \"${BENCH_FOLDER}/$1\" -dataSize $2 -concurrentTasks $concurrentTasks -clients $chosenClients -host $host $javaPortFlag -clientCount $clientCount $javaTlsFlag $javaClusterFlag"
echo "./gradlew run --args=\"-resultsFile ${BENCH_FOLDER}/$1 -dataSize \"$2\" -concurrentTasks \"$concurrentTasks\" -clientCount \"$clientCount\" -clients $chosenClients -host $host $javaPortFlag $javaTlsFlag $javaClusterFlag\""
./gradlew run --args="-resultsFile \"${BENCH_FOLDER}/$1\" -dataSize \"$2\" -concurrentTasks \"$concurrentTasks\" -clients \"$chosenClients\" -host $host $javaPortFlag -clientCount \"$clientCount\" $javaTlsFlag $javaClusterFlag"
cd ${BENCH_FOLDER}/java
}

Expand Down Expand Up @@ -234,7 +234,7 @@ do
;;
-is-cluster)
clusterFlag="--clusterModeEnabled"
javaClusterFlag="--clusterModeEnabled"
javaClusterFlag="-clusterModeEnabled"
;;
-port)
portFlag="--port "$2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private static int[] parseIntListOption(String line) throws ParseException {
lineValue = lineValue.substring(1, lineValue.length() - 1);
}
// check if it's the correct format
if (!lineValue.matches("\\d+(\\s+\\d+)?")) {
if (!lineValue.matches("\\d+(\\s+\\d+)*")) {
throw new ParseException("Invalid option: " + line);
}
// split the string into a list of integers
Expand Down

0 comments on commit 05c40cf

Please sign in to comment.