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 benchmarks app: Add TLS flag to Lettuce/Jedis benchmarks #9

Closed
wants to merge 14 commits into from

Conversation

acarbonetto
Copy link

@acarbonetto acarbonetto commented Sep 21, 2023

Now the benchmark app takes a tls flag (without argument) to pass to the Lettuce/Jedis clients.

Example:

### run jedis client benchmarks with TLS enabled
./gradle run --args="--clients jedis --tls"

### run lettuce client benchmarks without TLS enabled
./gradle run --args="--clients lettuce"

Comment on lines +32 to +37
RedisURI uri = RedisURI.builder()
.withHost(host)
.withPort(port)
.withSsl(tls)
.build();
client = RedisClient.create("redis://" + host + ":" + port);
Copy link

@Yury-Fridlyand Yury-Fridlyand Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uri is not used, so it should be

Suggested change
RedisURI uri = RedisURI.builder()
.withHost(host)
.withPort(port)
.withSsl(tls)
.build();
client = RedisClient.create("redis://" + host + ":" + port);
client = RedisClient.create((tls ? "rediss" : "redis") + "://" + host + ":" + port);

or maybe better with String.format

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that's a miss. It should be:

client = RedisClient.create(uri); 

@Yury-Fridlyand
Copy link

Probably, you need to rebase/merge one more time to clean up the PR

@acarbonetto acarbonetto force-pushed the java_benchmarks_tlsflag branch from 31e89f7 to 2d09685 Compare September 26, 2023 05:47
@acarbonetto
Copy link
Author

Closing this Pull Request, and going to cherry pick changes into a new branch. Changes from this pull request got messed up from Yury's changes.

@acarbonetto acarbonetto deleted the java_benchmarks_tlsflag branch September 26, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants