public final class StopwatchSample extends StopwatchSample
StopwatchSample
with added JMX capabilities to be return as object via
MXBean method.
Example:
SimonManagerMXBean simon = JMX.newMXBeanProxy(..., new ObjectName("domain:type=Simon"), SimonManagerMXBean.class); StopwatchSample = simon.getStopwatchSample("simon.stopwatch");
Constructor and Description |
---|
StopwatchSample(StopwatchSample sample)
Framework constructor for Simon MBean implementation to initialize all properties
by sample obtained from Simon.
|
StopwatchSample(String name,
double mean,
double stdDev,
double var,
double varN,
String note,
long firstUsage,
long lastUsage,
long total,
long counter,
long min,
long max,
long minTimestamp,
long maxTimestamp,
long active,
long maxActive,
long maxActiveTimestamp,
long last)
JMX constructor.
|
Modifier and Type | Method and Description |
---|---|
Date |
getFirstUsageAsDate()
Timestamp of the first usage from the sampled Simon as a formatted date.
|
String |
getFirstUsageAsString()
Timestamp of the first usage from the sampled Simon as a formatted string.
|
String |
getLastAsString()
Returns the value of the last measured split in ns as a formatted string.
|
Date |
getLastUsageAsDate()
Timestamp of the last usage from the sampled Simon as a formatted date.
|
String |
getLastUsageAsString()
Timestamp of the last usage from the sampled Simon as a formatted string.
|
Date |
getMaxActiveTimestampAsDate()
Returns ms timestamp when the last peek of the active split count occurred as a formatted date.
|
String |
getMaxActiveTimestampAsString()
Returns ms timestamp when the last peek of the active split count occurred as a formatted string.
|
String |
getMaxAsString()
Returns maximal time split value in nanoseconds as a formatted string.
|
Date |
getMaxTimestampAsDate()
Returns ms timestamp when the max value was measured as a formatted date.
|
String |
getMaxTimestampAsString()
Returns ms timestamp when the max value was measured as a formatted string.
|
String |
getMeanAsString()
Returns mean value (average) of all measured values as a formatted string (ns).
|
String |
getMinAsString()
Returns minimal time split value in nanoseconds as a formatted string.
|
Date |
getMinTimestampAsDate()
Returns ms timestamp when the min value was measured as a formatted date.
|
String |
getMinTimestampAsString()
Returns ms timestamp when the min value was measured as a formatted string.
|
String |
getTotalAsString()
Returns the total sum of all split times in nanoseconds as a formatted string.
|
getActive, getCounter, getLast, getMax, getMaxActive, getMaxActiveTimestamp, getMaxTimestamp, getMean, getMin, getMinTimestamp, getStandardDeviation, getTotal, getVariance, getVarianceN, setActive, setCounter, setLast, setMax, setMaxActive, setMaxActiveTimestamp, setMaxTimestamp, setMean, setMin, setMinTimestamp, setStandardDeviation, setTotal, setVariance, setVarianceN, simonToString, toString
getFirstUsage, getLastUsage, getName, getNote, setFirstUsage, setLastUsage, setName, setNote
@ConstructorProperties(value={"name","mean","standardDeviation","variance","varianceN","note","firstUsage","lastUsage","total","counter","min","max","minTimestamp","maxTimestamp","active","maxActive","maxActiveTimestamp","last"}) public StopwatchSample(String name, double mean, double stdDev, double var, double varN, String note, long firstUsage, long lastUsage, long total, long counter, long min, long max, long minTimestamp, long maxTimestamp, long active, long maxActive, long maxActiveTimestamp, long last)
name
- Simon's namemean
- mean value (provided optionally)stdDev
- standard deviation (provided optionally)var
- variance (provided optionally)varN
- variance N (provided optionally)firstUsage
- first usage ms timestamplastUsage
- last usage ms timestamptotal
- sum of all measured timesnote
- note (provided optionally)counter
- count of measuresmin
- minimal measured timemax
- maximal measured timeminTimestamp
- ms timestamp when minimal time was measuredmaxTimestamp
- ms timestamp when maximal time was measuredactive
- count of actual running measuresmaxActive
- maximum parallel measuresmaxActiveTimestamp
- ms timestamp time when maximum parallel measures happenedlast
- last split value in nspublic StopwatchSample(StopwatchSample sample)
sample
- sample object obtained from Stopwatch Simonpublic final String getLastAsString()
public final String getTotalAsString()
public final String getMinAsString()
public final String getMaxAsString()
public final String getMinTimestampAsString()
public final Date getMinTimestampAsDate()
public final String getMaxTimestampAsString()
public final Date getMaxTimestampAsDate()
public final String getMaxActiveTimestampAsString()
public final Date getMaxActiveTimestampAsDate()
public final String getMeanAsString()
public String getFirstUsageAsString()
public Date getFirstUsageAsDate()
public String getLastUsageAsString()
public Date getLastUsageAsDate()
Copyright © 2019. All rights reserved.