public final class PercentileSummary extends Object
Handle runs with differing number of samples (and hence, percentiles) correctly
| Modifier and Type | Class and Description |
|---|---|
static interface |
PercentileSummary.RowConsumer
Consumer of summary rows
|
| Constructor and Description |
|---|
PercentileSummary(boolean skipFirst,
@NotNull List<double[]> percentileRuns,
double[] percentiles)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
calculateVariance(int percentileIndex)
Calculate the variance between runs for a percentile
|
void |
forEachRow(PercentileSummary.RowConsumer consumer)
Execute a callback for every percentile row that contains at least one value
|
double |
getPercentileForRun(int percentileIndex,
int runIndex)
Get the percentile measurement for a specific run
|
void |
printSummary()
Print out the summary (for debugging)
|
public PercentileSummary(boolean skipFirst,
@NotNull
@NotNull List<double[]> percentileRuns,
double[] percentiles)
skipFirst - Whether to skip the value from the first run when calculating variancepercentileRuns - The values for the individual runspercentiles - The percentiles to render (some may not be present in some runs)public void printSummary()
percentiles down the Y axis, runs along the X axis, variance in last column
public double calculateVariance(int percentileIndex)
percentileIndex - The index of the percentile for which to calculate the variancepublic double getPercentileForRun(int percentileIndex,
int runIndex)
percentileIndex - The index of the percentile to retrieverunIndex - The index of the run to retrieveDouble.POSITIVE_INFINITY if there are not enough samples for thatpublic void forEachRow(PercentileSummary.RowConsumer consumer)
consumer - A PercentileSummary.RowConsumer to process the rowsCopyright © 2023. All rights reserved.