public double sampleThroughput(){
  final long total=getTotal();
  final long delta=total - prevTotal;
  prevTotal=total;
  final long currTime=System.nanoTime();
  final long elapsedTime=currTime - prevTime;
  prevTime=currTime;
  double result=delta / (elapsedTime / NANOSEC_PER_SECOND);
  if (logger.isLoggable(Level.FINEST))   logger.log(Level.FINEST,"delta=" + delta + ", period="+ (elapsedTime / NANOSEC_PER_SECOND)+ "s, TP="+ result);
  return result;
}

public double sampleThroughput ( ) { final long total = getTotal ( ) ; final long delta = total - prevTotal ; prevTotal = total ; final long currTime = System . nanoTime ( ) ; final long elapsedTime = currTime - prevTime ; prevTime = currTime ; double result = delta / ( elapsedTime / NANOSEC_PER_SECOND ) ; if ( logger . isLoggable ( Level . FINEST ) ) logger . log ( Level . FINEST , "delta=" + delta + ", period=" + ( elapsedTime / NANOSEC_PER_SECOND ) + "s, TP=" + result ) ; return result ; }
samples the throughput ( events per second ) since the previous call to samplethroughput .
