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