@ThreadSafe public final class LiveStats extends Object implements java.util.function.DoubleConsumer, Serializable
| Constructor and Description |
|---|
LiveStats(DecayConfig decayConfig,
double... quantiles)
Constructs a LiveStats object which will exponentially decay collected stats over time
|
LiveStats(double... quantiles)
Constructs a LiveStats object which will track stats for all time
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(double item)
Adds another datum
|
void |
add(double item)
Adds another datum
|
void |
decay() |
void |
decayByTime()
Decays the currently recorded stats as much as they currently should be.
|
int |
decayCount() |
double |
decayedMaximum()
Gets the decayed maximum value of items so far added.
|
double |
decayedMinimum()
Gets the decayed minimum value of items so far added.
|
double |
decayedNum() |
double |
kurtosis() |
double |
maximum() |
double |
mean() |
double |
minimum() |
long |
num() |
Map<Double,Double> |
quantiles() |
double |
skewness() |
double |
variance() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThenpublic LiveStats(double... quantiles)
quantiles - Quantiles to track (eg. .5 for the 50th percentile)public LiveStats(DecayConfig decayConfig, double... quantiles)
decayConfig - the configuration for time-based decay of statisticsquantiles - Quantiles to track (eg. .5 for the 50th percentile)public void decayByTime()
public void decay()
public void accept(double item)
accept in interface java.util.function.DoubleConsumeritem - the value to addpublic void add(double item)
item - the value to addpublic double maximum()
public double decayedMaximum()
public double mean()
public double minimum()
public double decayedMinimum()
public long num()
public double decayedNum()
public int decayCount()
public double variance()
public double kurtosis()
public double skewness()
Copyright © 2015. All rights reserved.