}
private void run() {
int database = 11;
ConnectionSpec connSpec = DefaultConnectionSpec.newSpec("localhost", 6379, database, "jredis".getBytes());
JRedisFuture jredis = new JRedisAsyncClient(connSpec);
byte[] key = "bench-jredis-pipeline-key".getBytes();
int iters = 100 * 1000;
try {
cleandb(jredis);
} catch (Throwable e) {
e.printStackTrace();
return;
}
for(;;){
Future<Long> frCounter = null;
long start = System.nanoTime();
for(int i=0;i<iters; i++){
frCounter = jredis.incr(key);
}
long queued = System.nanoTime() - start;
try {
long counter = frCounter.get();
long delta_ns = System.nanoTime() - start;