org.objectweb.proactive.core.util.timer
Class CompositeAverageMicroTimer
java.lang.Object
org.objectweb.proactive.core.util.timer.AverageMicroTimer
org.objectweb.proactive.core.util.timer.CompositeAverageMicroTimer
- All Implemented Interfaces:
- java.io.Serializable, Timer
- public class CompositeAverageMicroTimer
- extends AverageMicroTimer
- implements Timer, java.io.Serializable
A CompositeMicroTimer maintains many timer at once. To switch between them, use the setTimer method
It is advised that only one time may be used at a time to avoid side effects in the measurements.
- Author:
- Fabrice Huet
- See Also:
- Serialized Form
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 |
getName, setName |
CompositeAverageMicroTimer
public CompositeAverageMicroTimer(java.lang.String name)
start
public void start()
- Specified by:
start
in interface Timer
- Overrides:
start
in class AverageMicroTimer
resume
public void resume()
- Specified by:
resume
in interface Timer
- Overrides:
resume
in class AverageMicroTimer
pause
public void pause()
- Specified by:
pause
in interface Timer
- Overrides:
pause
in class AverageMicroTimer
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
reset
public void reset()
- Specified by:
reset
in interface Timer
- Overrides:
reset
in class AverageMicroTimer
getCumulatedTime
public long getCumulatedTime()
- Description copied from class:
AverageMicroTimer
- returns the total time measured so far
- Specified by:
getCumulatedTime
in interface Timer
- Overrides:
getCumulatedTime
in class AverageMicroTimer
getNumberOfValues
public int getNumberOfValues()
- Specified by:
getNumberOfValues
in interface Timer
- Overrides:
getNumberOfValues
in class AverageMicroTimer
getAverage
public double getAverage()
- return the average time of all the timers
- Specified by:
getAverage
in interface Timer
- Overrides:
getAverage
in class AverageMicroTimer
- Returns:
- the average time in microseconds
-1 if NaN
toString
public java.lang.String toString()
- Overrides:
toString
in class AverageMicroTimer
dump
public void dump()
- Specified by:
dump
in interface Timer
- Overrides:
dump
in class AverageMicroTimer
setTimer
public void setTimer(java.lang.String name)
getActiveTimer
public Timer getActiveTimer()
main
public static void main(java.lang.String[] args)
Copyright ? April 2005 INRIA All Rights Reserved.