Examples of increment()


Examples of org.apache.activemq.broker.ProgressPrinter.increment()

        log.info("Sending "+ PRODUCE_COUNT+" messages that are "+(MESSAGE_SIZE/1024.0)+"k large, for a total of "+(PRODUCE_COUNT*MESSAGE_SIZE/(1024.0*1024.0))+" megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for( int i=0; i < PRODUCE_COUNT; i++) {
            printer.increment();
            BytesMessage  msg = session.createBytesMessage();
            msg.writeBytes(new byte[MESSAGE_SIZE]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.activemq.management.CountStatisticImpl.increment()

        CountStatisticImpl stat = new CountStatisticImpl("myCounter", "seconds", "myDescription");
        assertStatistic(stat, "myCounter", "seconds", "myDescription");

        assertEquals(0, stat.getCount());

        stat.increment();
        assertEquals(1, stat.getCount());

        stat.increment();
        assertEquals(2, stat.getCount());
View Full Code Here

Examples of org.apache.camel.util.concurrent.CountingLatch.increment()

            for (ProcessorExchangePair pair : pairs) {
                Processor producer = pair.getProcessor();
                final Exchange subExchange = pair.getExchange();
                updateNewExchange(subExchange, i, pairs);
                exchanges.add(subExchange);
                completedExchanges.increment();
                ProcessCall call = new ProcessCall(subExchange, producer, new AsyncCallback() {
                    public void done(boolean doneSynchronously) {
                        if (streaming && aggregationStrategy != null) {
                            doAggregate(result, subExchange);
                        }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableInt.increment()

                    continue;
                }
                for(ByteArray key: getResult.callable.nodeKeys) {
                    List<Versioned<byte[]>> retrieved = getResult.retrieved.get(key);
                    MutableInt successCount = keyToSuccessCount.get(key);
                    successCount.increment();

                    /*
                     * retrieved can be null if there are no values for the key
                     * provided
                     */
 
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong.increment()

      return null;
    } else {
      V value = data.getFirst();
      MutableLong count = data.getSecond();
      long oldCount = count.longValue();
      count.increment();
      incrementHit(key, oldCount);
      return value;
    }
   
  }
View Full Code Here

Examples of org.apache.commons.lang3.mutable.MutableInt.increment()

            for (T t : items) {
                MutableInt count = occurrences.get(t);
                if (count == null) {
                    occurrences.put(t, new MutableInt(1));
                } else {
                    count.increment();
                }
            }
            T result = null;
            int max = 0;
            for (Map.Entry<T, MutableInt> e : occurrences.entrySet()) {
View Full Code Here

Examples of org.apache.commons.lang3.mutable.MutableLong.increment()

      total++;
      MutableLong count = stats.get(sr.r.getClass().getName());
      if (count == null)
        stats.put(sr.r.getClass().getName(), count = new MutableLong(1L));
      else
        count.increment();
    }

    for(Map.Entry<String, MutableLong> e : stats.entrySet())
      list.append("\t").append(e.getKey()).append(" : ").append(e.getValue().longValue()).append("\n");
View Full Code Here

Examples of org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic.increment()

          long elapsedTime = result.getEndTime() > 0 ? result.getEndTime() - result.getStartTime() : -1;
          statisticsWriter.write(queryRate + "\t" + result.getNodeId() + "\t" + result.getStartTime() + "\t"
                  + result.getEndTime() + "\t" + elapsedTime + "\t" + result.getQuery() + "\n");
          if (elapsedTime != -1) {
            timeStandardDeviation.increment(elapsedTime);
            timeMean.increment(elapsedTime);
          } else {
            ++errors;
          }
        }
        resultWriter.write(queryRate + "\t" + ((double) queryResults.size() / (_runTime / 1000)) + "\t"
View Full Code Here

Examples of org.apache.commons.math.stat.descriptive.moment.FourthMoment.increment()

        Variance v = new Variance(m4);
        Skewness s= new Skewness(m4);
        Kurtosis k = new Kurtosis(m4);

        for (int i = 0; i < testArray.length; i++){
            m4.increment(testArray[i]);
        }

        assertEquals(mean,m.getResult(),tolerance);
        assertEquals(var,v.getResult(),tolerance);
        assertEquals(skew ,s.getResult(),tolerance);
View Full Code Here

Examples of org.apache.commons.math.stat.descriptive.moment.Mean.increment()

          long elapsedTime = result.getEndTime() > 0 ? result.getEndTime() - result.getStartTime() : -1;
          statisticsWriter.write(queryRate + "\t" + result.getNodeId() + "\t" + result.getStartTime() + "\t"
                  + result.getEndTime() + "\t" + elapsedTime + "\t" + result.getQuery() + "\n");
          if (elapsedTime != -1) {
            timeStandardDeviation.increment(elapsedTime);
            timeMean.increment(elapsedTime);
          } else {
            ++errors;
          }
        }
        resultWriter.write(queryRate + "\t" + ((double) queryResults.size() / (_runTime / 1000)) + "\t"
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.