-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Jedis and Lettuce benchmarks #1
Conversation
Probably, you need to update |
static final int SIZE_GET_KEYSPACE = 3750000; | ||
static final int SIZE_SET_KEYSPACE = 3000000; | ||
|
||
private static ChosenAction randomAction() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So test makes 80% SET
s, 16% GET_NON_EXISTING
and 4% GET_EXISTING
- is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe so. It's just like how the Node benchmarks select actions. We can certainly bring this up for discussion if we want to do this a different way, however.
// create the Options | ||
Options options = new Options(); | ||
|
||
options.addOption("c", "configuration", true, "Configuration flag [Release]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add dataSize
(-d
)
java/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/javabushka/client/jedis/JedisClient.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/javabushka/client/lettuce/LettuceAsyncClient.java
Outdated
Show resolved
Hide resolved
benchmarks/install_and_test.sh
Outdated
runJava=1 | ||
chosenClients="Lettuce" | ||
;; | ||
-lettuce) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-lettuce) | |
-jedis) |
java/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/javabushka/client/BenchmarkingApp.java
Outdated
Show resolved
Hide resolved
benchmarks/install_and_test.sh
Outdated
cd ${BENCH_FOLDER}/../java | ||
echo "./gradlew run --args=\"--resultsFile=${BENCH_FOLDER}/$1 --clients $chosenClients --host $host --port $port\"" | ||
# ./gradlew run --args="--resultsFile=../$1 --dataSize $2 --concurrentTasks $concurrentTasks --clients $chosenClients --host $host --port $port --clientCount $clientCount $tlsFlag" | ||
./gradlew run --args="--resultsFile=${BENCH_FOLDER}/$1 --clients $chosenClients --host $host --port $port" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder for
--dataSize
--concurrentTasks
--clientCount
$tlsFlag
bed8235
to
c542597
Compare
java/.cargo/config.toml
Outdated
@@ -0,0 +1,3 @@ | |||
[env] | |||
BABUSHKA_NAME = { value = "BabushkaPy", force = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename
Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
This reverts commit d9b26a6.
Signed-off-by: acarbonetto <[email protected]>
* Add a java app to run benchmarks --------- Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
* 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. Signed-off-by: Yury-Fridlyand <[email protected]> * Minor fixes. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]>
…onvert to TypeScript. (valkey-io#456) removed duplicated logic and refactored to typescript Signed-off-by: acarbonetto <[email protected]>
* 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]>
Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
7122a23
to
b15f93e
Compare
submodules/redis-rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert?
* 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]>
Signed-off-by: acarbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
* Updated ClientCount to client_count for uniformity for rust.
* 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]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
…java_benchmarks Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
* Add lettuce cluster client when cluster mode enabled --------- Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: acarbonetto <[email protected]>
* 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]>
Already merged on upstream |
This PR is based off of Andrew's fork. It measures the average latency, 50, 90, and 99 percentile latencies, and standard deviation for Jedis and Lettuce clients, similar to the existing benchmarks for Python and Node. It still is missing some functionality, like measuring tasks per second and asynchronous tests, which should be implemented in a later PR.
There's also an issue where running ./gradlew test only executes the tests once. Trying to run it a second time will not execute the tests or print any benchmark results. There's probably a Gradle setting to stop it from doing this, but I'm not sure how yet.