Class ProcessTime
java.lang.Object
net.simplace.sim.util.analytics.ProcessTime
Runtime statistics of a component or adapter: sum, maximum and count of the measured processing times in
milliseconds. Times are only recorded if the measurement is switched on (
FWConstants.PROCESS_TIME).- Author:
- aenders
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProcessTime
- Parameters:
aName- name of the component
-
-
Method Details
-
getSum
public long getSum()- Returns:
- the sum of the measured times in ms
-
getMean
public long getMean()- Returns:
- the mean of the measured times in ms (the sum if nothing was measured)
-
getMax
public long getMax()- Returns:
- the maximum measured time in ms
-
getCount
public int getCount()- Returns:
- the number of measurements
-
add
public void add(long aProcessTime) Adds a measured time, if the measurement is switched on. Synchronized, as simulations running in parallel share the process time of a component.- Parameters:
aProcessTime- the measured time in ms
-
getName
- Returns:
- the name of the component
-
reset
public void reset()Resets sum, maximum and count. -
toString
-