-
Notifications
You must be signed in to change notification settings - Fork 70
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 test clients for benchmarking. #632
Add test clients for benchmarking. #632
Conversation
Signed-off-by: Yury-Fridlyand <[email protected]>
Add client timeout as requiested in #629 (comment) |
Signed-off-by: Yury-Fridlyand <[email protected]>
Fixed in 07cfd8b |
Signed-off-by: Yury-Fridlyand <[email protected]>
@@ -0,0 +1,50 @@ | |||
package javababushka.benchmarks.clients.babushka; | |||
|
|||
/* |
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.
Note: Commented out for this PR.
Will be included as part of #631
Hey @Yury-Fridlyand, the tests are failing and the PR is still marked as 'draft' - so let me know when it's ready for review |
Marked as draft to prevent merge, but it is ready for review. I'll update this PR once #629 and #631 merged. |
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Please rebase over the changes from #629, there is an overlap with this two PRs which makes it hard to understand what needs to be reviewed. Ping me when it's rebased and ready for review |
…ilestone-1-benchmarking-clients Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@barshaul, ready for review |
@@ -97,7 +93,7 @@ private static Options getOptions() { | |||
.hasArg(true) | |||
.desc( | |||
"one of:" | |||
+ " all|jedis|jedis_async|lettuce|lettuce_async|babushka_async|all_async|all_sync" | |||
+ " all|jedis|lettuce|lettuce_async|babushka_async|all_async|all_sync" |
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.
Commented on prev PR - make sure to rebase over the changes commited there
java/README.md
Outdated
The Java client contains the following parts: | ||
|
||
1. A Java client (lib folder): wrapper to rust-client. | ||
2. An examples script: to sanity test babushka and similar java-clients against a redis host. |
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 couldn't find this script?
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.
And we don't want the examples folder to contain examples of other clients, only babushka
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.
It does not exist yet (as well as the client itself)
Updated in 3e0f70b.
java/README.md
Outdated
|
||
1. A Java client (lib folder): wrapper to rust-client. | ||
2. An examples script: to sanity test babushka and similar java-clients against a redis host. | ||
3. A benchmark app: to performance benchmark test babushka and similar java-clients against a redis host. |
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.
A benchmark app: A dedicated benchmarking tool designed to evaluate and compare the performance of Babushka and other Java clients.
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.
Updated in 3e0f70b
java/README.md
Outdated
* `port`: redis server port number | ||
* `tls`: redis TLS configured | ||
|
||
### Troubleshooting |
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.
Already commented for Andrew PR, it isn't specific for the Java wrapper, please remove it
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.
Removed in 3e0f70b.
java/README.md
Outdated
@@ -109,3 +115,18 @@ You can run benchmarks using `./gradlew run`. You can set arguments using the ar | |||
./gradlew run --args="-help" | |||
./gradlew run --args="-resultsFile=output -dataSize \"100 1000\" -concurrentTasks \"10 100\" -clients all -host localhost -port 6279 -clientCount \"1 5\" -tls" | |||
``` | |||
|
|||
The following arguments are accepted: |
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.
Adding it to the README file will require to maintain it when the benchmark app will be changed. It's enough to describe the different options in the -help option
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 agree, but benchmarking apps are not supposed to be updated.
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.
We do plan to add more arguments in the future (e.g. data value, command type, changing the ratio of set/get etc...)
@Override | ||
public void connectToRedis(ConnectionSettings connectionSettings) { | ||
pool = | ||
new JedisPool(connectionSettings.host, connectionSettings.port, connectionSettings.useSsl); |
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.
It looks like you're not testing Jedis in a cluster mode at all, redis cluster should be used with JedisCluster
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.
Fixed in 3e0f70b.
|
||
/* | ||
|
||
public class JniNettyClient implements SyncClient, AsyncClient<Response> { |
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.
Please remove it from this PR and add it when the java-babushka will be added
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.
Removed in 3e0f70b.
private static JedisClient jedisClient; | ||
|
||
@BeforeAll | ||
static void initializeJedisClient() { |
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.
IMO we don't want to have other clients tests in our project, keeping them in the benchmark is enough. @shachlanAmazon what do you think?
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.
definitely. Jedis & Lettuce can test themselves, we don't need to test them. And we don't test the benchmark, just like we don't test our tests.
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.
We can remove these tests now. I agree that they no longer add any value to our clients.
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.
Removed in 3e0f70b.
private static LettuceAsyncClient otherLettuceClient; | ||
|
||
@BeforeAll | ||
static void initializeLettuceClient() { |
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.
same - other clients tests
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.
Removed in 3e0f70b.
…ilestone-1-benchmarking-clients Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
private StatefulRedisClusterConnection<String, String> clusterConnection; | ||
|
||
@Override | ||
public void connectToRedis(ConnectionSettings connectionSettings) { |
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.
@Yury-Fridlyand I think that the same as you did for Jedis, no need to have a separate file for LettuceClusterClient, you can use LettuceAsyncClient both for standalone and cluster
java/README.md
Outdated
The Java client contains the following parts: | ||
|
||
1. A Java client (lib folder): wrapper to rust client. | ||
2. An examples script: to sanity test babushka against a Redis host. |
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.
The example script would probably be with the rest examples under examples/ folder, so we don't need to specify it here. Lets remove number 2
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.
Fix the last comments, squash commits & ship it
Signed-off-by: Yury-Fridlyand <[email protected]>
Issue #, if available:
Part 3 of 4. (see #629)
Description of changes:
This PR contains testing clients for #629. Depends on #629 and #631 - some code is commented out. Should be merged after these PRs!
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.