public abstract class Result<T extends Result<T>>
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Result.LazyProps |
Modifier and Type | Field and Description |
---|---|
private static Deduplicator<java.lang.String> |
DEDUP |
protected java.lang.String |
label |
protected AggregationPolicy |
policy |
protected ResultRole |
role |
private static long |
serialVersionUID |
protected Statistics |
statistics |
protected java.lang.String |
unit |
Constructor and Description |
---|
Result(ResultRole role,
java.lang.String label,
Statistics s,
java.lang.String unit,
AggregationPolicy policy) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
distributionExtendedInfo() |
java.lang.String |
extendedInfo()
Print extended result information
|
protected abstract Aggregator<T> |
getIterationAggregator()
Iteration aggregator combines the iteration results into benchmar result.
|
java.lang.String |
getLabel()
Return the result label.
|
ResultRole |
getRole()
Return the result role.
|
long |
getSampleCount()
Get number of samples in the current result.
|
double |
getScore()
The score for this result.
|
double[] |
getScoreConfidence()
The score confidence interval for this result.
|
double |
getScoreError()
The score error for this result.
|
java.lang.String |
getScoreUnit()
The unit of the score for this result.
|
Statistics |
getStatistics()
Return the statistics holding the subresults' values.
|
protected abstract Aggregator<T> |
getThreadAggregator()
Thread aggregator combines the thread results into iteration result.
|
protected T |
getZeroResult()
Returns "0" result.
|
protected static Statistics |
of(double v) |
private void |
printHisto(Statistics stats,
java.lang.StringBuilder sb) |
private void |
printPercentiles(Statistics stats,
java.lang.StringBuilder sb) |
protected java.lang.String |
simpleExtendedInfo() |
java.lang.String |
toString()
Result as represented by a String.
|
private static final long serialVersionUID
private static final Deduplicator<java.lang.String> DEDUP
protected final ResultRole role
protected final java.lang.String label
protected final java.lang.String unit
protected final Statistics statistics
protected final AggregationPolicy policy
public Result(ResultRole role, java.lang.String label, Statistics s, java.lang.String unit, AggregationPolicy policy)
protected static Statistics of(double v)
public java.lang.String getLabel()
public ResultRole getRole()
public Statistics getStatistics()
This method returns raw samples. The aggregation policy decides how to get the score
out of these raw samples. Use getScore()
, getScoreError()
, and
getScoreConfidence()
for scalar results.
public final java.lang.String getScoreUnit()
public double getScore()
getScoreError()
public double getScoreError()
getScore()
public double[] getScoreConfidence()
getScore()
getScore()
public long getSampleCount()
protected abstract Aggregator<T> getThreadAggregator()
protected abstract Aggregator<T> getIterationAggregator()
protected T getZeroResult()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String extendedInfo()
protected java.lang.String simpleExtendedInfo()
protected java.lang.String distributionExtendedInfo()
private void printPercentiles(Statistics stats, java.lang.StringBuilder sb)
private void printHisto(Statistics stats, java.lang.StringBuilder sb)