Package org.jredis

Examples of org.jredis.JRedis.incr()


   
    for(;;){
      Long counter = null;
      long start = System.nanoTime();
      for(int i=0;i<iters; i++){
        counter = jredis.incr(key);
      }
      long delta_ns = System.nanoTime() - start;
      long delta_ms = TimeUnit.MILLISECONDS.convert(delta_ns, TimeUnit.NANOSECONDS);
      float opsrate = iters/delta_ms;
      System.out.format("counter: %d  msec:%d ops/msecs:%f  [delta:%d]\n", counter, delta_ms, opsrate, delta_ns);
View Full Code Here


        public void run() {
              final String wkey = "foo" + j;
              String wvalue = null;
          for(int i=0; i< opcnt; i++) {
                try {
                  client.incr(wkey);
                  wvalue = toStr(client.get(wkey));
            } catch (RedisException e) {
              e.printStackTrace();
              break;
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.