Skip to content

Instantly share code, notes, and snippets.

@gszpak
gszpak / LettuceByteBufBenchmark.java
Created March 7, 2018 01:22
Benchmarking io.lettuce.core.protocol.CommandHandler.decode() method
import io.lettuce.core.RedisClient;
import io.lettuce.core.RedisURI;
import io.lettuce.core.api.StatefulRedisConnection;
import io.lettuce.core.api.async.RedisAsyncCommands;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
@gszpak
gszpak / LettuceBenchmark.java
Created February 21, 2018 22:11
Benchmarking io.lettuce.core.protocol.CommandHandler.write() method
import io.lettuce.core.RedisClient;
import io.lettuce.core.RedisURI;
import io.lettuce.core.api.StatefulRedisConnection;
import io.lettuce.core.api.async.RedisAsyncCommands;
import io.lettuce.core.resource.ClientResources;
import io.lettuce.core.resource.DefaultClientResources;
import io.lettuce.core.resource.EventLoopGroupProvider;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.util.concurrent.DefaultPromise;