int perThread = rounds / connections;
CompletableFuture[] futures = new CompletableFuture[connections];
Long start = System.currentTimeMillis();
for (int i = 0; i < connections; i++) {
futures[i] = CompletableFuture.runAsync(() -> {
pool.safelyDo(jedis -> {
for(int j = 0; j < perThread; j++) {
jedis.set("key" + Math.random(), RandomStringUtils.random(50));
}
});
}, exec);