public class StreamingHistogram
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StreamingHistogram.StreamingHistogramSerializer |
Modifier and Type | Field and Description |
---|---|
static StreamingHistogram.StreamingHistogramSerializer |
serializer |
Constructor and Description |
---|
StreamingHistogram(int maxBinSize,
int maxSpoolSize,
int roundSeconds)
Creates a new histogram with max bin size of maxBinSize
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
void |
flushHistogram()
Drain the temporary spool into the final bins
|
java.util.Map<java.lang.Number,long[]> |
getAsMap() |
int |
hashCode() |
void |
merge(StreamingHistogram other)
Merges given histogram with this histogram.
|
double |
sum(double b)
Calculates estimated number of points in interval [-inf,b].
|
void |
update(java.lang.Number p)
Adds new point p to this histogram.
|
void |
update(java.lang.Number p,
long m)
Adds new point p with value m to this histogram.
|
public static final StreamingHistogram.StreamingHistogramSerializer serializer
public StreamingHistogram(int maxBinSize, int maxSpoolSize, int roundSeconds)
maxBinSize
- maximum number of bins this histogram can havepublic void update(java.lang.Number p)
p
- public void update(java.lang.Number p, long m)
p
- m
- public void flushHistogram()
public void merge(StreamingHistogram other)
other
- histogram to mergepublic double sum(double b)
b
- upper bound of a interval to calculate sumpublic java.util.Map<java.lang.Number,long[]> getAsMap()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2017 The Apache Software Foundation