send(producer, header, topic, message);
}
public void processHistogram(MetricName name, Histogram histogram, Context context) {
final String header = "# time,min,max,mean,median,stddev,95%,99%,99.9%";
final Producer producer = context.getProducer();
final Snapshot snapshot = histogram.getSnapshot();
final String topic="%s-metrics-histogram".format(prefix);
final String message = valueOf(histogram.min()) + ',' + histogram.max() + ',' + histogram.mean() + ','
+ snapshot.getMedian() + ',' + histogram.stdDev() + ',' + snapshot.get95thPercentile() + ',' + snapshot.get99thPercentile() + ','
+ snapshot.get999thPercentile();