private void reportHistogram(String name, HistogramMetric histogram, long timestamp)
     throws IOException {
   send(MetricRegistry.name(prefix, name, "min"), format(histogram.min), timestamp);
   send(MetricRegistry.name(prefix, name, "max"), format(histogram.max), timestamp);
   send(MetricRegistry.name(prefix, name, "mean"), format(histogram.mean), timestamp);
   for (Entry<Double, Long> pct : histogram.pcts.entrySet()) {
     send(
         MetricRegistry.name(prefix, name, format(pct.getKey()).replace('.', '_')),
         format(pct.getValue()),
         timestamp);
   }
 }
  private void reportTimer(String name, TimerMetric timer, long timestamp) throws IOException {
    send(
        MetricRegistry.name(prefix, name, "count"),
        format(timer.counterMetric.lastCount),
        timestamp);

    send(MetricRegistry.name(prefix, name, "min"), format(timer.histogramMetric.min), timestamp);
    send(MetricRegistry.name(prefix, name, "max"), format(timer.histogramMetric.max), timestamp);
    send(MetricRegistry.name(prefix, name, "mean"), format(timer.histogramMetric.mean), timestamp);
    for (Entry<Double, Long> pct : timer.histogramMetric.pcts.entrySet()) {
      send(
          MetricRegistry.name(prefix, name, format(pct.getKey()).replace('.', '_')),
          format(pct.getValue()),
          timestamp);
    }
  }
 private void reportCounter(String name, CounterMetric counter, long timestamp)
     throws IOException {
   send(MetricRegistry.name(prefix, name, "count"), format(counter.lastCount), timestamp);
 }