Class StripedHistogram

    • Constructor Detail

      • StripedHistogram

        public StripedHistogram​(double maxCoefficient,
                                double phi,
                                int expansionFactor,
                                int bucketCount,
                                double barEpsilon,
                                long window)
      • StripedHistogram

        public StripedHistogram​(int bucketCount,
                                long window)
      • StripedHistogram

        public StripedHistogram​(double phi,
                                int bucketCount,
                                long window)
    • Method Detail

      • getBuckets

        public java.util.List<Histogram.Bucket> getBuckets()
        Description copied from interface: Histogram
        Returns the histograms buckets
        Specified by:
        getBuckets in interface Histogram
        Returns:
        the histogram buckets
      • mergeBars

        static void mergeBars​(java.util.List<double[]> bars)
      • flatten

        private static java.util.List<double[]> flatten​(double[] a,
                                                        double[] b)
      • getQuantileBounds

        public double[] getQuantileBounds​(double quantile)
        Description copied from interface: Histogram
        Returns the bounds [minimum, maximum) on the given quantile.
        Specified by:
        getQuantileBounds in interface Histogram
        Parameters:
        quantile - desired quantile
        Returns:
        the quantile bounds
      • evaluateQuantileFromMax

        private double[] evaluateQuantileFromMax​(double quantile)
      • evaluateQuantileFromMin

        private double[] evaluateQuantileFromMin​(double quantile)
      • size

        public long size()
        Specified by:
        size in interface Histogram
        Returns:
        the number of elements in the histogram
      • event

        public void event​(double value,
                          long time)
        Specified by:
        event in interface Histogram
      • expire

        public void expire​(long time)
        Specified by:
        expire in interface Histogram