|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.Sample
org.javasimon.StopwatchSample
public class StopwatchSample
Object holds all relevant data from Stopwatch Simon. Whenever it is important to get more values
in a synchronous manner, Stopwatch.sample() (or Stopwatch.sampleAndReset()
should be used to obtain this Java Bean object.
| Field Summary | |
|---|---|
private long |
active
|
private long |
counter
|
private long |
last
|
private long |
max
|
private long |
maxActive
|
private long |
maxActiveTimestamp
|
private long |
maxTimestamp
|
private double |
mean
|
private long |
min
|
private long |
minTimestamp
|
private double |
standardDeviation
|
private long |
total
|
private double |
variance
|
private double |
varianceN
|
| Constructor Summary | |
|---|---|
StopwatchSample()
|
|
| Method Summary | |
|---|---|
long |
getActive()
Returns current number of measured splits (concurrently running). |
long |
getCounter()
Returns usage count of the stopwatch. |
long |
getLast()
Returns the value of the last measured split in ns. |
long |
getMax()
Returns maximal time split value in nanoseconds. |
long |
getMaxActive()
Returns peek value of active concurrent splits. |
long |
getMaxActiveTimestamp()
Returns ms timestamp when the last peek of the active split count occured. |
long |
getMaxTimestamp()
Returns ms timestamp when the max value was measured. |
double |
getMean()
Returns mean value (average) of all measured values. |
long |
getMin()
Returns minimal time split value in nanoseconds. |
long |
getMinTimestamp()
Returns ms timestamp when the min value was measured. |
double |
getStandardDeviation()
Returns standard deviation for all measured values. |
long |
getTotal()
Returns the total sum of all split times in nanoseconds. |
double |
getVariance()
Returns unbiased estimate of the population variance. |
double |
getVarianceN()
Returns variance value of all measured values (entire population). |
void |
setActive(long active)
Sets the current number of measured splits (concurrently running). |
void |
setCounter(long counter)
Sets the usage count of the stopwatch. |
void |
setLast(long last)
Sets the value of the last measured split in ns. |
void |
setMax(long max)
Sets the maximal time split value in nanoseconds. |
void |
setMaxActive(long maxActive)
Sets the peek value of active concurrent splits. |
void |
setMaxActiveTimestamp(long maxActiveTimestamp)
Sets the ms timestamp when the last peek of the active split count occured. |
void |
setMaxTimestamp(long maxTimestamp)
Sets the ms timestamp when the max value was measured. |
void |
setMean(double mean)
Sets the mean value (average) of all measured values. |
void |
setMin(long min)
Sets the minimal time split value in nanoseconds. |
void |
setMinTimestamp(long minTimestamp)
Sets the ms timestamp when the min value was measured. |
void |
setStandardDeviation(double standardDeviation)
Sets the standard deviation for all measured values. |
void |
setTotal(long total)
Sets the total sum of all split times in nanoseconds. |
void |
setVariance(double variance)
Sets the unbiased estimate of the population variance. |
void |
setVarianceN(double varianceN)
Sets the variance value of all measured values (entire population). |
String |
stopwatchToString()
Equivalent to StopwatchImpl.toString() without state. |
String |
toString()
Returns readable representation of object. |
| Methods inherited from class org.javasimon.Sample |
|---|
finishWithUsagesAndNote, getFirstUsage, getLastReset, getLastUsage, getName, getNote, setFirstUsage, setLastReset, setLastUsage, setName, setNote, simonToString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private long total
private long counter
private long min
private long max
private long minTimestamp
private long maxTimestamp
private long active
private long maxActive
private long maxActiveTimestamp
private long last
private double mean
private double standardDeviation
private double variance
private double varianceN
| Constructor Detail |
|---|
public StopwatchSample()
| Method Detail |
|---|
public final long getTotal()
public final void setTotal(long total)
total - total time of the stopwatch in nanosecondspublic final long getCounter()
addTime and
stop - that means that it's updated every time the next time split is added.
public final void setCounter(long counter)
counter - count of time splitspublic final long getMin()
public final void setMin(long min)
min - minimal time split in nanosecondspublic final long getMax()
public final void setMax(long max)
max - maximal time split in nanosecondspublic final long getMinTimestamp()
public final void setMinTimestamp(long minTimestamp)
minTimestamp - ms timestamp of the min value measurementpublic final long getMaxTimestamp()
public final void setMaxTimestamp(long maxTimestamp)
maxTimestamp - ms timestamp of the max value measurementpublic final long getActive()
public final void setActive(long active)
active - current number of active splitspublic final long getMaxActive()
public final void setMaxActive(long maxActive)
maxActive - maximum reached value of active splitspublic final long getMaxActiveTimestamp()
public final void setMaxActiveTimestamp(long maxActiveTimestamp)
maxActiveTimestamp - ms timestamp of the last peek of the active split countpublic final long getLast()
public final void setLast(long last)
last - last measured split in nspublic final double getMean()
public final void setMean(double mean)
mean - mean valuepublic final double getStandardDeviation()
public final void setStandardDeviation(double standardDeviation)
standardDeviation - standard deviationpublic final double getVariance()
public final void setVariance(double variance)
variance - unbiased estimated variancepublic final double getVarianceN()
public final void setVarianceN(double varianceN)
varianceN - entire population variancepublic String toString()
toString in class Objectpublic String stopwatchToString()
StopwatchImpl.toString() without state.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||