|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
vsp.Statistics
public class Statistics
Collects statistics of stamp queue
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private ArrayList<Long> |
lengths
Collected data |
private static int |
MAX_STARS
Max stars in histogram |
private QueueWithServer |
queue
Watching queue |
private boolean |
run
Should scan? |
private long |
scanTime
Scanning time |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Statistics(QueueWithServer queue,
long scanTime)
Creates new object |
Method Summary | |
---|---|
private long[] |
generateHistogram()
Generates histogram data |
private String |
generateStars(long value,
long maxValue)
Generate set of stars for histogram |
long[] |
getHistogramData()
Get histogram data |
String |
getHistogramGraphics()
Get histogram in ASCII art |
long |
getMaxLength()
Get maximum queue length |
double |
getMedian()
Get queue's median |
long |
getMinLength()
Get minimum queue length |
String |
getQueueName()
Get queue name |
double |
getSigma()
|
double |
getVariance()
Get variance |
void |
run()
Run collecting |
void |
stopCollecting()
Stop collecting data |
Methods inherited from class java.lang.Thread |
---|
activeCount, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final int MAX_STARS
private QueueWithServer queue
private long scanTime
private boolean run
private ArrayList<Long> lengths
Constructor Detail |
---|
public Statistics(QueueWithServer queue, long scanTime)
queue
- scanTime
- Method Detail |
---|
public void run()
run
in interface Runnable
run
in class Thread
public void stopCollecting()
public long getMinLength()
public long getMaxLength()
public double getMedian()
public double getVariance()
public double getSigma()
public String getQueueName()
private long[] generateHistogram()
public long[] getHistogramData()
public String getHistogramGraphics()
private String generateStars(long value, long maxValue)
value
- maxValue
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |