public final class Statistics
extends java.lang.Object
Constructor and Description |
---|
Statistics(int window)
Constructor.
|
Statistics(int window,
int binCount)
Constructor.
|
Statistics(int window,
int binCount,
int binSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(int val)
Method to add data point.
|
int[] |
fillHistogram()
Fill the histogram integer array with data points.
|
int[] |
getHistogram()
Method to get the histogram array of ints.
|
void |
printBuildTimeHistogram(java.lang.String label,
java.lang.String units)
Print out a histogram of data points.
|
public Statistics(int window)
window
- max number of data points to hold at once.public Statistics(int window, int binCount)
window
- max number of data points to hold at once.binCount
- number of histogram bins.public Statistics(int window, int binCount, int binSize)
window
- max number of data points to hold at once.binCount
- number of histogram bins.binSize
- size of each histogram bin.public int[] getHistogram()
The 1st element contains the bin size.
The 2nd element contains the first bin's starting value
The 3rd element contains the data's mean value
The 4rd element contains the data's minimum value
The 5rd element contains the data's maximum value
public void addValue(int val)
val
- data to addpublic int[] fillHistogram()
public void printBuildTimeHistogram(java.lang.String label, java.lang.String units)
label
- header string to print.units
- unit string to print.