org.shiftone.jrat.core
Class Accumulator

java.lang.Object
  extended by org.shiftone.jrat.core.Accumulator
All Implemented Interfaces:
java.io.Serializable

public class Accumulator
extends java.lang.Object
implements java.io.Serializable

Author:
jeff@shiftone.org (Jeff Drost)
See Also:
Serialized Form

Constructor Summary
Accumulator()
           
Accumulator(long totalEnters, long totalExits, long totalErrors, long totalDuration, long totalOfSquares, long maxDuration, long minDuration, int maxConcurThreads)
           
 
Method Summary
 void combine(Accumulator accumulator)
          this method takes two Accumulators and smashes them together to column a third.
 java.lang.Double getAverageDuration()
           
 int getConcurrentThreads()
           
 int getMaxConcurrentThreads()
           
 long getMaxDuration()
           
 long getMinDuration()
           
 java.lang.Double getStdDeviation()
           
 long getSumOfSquares()
           
 long getTotalDuration()
           
 long getTotalEnters()
           
 long getTotalErrors()
           
 long getTotalExits()
           
 void onMethodFinish(long durationMs, boolean success)
           
 void onMethodStart()
           
 void reset()
           
 void setStatistics(long totalEnters, long totalExits, long totalErrors, long totalDuration, long totalOfSquares, long maxDuration, long minDuration, int maxConcurThreads)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accumulator

public Accumulator()

Accumulator

public Accumulator(long totalEnters,
                   long totalExits,
                   long totalErrors,
                   long totalDuration,
                   long totalOfSquares,
                   long maxDuration,
                   long minDuration,
                   int maxConcurThreads)
Method Detail

setStatistics

public void setStatistics(long totalEnters,
                          long totalExits,
                          long totalErrors,
                          long totalDuration,
                          long totalOfSquares,
                          long maxDuration,
                          long minDuration,
                          int maxConcurThreads)

combine

public void combine(Accumulator accumulator)
this method takes two Accumulators and smashes them together to column a third.


reset

public void reset()

onMethodStart

public final void onMethodStart()

onMethodFinish

public final void onMethodFinish(long durationMs,
                                 boolean success)

getAverageDuration

public final java.lang.Double getAverageDuration()

getStdDeviation

public final java.lang.Double getStdDeviation()

getTotalDuration

public long getTotalDuration()

getMaxConcurrentThreads

public int getMaxConcurrentThreads()

getSumOfSquares

public long getSumOfSquares()

getConcurrentThreads

public final int getConcurrentThreads()

getTotalErrors

public long getTotalErrors()

getTotalEnters

public final long getTotalEnters()

getTotalExits

public final long getTotalExits()

getMinDuration

public final long getMinDuration()

getMaxDuration

public final long getMaxDuration()