Class SizeStatisticsCollectorCursor.SizeStatisticsResults

  • Enclosing class:
    SizeStatisticsCollectorCursor

    public static class SizeStatisticsCollectorCursor.SizeStatisticsResults
    extends Object
    Encapsulates the distribution statistics returned by a SizeStatisticsCollectorCursor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getAverage()
      Get the mean size (in bytes) of combined key-value pairs in the requested key range.
      double getAverageKeySize()
      Get the mean size (in bytes) of keys in the requested key range.
      double getAverageValueSize()
      Get the mean size (in bytes) of values in the requested key range.
      long getKeyCount()
      Get the total number of keys in the requested key range.
      long getKeySize()
      Get the total size (in bytes) of all keys in the requested key range.
      long getMaxKeySize()
      Get the size (in bytes) of the largest key in the requested key range.
      long getMaxValueSize()
      Get the size (in bytes) of the largest value in the requested key range.
      double getMedian()
      Get an estimate for the size of the median key-value pair.
      double getP90()
      Get an estimate for the size of the 90th percentile key-value pair.
      double getP95()
      Get an estimate for the size of the 95th percentile key-value pair.
      double getProportion​(double proportion)
      Get an estimate for the size for which the provided proportion of key-value pairs have a combined size that is less than that size.
      long[] getSizeBuckets()
      Get an array of buckets used to get an estimate of size distribution.
      long getTotalSize()
      Get the total size (in bytes) of all keys and values in the requested key range.
      long getValueSize()
      Get the total size (in bytes) of all values in the requested key range.
    • Method Detail

      • getKeyCount

        public long getKeyCount()
        Get the total number of keys in the requested key range.
        Returns:
        keyCount the total number of keys in the requested key range.
      • getKeySize

        public long getKeySize()
        Get the total size (in bytes) of all keys in the requested key range.
        Returns:
        the size (in bytes) of the requested keys
      • getMaxKeySize

        public long getMaxKeySize()
        Get the size (in bytes) of the largest key in the requested key range.
        Returns:
        the size (in bytes) of the largest key
      • getValueSize

        public long getValueSize()
        Get the total size (in bytes) of all values in the requested key range.
        Returns:
        the size (in bytes) of the requested values
      • getMaxValueSize

        public long getMaxValueSize()
        Get the size (in bytes) of the largest value in the requested key range.
        Returns:
        the size (in bytes) of the largest value
      • getTotalSize

        public long getTotalSize()
        Get the total size (in bytes) of all keys and values in the requested key range.
        Returns:
        the size (in bytes) of the requested keys and values
      • getAverageKeySize

        public double getAverageKeySize()
        Get the mean size (in bytes) of keys in the requested key range.
        Returns:
        the mean size (in bytes) of all keys
      • getAverageValueSize

        public double getAverageValueSize()
        Get the mean size (in bytes) of values in the requested key range.
        Returns:
        the mean size (in bytes) of all values
      • getAverage

        public double getAverage()
        Get the mean size (in bytes) of combined key-value pairs in the requested key range.
        Returns:
        the mean size (in bytes) of all key-value pairs
      • getSizeBuckets

        @Nonnull
        public long[] getSizeBuckets()
        Get an array of buckets used to get an estimate of size distribution. Each bucket i contains the number of key-value pairs whose combined size is between greater than or equal to 2i and less than 2i + 1. In other words, bucket i contains the number of key-value pairs where the combined size's most significant bit was bit i (numbering from the least significant bit and indexing from zero).
        Returns:
        an array with a distribution of the sizes of key-value pairs
      • getProportion

        public double getProportion​(double proportion)
        Get an estimate for the size for which the provided proportion of key-value pairs have a combined size that is less than that size. For example, if 0.8 is passed as the proportion, then this gives an estimate for the 80th percentile value. This value is inexact as it must be interpolated from the recorded size distribution.
        Parameters:
        proportion - the proportion of key-value pairs that should have a size less than the returned size
        Returns:
        an estimate for the size that is consistent with the given proportion
      • getMedian

        public double getMedian()
        Get an estimate for the size of the median key-value pair.
        Returns:
        an estimate for the median key-value pair
      • getP90

        public double getP90()
        Get an estimate for the size of the 90th percentile key-value pair.
        Returns:
        an estimate for the size of the 90th percentile key-value pair
      • getP95

        public double getP95()
        Get an estimate for the size of the 95th percentile key-value pair.
        Returns:
        an estimate for the size of the 95th percentile key-value pair