-
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
Java benchmarks Compare Jedis Sync benchmarking strategies #41
Conversation
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
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.
Will we ever merge this? If yes, you need to grap most recent changes from integ-java-client-milestone-1-*
branches and change the base branch. If no, please mark as draft to avoid merge.
ClientName.BABUSHKA_ASYNC, | ||
ClientName.LETTUCE, | ||
ClientName.LETTUCE_ASYNC); | ||
ClientName.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.
jedis pool[ed]?
ClientName.JEDIS_ASYNC, | ||
ClientName.BABUSHKA_ASYNC, | ||
ClientName.LETTUCE_ASYNC); | ||
case 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.
why?
assert connectionSettings.clusterMode | ||
: "JedisClusterClient does not support disabled clusterMode: use JedisClient instead"; | ||
|
||
// TODO: use JedisCluster instead |
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.
todo
// check if the pool is properly connected | ||
try (Jedis jedis = pool.getResource()) { | ||
assert jedis.isConnected() : "failed to connect to jedis"; | ||
} |
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.
pool is auto-closed on this line
|
||
@Override | ||
public String getName() { | ||
return "Jedis"; |
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.
put different names for clients
|
||
@Override | ||
public String getName() { | ||
return "Jedis"; |
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
} catch (Exception e) { | ||
// timed out - exception from Future::get | ||
} catch (InterruptedException interruptedException) { | ||
interruptedException.printStackTrace(); |
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.
restore interrupt
} | ||
|
||
Benchmarking.printResults(Benchmarking.calculateResults(latencies), 0, iterations); | ||
// Map<ChosenAction, Benchmarking.Operation> actions = new HashMap<>(); |
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.
uncommend or delete
Jedis runs best when sharing pooled connections. This was observed when running different variations of the jedisclient.
Jedis: common Jedis resource
Jedis: common JedisPool
Jedis: common JedisPooled