Package org.jredis.ri.alphazero

Examples of org.jredis.ri.alphazero.JRedisPipeline.incr()


   
    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;
View Full Code Here


          /* sync call */
          long llen = pipeline.sync().llen("my-list");
         
          String cntrKey = "my-cntr";
          for(int i=0; i<100000; i++) {
            pipeline.incr(cntrKey);
          }
          /* sync call */
          long cntr = toLong (pipeline.sync().get(cntrKey));
         
          for(int i=0; i<100000; i++){
View Full Code Here

          String cntrKey = "my-cntr";
         
          Random rand = new Random();
          byte[] data = new byte[8];
          for(int i=0; i<100000; i++)
            pipeline.incr(cntrKey);
         
          long cntr = toLong (pipeline.sync().get(cntrKey));
         
          for(int i=0; i<100000; i++){
            rand.nextBytes(data);
View Full Code Here

        do {
          int cnt = 0;
          Util.Timer timer = Timer.startNewTimer();
          Future<Long> futureLong = null;
          while(cnt < reqCnt){
            futureLong = pipeline.incr(key);
            cnt++;
          }
          long reqDoneTime = timer.mark();
        long counter = futureLong.get();
          long respDoneTime = timer.mark();
View Full Code Here

         
          long llen = pipeline.sync().llen("my-list");
         
          String cntrKey = "my-cntr";
          for(int i=0; i<100000; i++) {
            pipeline.incr(cntrKey);
          }
          /* sync call */
          long cntr = toLong (pipeline.sync().get(cntrKey));
         
          for(int i=0; i<100000; i++){
View Full Code Here

          String cntrKey = "my-cntr";
         
          Random rand = new Random();
          byte[] data = new byte[8];
          for(int i=0; i<100000; i++)
            pipeline.incr(cntrKey);
         
          long cntr = toLong (pipeline.sync().get(cntrKey));
         
          for(int i=0; i<100000; i++){
            rand.nextBytes(data);
View Full Code Here

        do {
          int cnt = 0;
          Util.Timer timer = Timer.startNewTimer();
          Future<Long> futureLong = null;
          while(cnt < reqCnt){
            futureLong = pipeline.incr(key);
            cnt++;
          }
          long reqDoneTime = timer.mark();
          assert futureLong != null;
        @SuppressWarnings("null")
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.