org.objectweb.proactive.core.util.timer
Class TimerWithMemory

java.lang.Object
  extended byorg.objectweb.proactive.core.util.timer.AverageMicroTimer
      extended byorg.objectweb.proactive.core.util.timer.TimerWithMemory
All Implemented Interfaces:
java.io.Serializable, Timer

public class TimerWithMemory
extends AverageMicroTimer
implements Timer, java.io.Serializable

A timer which retains the values measured in addition to calculating the average

See Also:
Serialized Form

Field Summary
protected  long[] memory
           
protected  int position
           
 
Fields inherited from class org.objectweb.proactive.core.util.timer.AverageMicroTimer
currentElapsed, name, nbrValues, running, timer, total
 
Constructor Summary
TimerWithMemory()
           
TimerWithMemory(java.lang.String name)
           
 
Method Summary
protected  void addToMemory(long time)
           
protected  void addToMemoryTest(long time)
          Called only to perform some testing
 void dump()
           
 long[] getMemory()
          return a copy of the memory of this timer
 double getStandardDeviation()
           
 double getVariance()
           
static void main(java.lang.String[] args)
           
 void reset()
           
 void stop()
          stop the timer and use the cumulated time to compute the average
 
Methods inherited from class org.objectweb.proactive.core.util.timer.AverageMicroTimer
getAverage, getCumulatedTime, getName, getNumberOfValues, pause, resume, setName, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.proactive.core.util.profiling.Timer
getAverage, getCumulatedTime, getName, getNumberOfValues, pause, resume, setName, start
 

Field Detail

memory

protected long[] memory

position

protected int position
Constructor Detail

TimerWithMemory

public TimerWithMemory()

TimerWithMemory

public TimerWithMemory(java.lang.String name)
Method Detail

stop

public void stop()
Description copied from class: AverageMicroTimer
stop the timer and use the cumulated time to compute the average

Specified by:
stop in interface Timer
Overrides:
stop in class AverageMicroTimer

addToMemoryTest

protected void addToMemoryTest(long time)
Called only to perform some testing

Parameters:
time -

addToMemory

protected void addToMemory(long time)

getMemory

public long[] getMemory()
return a copy of the memory of this timer

Returns:
a copy of the memory

getVariance

public double getVariance()

getStandardDeviation

public double getStandardDeviation()

reset

public void reset()
Specified by:
reset in interface Timer
Overrides:
reset in class AverageMicroTimer

dump

public void dump()
Specified by:
dump in interface Timer
Overrides:
dump in class AverageMicroTimer

main

public static void main(java.lang.String[] args)


Copyright ? October 2004 INRIA All Rights Reserved.