public class WavefrontHistogramImpl
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WavefrontHistogramImpl.Distribution
Representation of a histogram distribution, containing a timestamp and a list of centroids.
|
static class |
WavefrontHistogramImpl.Snapshot
Wrapper for TDigest distribution
|
| Constructor and Description |
|---|
WavefrontHistogramImpl()
Constructor for WavefrontHistogramImpl.
|
WavefrontHistogramImpl(java.util.function.Supplier<java.lang.Long> clockMillis)
Constructor for WavefrontHistogramImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bulkUpdate(java.util.List<java.lang.Double> means,
java.util.List<java.lang.Integer> counts)
Bulk-update this histogram with a set of centroids.
|
java.util.List<WavefrontHistogramImpl.Distribution> |
flushDistributions()
Aggregates all the minute bins prior to the current minute (because threads might be
updating the current minute bin while the method is invoked) and returns a list of the
distributions held within each bin.
|
long |
getCount()
getCount.
|
double |
getMax()
getMax.
|
double |
getMean()
getMean.
|
double |
getMin()
getMin.
|
WavefrontHistogramImpl.Snapshot |
getSnapshot()
getSnapshot.
|
double |
getSum()
getSum.
|
double |
stdDev()
stdDev.
|
void |
update(double value)
update.
|
void |
update(int value)
update.
|
void |
update(long value)
update.
|
public WavefrontHistogramImpl()
Constructor for WavefrontHistogramImpl.
public WavefrontHistogramImpl(java.util.function.Supplier<java.lang.Long> clockMillis)
Constructor for WavefrontHistogramImpl.
clockMillis - a Supplier objectpublic void update(int value)
update.
value - a intpublic void update(long value)
update.
value - a longpublic void update(double value)
update.
value - a doublepublic void bulkUpdate(java.util.List<java.lang.Double> means,
java.util.List<java.lang.Integer> counts)
means - the centroid valuescounts - the centroid weights/sample countspublic long getCount()
getCount.
public double getMax()
getMax.
public double getMin()
getMin.
public double getMean()
getMean.
public double getSum()
getSum.
public double stdDev()
stdDev.
public java.util.List<WavefrontHistogramImpl.Distribution> flushDistributions()
WavefrontHistogramImpl.Distribution holding a timestamp
as well as a list of centroids. Each centroid is a tuple containing the centroid value and
count.public WavefrontHistogramImpl.Snapshot getSnapshot()
getSnapshot.
WavefrontHistogramImpl.Snapshot of the histogram distribution.Copyright © 2023. All rights reserved.