From 0f9ddfba47dd3ffb94248b892c8bceeb7d9acb59 Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Tue, 20 Aug 2024 09:06:46 -0700 Subject: [PATCH 1/2] Java: Add port and examples for benchmark app Signed-off-by: Andrew Carbonetto --- java/README.md | 10 ++++++++ java/benchmarks/output | 25 +++++++++++++++++++ .../glide/benchmarks/BenchmarkingApp.java | 4 +++ 3 files changed, 39 insertions(+) create mode 100644 java/benchmarks/output diff --git a/java/README.md b/java/README.md index 3c1a8cbe1d..9b14dab87d 100644 --- a/java/README.md +++ b/java/README.md @@ -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 diff --git a/java/benchmarks/output b/java/benchmarks/output new file mode 100644 index 0000000000..8b498dd94b --- /dev/null +++ b/java/benchmarks/output @@ -0,0 +1,25 @@ +[ + { + "client": "lettuce", + "client_count": 1, + "data_size": 100, + "is_cluster": true, + "num_of_tasks": 1, + "get_existing_average_latency": 0.78, + "get_existing_p50_latency": 0.206, + "get_existing_p90_latency": 0.631, + "get_existing_p99_latency": 14.764, + "get_existing_std_dev": 2.95, + "get_non_existing_average_latency": 0.747, + "get_non_existing_p50_latency": 0.206, + "get_non_existing_p90_latency": 0.626, + "get_non_existing_p99_latency": 14.671, + "get_non_existing_std_dev": 2.794, + "set_average_latency": 0.794, + "set_p50_latency": 0.215, + "set_p90_latency": 0.701, + "set_p99_latency": 14.597, + "set_std_dev": 2.801, + "tps": 1282.0 + } +] \ No newline at end of file diff --git a/java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java b/java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java index 31ab7bbd13..7f7f2de254 100644 --- a/java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java @@ -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")); } From a8e06bec56947a4ae2b0b42ff7743316edd54832 Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Tue, 20 Aug 2024 09:08:06 -0700 Subject: [PATCH 2/2] Remove output files Signed-off-by: Andrew Carbonetto --- java/benchmarks/output | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 java/benchmarks/output diff --git a/java/benchmarks/output b/java/benchmarks/output deleted file mode 100644 index 8b498dd94b..0000000000 --- a/java/benchmarks/output +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "client": "lettuce", - "client_count": 1, - "data_size": 100, - "is_cluster": true, - "num_of_tasks": 1, - "get_existing_average_latency": 0.78, - "get_existing_p50_latency": 0.206, - "get_existing_p90_latency": 0.631, - "get_existing_p99_latency": 14.764, - "get_existing_std_dev": 2.95, - "get_non_existing_average_latency": 0.747, - "get_non_existing_p50_latency": 0.206, - "get_non_existing_p90_latency": 0.626, - "get_non_existing_p99_latency": 14.671, - "get_non_existing_std_dev": 2.794, - "set_average_latency": 0.794, - "set_p50_latency": 0.215, - "set_p90_latency": 0.701, - "set_p99_latency": 14.597, - "set_std_dev": 2.801, - "tps": 1282.0 - } -] \ No newline at end of file