public final class HistogramSnapshot
extends java.lang.Object
Constructor and Description |
---|
HistogramSnapshot(long count,
double total,
double max,
ValueAtPercentile[] percentileValues,
CountAtBucket[] histogramCounts,
java.util.function.BiConsumer<java.io.PrintStream,java.lang.Double> summaryOutput) |
Modifier and Type | Method and Description |
---|---|
long |
count() |
static HistogramSnapshot |
empty(long count,
double total,
double max) |
CountAtBucket[] |
histogramCounts() |
double |
max() |
double |
max(java.util.concurrent.TimeUnit unit) |
double |
mean() |
double |
mean(java.util.concurrent.TimeUnit unit) |
void |
outputSummary(java.io.PrintStream out,
double scale) |
ValueAtPercentile[] |
percentileValues() |
java.lang.String |
toString() |
double |
total() |
double |
total(java.util.concurrent.TimeUnit unit) |
public HistogramSnapshot(long count, double total, double max, @Nullable ValueAtPercentile[] percentileValues, @Nullable CountAtBucket[] histogramCounts, @Nullable java.util.function.BiConsumer<java.io.PrintStream,java.lang.Double> summaryOutput)
count
- Total number of recordingstotal
- In nanos if a unit of timemax
- In nanos if a unit of timepercentileValues
- Pre-computed percentiles.histogramCounts
- Bucket counts.summaryOutput
- A function defining how to print the histogram.public long count()
public double total()
public double total(java.util.concurrent.TimeUnit unit)
public double max()
public double max(java.util.concurrent.TimeUnit unit)
public double mean()
public double mean(java.util.concurrent.TimeUnit unit)
public ValueAtPercentile[] percentileValues()
public CountAtBucket[] histogramCounts()
public java.lang.String toString()
toString
in class java.lang.Object
public static HistogramSnapshot empty(long count, double total, double max)
public void outputSummary(java.io.PrintStream out, double scale)