public void set(Metric<?> value) {
String name = value.getName();
if (name.startsWith("histogram")) {
long longValue = value.getValue().longValue();
Histogram metric = this.registry.histogram(name);
metric.update(longValue);
}
else if (name.startsWith("timer")) {
long longValue = value.getValue().longValue();
Timer metric = this.registry.timer(name);
metric.update(longValue, TimeUnit.MILLISECONDS);