org.objectweb.proactive.calcium.statistics
Class StatsImpl

java.lang.Object
  extended by org.objectweb.proactive.calcium.statistics.StatsImpl
All Implemented Interfaces:
java.io.Serializable, Stats

public class StatsImpl
extends java.lang.Object
implements Stats

See Also:
Serialized Form

Constructor Summary
StatsImpl()
           
 
Method Summary
 void addChildStats(StatsImpl stats)
           
 void addComputationTime(long time)
           
 void exitProcessingState()
           
 void exitReadyState()
           
 void exitResultsState()
           
 void exitWaitingState()
           
 long getComputationTime()
          The computation time will ideally correspond to the CPU Time or, if the JVM does not support it, the wallclock time.
 Exercise getExcercise(Muscle muscle)
           
 long getProcessingTime()
          The processing time represents the time this node was asigned to some resource for computation.
 long getReadyTime()
          The ready time represents the time this node was ready for execution waiting for an available resource.
 long getResultsTime()
          The results time represents the time since the task is considered finished, and the time the client actually asks (and gets) the result.
 float getTreeDepth()
          The average depth of the tree, calculated as logB(#Nodes -1), where the base B is the average tree span.
 int getTreeSize()
           
 float getTreeSpan()
          The tree span is the average number of branches of internal tree nodes.
 long getWaitingTime()
          The waiting time represent the time this node spent waiting for other related nodes to finish.
 long getWallClockTime()
           
 Workout getWorkout()
           
 void markFinishTime()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatsImpl

public StatsImpl()
Method Detail

getComputationTime

public long getComputationTime()
Description copied from interface: Stats
The computation time will ideally correspond to the CPU Time or, if the JVM does not support it, the wallclock time. In comparison with the processing time, this time does not include the network and other overheads. Note that if the measured code executed a fork, the child's cpu time will not be reflected.

Specified by:
getComputationTime in interface Stats
Returns:
Returns the computation time spent by this task.

addComputationTime

public void addComputationTime(long time)

exitReadyState

public void exitReadyState()

exitProcessingState

public void exitProcessingState()

exitWaitingState

public void exitWaitingState()

exitResultsState

public void exitResultsState()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

markFinishTime

public void markFinishTime()

getWorkout

public Workout getWorkout()

addChildStats

public void addChildStats(StatsImpl stats)

getWallClockTime

public long getWallClockTime()
Specified by:
getWallClockTime in interface Stats
Returns:
Returns the time elapsed since the creation of the task until this task is finished.

getProcessingTime

public long getProcessingTime()
Description copied from interface: Stats
The processing time represents the time this node was asigned to some resource for computation. This time includes the time the node took to travel through the network.

Specified by:
getProcessingTime in interface Stats
Returns:
Returns the time spent by this node in processing state.

getReadyTime

public long getReadyTime()
Description copied from interface: Stats
The ready time represents the time this node was ready for execution waiting for an available resource.

Specified by:
getReadyTime in interface Stats
Returns:
Returns the time spent by this node in ready state.

getResultsTime

public long getResultsTime()
Description copied from interface: Stats
The results time represents the time since the task is considered finished, and the time the client actually asks (and gets) the result.

Specified by:
getResultsTime in interface Stats
Returns:
Returns the time spent by this tasks in results state.

getTreeSize

public int getTreeSize()
Specified by:
getTreeSize in interface Stats
Returns:
Returns the number of nodes in the tree.

getWaitingTime

public long getWaitingTime()
Description copied from interface: Stats
The waiting time represent the time this node spent waiting for other related nodes to finish. In particular for sub-nodes spawned from this one.

Specified by:
getWaitingTime in interface Stats
Returns:
Returns the time this node spent in waiting state.

getTreeDepth

public float getTreeDepth()
Description copied from interface: Stats
The average depth of the tree, calculated as logB(#Nodes -1), where the base B is the average tree span.

Specified by:
getTreeDepth in interface Stats
Returns:
The average depth of the tree.

getTreeSpan

public float getTreeSpan()
Description copied from interface: Stats
The tree span is the average number of branches of internal tree nodes. It is calculated as: (#Nodes - 1)/(# Inner Nodes).

Specified by:
getTreeSpan in interface Stats
Returns:
Returns the average number of branches of this tree.

getExcercise

public Exercise getExcercise(Muscle muscle)
Specified by:
getExcercise in interface Stats
Returns:
The excercise of the specified muscle, or null if no statistics are available for this muscle.


Copyright 2001-2007 INRIA All Rights Reserved.