Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b50d57e
Author: Yury-Fridlyand <[email protected]>
Date:   Tue Nov 21 18:16:20 2023 -0800

    Java client jni netty (#32)

    * Add Java-client benchmarking app

    Signed-off-by: acarbonetto <[email protected]>

    * spotless apply

    Signed-off-by: acarbonetto <[email protected]>

    * Update on command line options

    Signed-off-by: acarbonetto <[email protected]>

    * Update README

    Signed-off-by: acarbonetto <[email protected]>

    * Spotless apply:

    Signed-off-by: acarbonetto <[email protected]>

    * Update README example

    Signed-off-by: acarbonetto <[email protected]>

    * update commandline defaults for review comments

    Signed-off-by: acarbonetto <[email protected]>

    * Remove TLS flag argument from option

    Signed-off-by: acarbonetto <[email protected]>

    * Add lettuce clients for benchmarking

    Signed-off-by: acarbonetto <[email protected]>

    * Spotless apply

    Signed-off-by: acarbonetto <[email protected]>

    * Add Jedis clients

    Signed-off-by: acarbonetto <[email protected]>

    * Add to app

    Signed-off-by: acarbonetto <[email protected]>

    * Add for-loop for data size list

    Signed-off-by: acarbonetto <[email protected]>

    * Add TPS for all async items

    Signed-off-by: acarbonetto <[email protected]>

    * spotless apply

    Signed-off-by: acarbonetto <[email protected]>

    * Fix TPS calculations

    Signed-off-by: acarbonetto <[email protected]>

    * Accept TLS as a flag

    Signed-off-by: acarbonetto <[email protected]>

    * Start threads; then wait for results

    Signed-off-by: acarbonetto <[email protected]>

    * Add java-jni client

    Signed-off-by: acarbonetto <[email protected]>

    * Handle Exceptions from client; add JniSyncClient fixes

    Signed-off-by: acarbonetto <[email protected]>

    * Clean up latency and add error checking

    Signed-off-by: acarbonetto <[email protected]>

    * Minor fixes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Fix result printing.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Add TPS.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Remove duplicates. Reorganize and fix imports.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Int ctor fix.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Iteration 1.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Iteration 2: connected!

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Iteration 3: `get` and `set`.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Iteration 4: benchmark.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Iteration 5: some fixes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Change number of threads in Benchmarking threadpool

    * Revert "Change number of threads in Benchmarking threadpool"

    This reverts commit e3f7596.

    * Add more flushing rules and UT.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Client clean up.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Client optimizations. (#37)

    * Client optimizations.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * minor cleanup.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Optimize building a command.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Typo fix.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Minor rename.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Clean up Redis close connection

    Signed-off-by: Andrew Carbonetto <[email protected]>

    * Clean up Redis close connection

    Signed-off-by: Andrew Carbonetto <[email protected]>

    * Minor changes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Add todos to closeConnection()

    Signed-off-by: Andrew Carbonetto <[email protected]>

    ---------

    Signed-off-by: Yury-Fridlyand <[email protected]>
    Signed-off-by: Andrew Carbonetto <[email protected]>
    Co-authored-by: Andrew Carbonetto <[email protected]>

    * Address PR feedback.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Rename

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Rename2

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Fix CI

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * More fixes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Some changes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * add null check

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * autoflush

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Apply suggestions from code review

    Signed-off-by: Yury-Fridlyand <[email protected]>

    Co-authored-by: Andrew Carbonetto <[email protected]>

    * minor changes

    Signed-off-by: Yury-Fridlyand <[email protected]>

    ---------

    Signed-off-by: acarbonetto <[email protected]>
    Signed-off-by: Yury-Fridlyand <[email protected]>
    Signed-off-by: Andrew Carbonetto <[email protected]>
    Co-authored-by: acarbonetto <[email protected]>
    Co-authored-by: Jonathan Louie <[email protected]>

commit bcf188c
Author: acarbonetto <[email protected]>
Date:   Tue Nov 14 14:54:36 2023 -0800

    Clean up timer

    Signed-off-by: acarbonetto <[email protected]>

commit 05590b0
Author: Andrew Carbonetto <[email protected]>
Date:   Tue Nov 14 11:41:51 2023 -0800

    Java benchmarks clusters (#34)

    * Add lettuce cluster client when cluster mode enabled

    ---------

    Signed-off-by: Andrew Carbonetto <[email protected]>

commit 30f2f62
Merge: a62fe92 8a0449d
Author: acarbonetto <[email protected]>
Date:   Mon Nov 6 14:50:51 2023 -0800

    Merge branch 'main' into java_benchmarks

commit a62fe92
Author: acarbonetto <[email protected]>
Date:   Mon Nov 6 14:50:18 2023 -0800

    fix java install_and_test script variables

    Signed-off-by: acarbonetto <[email protected]>

commit b00a205
Merge: 9cbc9c2 d533b7f
Author: Yury-Fridlyand <[email protected]>
Date:   Wed Oct 25 11:16:12 2023 -0700

    Merge branch 'java_benchmarks' of github.com:Bit-Quill/babushka into java_benchmarks

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit 9cbc9c2
Author: Yury-Fridlyand <[email protected]>
Date:   Wed Oct 25 11:15:46 2023 -0700

    Typo fix.

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit d533b7f
Author: Yury-Fridlyand <[email protected]>
Date:   Tue Oct 24 17:16:12 2023 -0700

    Typo fix.

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit fe9bb98
Merge: c3d235a 231a229
Author: Yury-Fridlyand <[email protected]>
Date:   Tue Oct 24 17:13:19 2023 -0700

    Merge remote-tracking branch 'upstream/main' into java_benchmarks

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit c3d235a
Author: Yury-Fridlyand <[email protected]>
Date:   Fri Oct 20 10:06:23 2023 -0700

    Add json reporting. (#10)

    * Add JSON reporting.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Fix for #26.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Update java/benchmarks/src/main/java/javababushka/benchmarks/utils/Benchmarking.java

    Signed-off-by: Yury-Fridlyand <[email protected]>

    Co-authored-by: Andrew Carbonetto <[email protected]>

    * Use `Optional`.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Address PR feedback.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    ---------

    Signed-off-by: Yury-Fridlyand <[email protected]>
    Co-authored-by: Andrew Carbonetto <[email protected]>

commit 8a0449d
Author: SanHalacogluImproving <[email protected]>
Date:   Wed Oct 18 15:18:08 2023 -0700

    Convert client count to snake case for rust benchmark. (#27)

    * Updated ClientCount to client_count for uniformity for rust.

commit 65090b4
Author: SanHalacogluImproving <[email protected]>
Date:   Tue Oct 17 09:50:38 2023 -0700

    Updated ClientCount to client_count for uniformity.

commit 540f49a
Author: Andrew Carbonetto <[email protected]>
Date:   Fri Oct 6 15:52:19 2023 -0700

    Create clients only once per iteration (#19)

    Signed-off-by: acarbonetto <[email protected]>

commit d99d27a
Author: acarbonetto <[email protected]>
Date:   Fri Oct 6 14:08:29 2023 -0700

    Update redis-rs to match main branch

    Signed-off-by: acarbonetto <[email protected]>

commit 1bab56a
Author: Yury-Fridlyand <[email protected]>
Date:   Thu Oct 5 14:01:59 2023 -0700

    Add option to run tests on multiple clients in concurrency (#16)

    * Add option to run tests on multiple clients in concurrency

    * Common pool of iterations.
    * Awaiting result from async methods.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * minor fix

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Change while-loop; Spotless Apply

    Signed-off-by: acarbonetto <[email protected]>

    ---------

    Signed-off-by: Yury-Fridlyand <[email protected]>
    Signed-off-by: acarbonetto <[email protected]>
    Co-authored-by: acarbonetto <[email protected]>

commit b15f93e
Author: Yury-Fridlyand <[email protected]>
Date:   Wed Sep 27 10:02:38 2023 -0700

    Add missing renames. (#17)

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit 8664d05
Author: Andrew Carbonetto <[email protected]>
Date:   Tue Sep 26 15:27:11 2023 -0700

    Rename jabushka to javababushka (#14)

    Signed-off-by: acarbonetto <[email protected]>

commit e57c1ff
Author: Yury-Fridlyand <[email protected]>
Date:   Mon Sep 25 17:25:41 2023 -0700

    Add dataSize option to java benchmark. (#11)

    * Add Jedis and Lettuce benchmarks

    * Start ignoring .gradle files

    * Update gitignore and remove generated files from git

    Signed-off-by: acarbonetto <[email protected]>

    * Update gitignore and remove generated files from git

    Signed-off-by: acarbonetto <[email protected]>

    * Update gitignore and remove generated files from git

    Signed-off-by: acarbonetto <[email protected]>

    * Add benchmarks for GET non-existing

    * Revert "Update gitignore and remove generated files from git"

    This reverts commit d9b26a6.

    * fix redis-rs submodules

    Signed-off-by: acarbonetto <[email protected]>

    * Randomize commands in Java benchmarks

    * rename chooseAction to randomAction

    * Add a Java benchmarking app (#7)

    * Add a java app to run benchmarks

    ---------

    Signed-off-by: acarbonetto <[email protected]>

    * Add Readme and update install_and_test script to runJava

    Signed-off-by: acarbonetto <[email protected]>

    * Add Readme and update install_and_test script to runJava

    Signed-off-by: acarbonetto <[email protected]>

    * Combine java pipeline and java benchmarks (#8)

    * Merge Pull Request #5 - Add java pipeline.

    Also changed:
    * Merged two projects.
    * Updated CI.
    * Fixed tests and updated `junit` version.
    * Spotless.
    * Add new gradle tasks.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Add sync and async clients both to tests. (#12)

    * Add sync and async clients both to tests.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Minor fixes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    ---------

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Add dataSize option to java benchmark.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    ---------

    Signed-off-by: acarbonetto <[email protected]>
    Signed-off-by: Yury-Fridlyand <[email protected]>
    Co-authored-by: Jonathan Louie <[email protected]>
    Co-authored-by: acarbonetto <[email protected]>
    Co-authored-by: jonathanl-bq <[email protected]>

commit 016f5f6
Author: acarbonetto <[email protected]>
Date:   Mon Sep 25 15:10:47 2023 -0700

    Move duplicated logic in benchmark JS scripts to a single file, and convert to TypeScript. (valkey-io#456)

    removed duplicated logic and refactored to typescript

    Signed-off-by: acarbonetto <[email protected]>

commit 436da8f
Author: Yury-Fridlyand <[email protected]>
Date:   Mon Sep 25 13:58:01 2023 -0700

    Add sync and async clients both to tests. (#12)

    * Add sync and async clients both to tests.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    * Minor fixes.

    Signed-off-by: Yury-Fridlyand <[email protected]>

    ---------

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit d526f96
Author: Yury-Fridlyand <[email protected]>
Date:   Thu Sep 21 17:37:59 2023 -0700

    Combine java pipeline and java benchmarks (#8)

    * Merge Pull Request #5 - Add java pipeline.

    Also changed:
    * Merged two projects.
    * Updated CI.
    * Fixed tests and updated `junit` version.
    * Spotless.
    * Add new gradle tasks.

    Signed-off-by: Yury-Fridlyand <[email protected]>

commit 46d0cf6
Author: acarbonetto <[email protected]>
Date:   Wed Sep 20 00:42:14 2023 -0700

    Add Readme and update install_and_test script to runJava

    Signed-off-by: acarbonetto <[email protected]>

commit 6c1fb45
Author: acarbonetto <[email protected]>
Date:   Wed Sep 20 00:40:10 2023 -0700

    Add Readme and update install_and_test script to runJava

    Signed-off-by: acarbonetto <[email protected]>

commit 1983974
Author: Andrew Carbonetto <[email protected]>
Date:   Tue Sep 19 18:24:20 2023 -0700

    Add a Java benchmarking app (#7)

    * Add a java app to run benchmarks

    ---------

    Signed-off-by: acarbonetto <[email protected]>

commit 84f0efc
Author: Jonathan Louie <[email protected]>
Date:   Thu Sep 14 16:09:11 2023 -0700

    rename chooseAction to randomAction

commit 52df672
Author: Jonathan Louie <[email protected]>
Date:   Wed Sep 13 16:04:03 2023 -0700

    Randomize commands in Java benchmarks

commit 5f51a5b
Author: acarbonetto <[email protected]>
Date:   Fri Sep 8 15:47:00 2023 -0700

    fix redis-rs submodules

    Signed-off-by: acarbonetto <[email protected]>

commit cbb0dcb
Author: acarbonetto <[email protected]>
Date:   Fri Sep 8 15:36:45 2023 -0700

    Revert "Update gitignore and remove generated files from git"

    This reverts commit d9b26a6.

commit 2a11e9a
Author: Jonathan Louie <[email protected]>
Date:   Fri Sep 8 14:58:41 2023 -0700

    Add benchmarks for GET non-existing

commit e517744
Author: acarbonetto <[email protected]>
Date:   Fri Sep 8 13:45:34 2023 -0700

    Update gitignore and remove generated files from git

    Signed-off-by: acarbonetto <[email protected]>

commit 8203c4d
Author: acarbonetto <[email protected]>
Date:   Fri Sep 8 13:30:53 2023 -0700

    Update gitignore and remove generated files from git

    Signed-off-by: acarbonetto <[email protected]>

commit 6ae93f5
Author: acarbonetto <[email protected]>
Date:   Tue Oct 3 13:35:07 2023 -0700

    Update gitignore and remove generated files from git

    Signed-off-by: acarbonetto <[email protected]>

commit 5990767
Author: Jonathan Louie <[email protected]>
Date:   Thu Sep 7 17:54:15 2023 -0700

    Start ignoring .gradle files

commit 06574ea
Author: Jonathan Louie <[email protected]>
Date:   Wed Sep 6 20:35:12 2023 -0700

    Add Jedis and Lettuce benchmarks

Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Nov 22, 2023
1 parent f6ac486 commit cacca29
Show file tree
Hide file tree
Showing 38 changed files with 1,686 additions and 190 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ jobs:
distribution: "temurin"
java-version: ${{ matrix.java }}

- name: Install and run protoc (protobuf)
- name: Install protoc (protobuf)
run: |
sudo apt update
sudo apt install -y protobuf-compiler
mkdir -p java/client/src/main/java/org/babushka/javababushka/generated
protoc -Iprotobuf=babushka-core/src/protobuf/ --java_out=java/client/src/main/java/org/babushka/javababushka/generated babushka-core/src/protobuf/*.proto
- name: Build rust part
working-directory: java
run: cargo build
run: cargo build --release

- name: Start Redis
run: docker run -p 6379:6379 -p 8001:8001 -d redis/redis-stack
Expand Down
42 changes: 0 additions & 42 deletions .vscode/launch.json

This file was deleted.

37 changes: 0 additions & 37 deletions .vscode/settings.json

This file was deleted.

41 changes: 0 additions & 41 deletions .vscode/tasks.json

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ int num_of_concurrent_tasks
{"num_of_tasks", num_of_concurrent_tasks},
{"data_size", data_size},
{"tps", tps},
{"clientCount", clients.Length},
{"client_count", clients.Length},
{"is_cluster", "false"}
};
result = result
Expand Down
38 changes: 35 additions & 3 deletions benchmarks/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ runAllBenchmarks=1
runPython=0
runNode=0
runCsharp=0
runJava=0
runRust=0
concurrentTasks="1 10 100 1000"
dataSize="100 4000"
clientCount="1"
chosenClients="all"
host="localhost"
port=6379
tlsFlag="--tls"
javaTlsFlag="-tls"

function runPythonBenchmark(){
# generate protobuf files
Expand Down Expand Up @@ -68,6 +71,12 @@ function runCSharpBenchmark(){
dotnet run --configuration Release --resultsFile=../$1 --dataSize $2 --concurrentTasks $concurrentTasks --clients $chosenClients --host $host --clientCount $clientCount $tlsFlag $portFlag
}

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"
}

function runRustBenchmark(){
rustConcurrentTasks=
for value in $concurrentTasks
Expand Down Expand Up @@ -109,7 +118,7 @@ function resultFileName() {

function Help() {
echo Running the script without any arguments runs all benchmarks.
echo Pass -node, -csharp, -python as arguments in order to run the node, csharp, or python benchmarks accordingly.
echo Pass -node, -csharp, -python, -java as arguments in order to run the node, csharp, python, or java benchmarks accordingly.
echo Multiple such flags can be passed.
echo Pass -no-csv to skip analysis of the results.
echo
Expand Down Expand Up @@ -185,6 +194,21 @@ do
runAllBenchmarks=0
runNode=1
;;
-java)
runAllBenchmarks=0
runJava=1
chosenClients="Babushka"
;;
-lettuce)
runAllBenchmarks=0
runJava=1
chosenClients="lettuce_async"
;;
-jedis)
runAllBenchmarks=0
runJava=1
chosenClients="Jedis"
;;
-csharp)
runAllBenchmarks=0
runCsharp=1
Expand All @@ -205,12 +229,15 @@ do
-no-csv) writeResultsCSV=0 ;;
-no-tls)
tlsFlag=
javaTlsFlag=
;;
-is-cluster)
clusterFlag="--clusterModeEnabled"
javaClusterFlag="-clusterModeEnabled"
;;
-port)
portFlag="--port "$2
javaPortFlag="-port "$2
shift
;;
esac
Expand Down Expand Up @@ -242,6 +269,13 @@ do
runCSharpBenchmark $csharpResults $currentDataSize
fi

if [ $runAllBenchmarks == 1 ] || [ $runJava == 1 ];
then
javaResults=$(resultFileName java $currentDataSize)
resultFiles+=$javaResults" "
runJavaBenchmark $javaResults $currentDataSize
fi

if [ $runAllBenchmarks == 1 ] || [ $runRust == 1 ];
then
rustResults=$(resultFileName rust $currentDataSize)
Expand All @@ -250,8 +284,6 @@ do
fi
done



flushDB

if [ $writeResultsCSV == 1 ];
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/node/node_benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async function run_clients(
num_of_tasks: num_of_concurrent_tasks,
data_size,
tps,
clientCount: clients.length,
client_count: clients.length,
is_cluster,
...set_latency_results,
...get_existing_latency_results,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/python/python_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async def run_clients(
"num_of_tasks": num_of_concurrent_tasks,
"data_size": data_size,
"tps": tps,
"clientCount": len(clients),
"client_count": len(clients),
"is_cluster": is_cluster,
},
**get_existing_latency_results,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async fn perform_benchmark(args: Args) {
Value::Number((number_of_operations as i64 * 1000 / stopwatch.elapsed_ms()).into()),
);
results_json.insert(
"clientCount".to_string(),
"client_count".to_string(),
Value::Number(args.client_count.into()),
);
results_json.insert(
Expand Down
6 changes: 4 additions & 2 deletions benchmarks/utilities/csv_exporter.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/python3

import csv
import json
import os
Expand All @@ -12,7 +14,7 @@
"is_cluster",
"num_of_tasks",
"data_size",
"clientCount",
"client_count",
"tps",
"get_non_existing_p50_latency",
"get_non_existing_p90_latency",
Expand All @@ -39,7 +41,7 @@

json_file_name = os.path.basename(json_file_full_path)

languages = ["csharp", "node", "python", "rust"]
languages = ["csharp", "node", "python", "rust", "java"]
language = next(
(language for language in languages if language in json_file_name), None
)
Expand Down
1 change: 0 additions & 1 deletion java/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[env]
BABUSHKA_NAME = { value = "javababushka", force = true }
BABUSHKA_VERSION = "0.1.0"

3 changes: 2 additions & 1 deletion java/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[package]
name = "javababushka"
version = "0.1.0"
Expand All @@ -17,6 +16,8 @@ babushka = { path = "../babushka-core" }
tokio = { version = "^1", features = ["rt", "macros", "rt-multi-thread", "time"] }
logger_core = {path = "../logger_core"}
tracing-subscriber = "0.3.16"
jni = "0.21.1"
log = "0.4.20"

[profile.release]
lto = true
Expand Down
5 changes: 2 additions & 3 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can run benchmarks using `./gradlew run`. You can set arguments using the ar

```shell
./gradlew run --args="-help"
./gradlew run --args="-resultsFile=output.csv -dataSize \"100 1000\" -concurrentTasks \"10 100\" -clients all -host localhost -port 6279 -clientCount \"1 5\" -tls"
./gradlew run --args="-resultsFile=output.json -dataSize \"100 1000\" -concurrentTasks \"10 100\" -clients all -host localhost -port 6279 -clientCount \"1 5\" -tls"
```

The following arguments are accepted:
Expand All @@ -44,7 +44,6 @@ The following arguments are accepted:

### Troubleshooting

* Connection Timeout:
* Connection Timeout:
* If you're unable to connect to redis, check that you are connecting to the correct host, port, and TLS configuration.
* Only server-side certificates are supported by the TLS configured redis.

21 changes: 15 additions & 6 deletions java/benchmarks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'io.freefair.lombok'
}

repositories {
Expand All @@ -9,6 +10,8 @@ repositories {
}

dependencies {
implementation project(':client')

// Use JUnit test framework.
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'

Expand All @@ -18,6 +21,10 @@ dependencies {
implementation 'io.lettuce:lettuce-core:6.2.6.RELEASE'
implementation 'commons-cli:commons-cli:1.5.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.13.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'

compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
}

// Apply a specific Java toolchain to ease working on different environments.
Expand All @@ -30,12 +37,14 @@ java {
application {
// Define the main class for the application.
mainClass = 'javababushka.benchmarks.BenchmarkingApp'
applicationDefaultJvmArgs += "-Djava.library.path=${projectDir}/../target/release:${projectDir}/../target/debug"
}

tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
jvmArgs "-Djava.library.path=${projectDir}/../target/release:${projectDir}/../target/debug"
}
Loading

0 comments on commit cacca29

Please sign in to comment.