Package org.shiftone.jrat.core

Examples of org.shiftone.jrat.core.Accumulator


  /**
   * Method getValue
   */
  public long getValue(int index) {

    Accumulator acc = rateModel.getAccumulator(index, methodNumber);
    long totalDuration = acc.getTotalDuration(TimeUnit.MS);
    long totalExits = acc.getTotalExits();
    return (totalExits != 0) ? totalDuration / totalExits : 0;
  }
View Full Code Here


  /**
   * Method getValue
   */
  public long getValue(int index) {

    Accumulator acc = rateModel.getAccumulator(index, methodNumber);
    return acc.getTotalExits();
  }
View Full Code Here

   * @param handlers .
   */
  public synchronized void printSample(RateMethodHandler[] handlers) throws IOException {

    RateMethodHandler handler = null;
    Accumulator accumulator = null;
    long time = System.currentTimeMillis() - context.getStartTimeMs();
    long totalMemory = RT.totalMemory(); // was maxMemory
    long freeMemory = RT.freeMemory();
    print(PREFIX_SAMPLE + TAB);
    print(time);
View Full Code Here

    currentAccumulator.onMethodStart();
  }

  public synchronized Accumulator getAndReplaceAccumulator() {

    Accumulator newAccumulator = new Accumulator();
    Accumulator oldAccumulator = currentAccumulator;
    currentAccumulator = newAccumulator;
    return oldAccumulator;
  }
View Full Code Here

TOP

Related Classes of org.shiftone.jrat.core.Accumulator

Copyright © 2018 www.massapicom. 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.