Class BoundedHistogram


  • public class BoundedHistogram
    extends Object
    A histogram that keeps a maximum number of buckets (entries). When the histogram is at the limit, it will reject new entries but keep updating the count of the existing entries. Therefore, the counts for the entries in the histogram are correct but if the histogram overflowed, it may be missing some entries.
    • Constructor Detail

      • BoundedHistogram

        public BoundedHistogram​(String name,
                                int maxHistogramSize)
    • Method Detail

      • addEntry

        public void addEntry​(String key)
      • isOverflowed

        public boolean isOverflowed()
      • prettyPrint

        public String prettyPrint()
      • prettyPrintTopEntries

        public String prettyPrintTopEntries​(int numEntries)