|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.utils.TimeSnapshot
public class TimeSnapshot
Convenience class for collecting time statistics.
| Field Summary | |
|---|---|
String |
title
Title for this snapshot, used in the toString() method. |
| Constructor Summary | |
|---|---|
TimeSnapshot(String title)
Initialize this time snapshot with a specified title. |
|
| Method Summary | |
|---|---|
double |
getAvgTime()
Get the average time. |
long |
getLatestTime()
Get the minimum time observed. |
long |
getMaxTime()
Get the peak time. |
long |
getMinTime()
Get the smallest time observed. |
long |
getTotalTime()
Get the total cumulated time. |
TimeSnapshot |
makeCopy()
Make a copy of this time snapshot object. |
void |
newTime(long time,
int count,
int totalCount)
Called when a new time has been collected. |
void |
setAvgTime(double avgTime)
Set the average time. |
void |
setLatestTime(long latestTime)
Set the most recent time observed. |
void |
setMaxTime(long maxTime)
Set the peak time. |
void |
setMinTime(long minTime)
Set the smallest time observed. |
void |
setTotalTime(long totalTime)
Set the total cumulated time. |
String |
toString()
Get a string representation of this stats object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String title
toString() method.
| Constructor Detail |
|---|
public TimeSnapshot(String title)
title - the title for this snapshot.| Method Detail |
|---|
public void newTime(long time,
int count,
int totalCount)
time - the new time used to compute the new statistics of this time snapshot.count - the unit count to which the time applies.totalCount - the total unit count to which the time applies.public TimeSnapshot makeCopy()
TimeSnapshot instance.public String toString()
toString in class ObjectObject.toString()public void setTotalTime(long totalTime)
totalTime - - the total time as a long value.public long getTotalTime()
public void setLatestTime(long latestTime)
latestTime - - the most recent time as a long value.public long getLatestTime()
public void setMinTime(long minTime)
minTime - - the minimum time as a long value.public long getMinTime()
public void setMaxTime(long maxTime)
maxTime - - the maximum time as a long value.public long getMaxTime()
public void setAvgTime(double avgTime)
avgTime - - the average time as a double value.public double getAvgTime()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||