private void printHistogram(KeyValueStats stats) {
      Histogram histogram = stats.getHistogram();
      Snapshot snapshot = histogram.getSnapshot();

      output.printf(locale, "               min = %d%n", stats.getMin());
      output.printf(locale, "               max = %d%n", stats.getMax());
      output.printf(locale, "              mean = %2.2f%n", snapshot.getMean());
      output.printf(locale, "            stddev = %2.2f%n", snapshot.getStdDev());
      output.printf(locale, "            median = %2.2f%n", snapshot.getMedian());
      output.printf(locale, "              75%% <= %2.2f%n", snapshot.get75thPercentile());
      output.printf(locale, "              95%% <= %2.2f%n", snapshot.get95thPercentile());
      output.printf(locale, "              98%% <= %2.2f%n", snapshot.get98thPercentile());
      output.printf(locale, "              99%% <= %2.2f%n", snapshot.get99thPercentile());
      output.printf(locale, "            99.9%% <= %2.2f%n", snapshot.get999thPercentile());
      output.printf(locale, "             count = %d%n", histogram.getCount());

      // if printStatRanges was enabled with -d arg, below we'll create an approximate histogram
      // of counts based on the configured ranges in RANGES. Each range of sizes (i.e. <= 50, <=
      // 100, etc) will have a count printed if any values were seen in that range. If no values
      // were seen for a range, that range will be excluded to keep the output small.
      if (stats.hasRangeCounts()) {
        output.printf(locale, "           (range <= count):%n");
        long lastVal = 0;
        long lastRange = 0;
        for (long range : stats.getRanges()) {
          long val = stats.getCountAtOrBelow(range);
          if (val - lastVal > 0) {
            // print the last zero value before this one, to give context
            if (lastVal == 0 && lastRange != 0) {
              printRangeCount(lastRange, lastVal);
            }
            printRangeCount(range, val - lastVal);
          }
          lastVal = val;
          lastRange = range;
        }
        if (histogram.getCount() - lastVal > 0) {
          // print any remaining that might have been outside our buckets
          printRangeCount(Long.MAX_VALUE, histogram.getCount() - lastVal);
        }
      }
    }
Builds a {@link ConsoleReporter} with the given properties.
@return a {@link ConsoleReporter}
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java