Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: Fix benchmarkApp to support port #2170

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,21 @@ For more examples, you can refer to the test folder [unit tests](./client/src/te

You can run benchmarks using `./gradlew run`. You can set arguments using the args flag like:

Returns the command help output
```shell
./gradlew run --args="--help"
```

Runs all benchmark clients against a local instance with TLS enabled using data sizing 100 and 1000 bytes, 10 and 100 concurrent tasks, 1 and 5 parallel clients.
```shell
./gradlew run --args="--resultsFile=output --dataSize \"100 1000\" --concurrentTasks \"10 100\" --clients all --host localhost --port 6279 --clientCount \"1 5\" --tls"
```

Runs GLIDE client against a local cluster instance on port 52756 using data sizing 4000 bytes, and 1000 concurrent tasks.
```shell
./gradlew run --args="--resultsFile=output --dataSize \"4000\" --concurrentTasks \"1000\" --clients glide --host 127.0.0.1 --port 52746 --clusterModeEnabled"
```

The following arguments are accepted:
* `resultsFile`: the results output file
* `concurrentTasks`: number of concurrent tasks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ private static RunConfiguration verifyOptions(CommandLine line) throws ParseExce
runConfiguration.host = line.getOptionValue("host");
}

if (line.hasOption("port")) {
runConfiguration.port = Integer.parseInt(line.getOptionValue("port"));
}

if (line.hasOption("clientCount")) {
runConfiguration.clientCount = parseIntListOption(line.getOptionValue("clientCount"));
}
Expand Down
Loading