use of org.opendaylight.infrautils.metrics.MetricDescriptor in project genius by opendaylight.
the class DataStoreMetrics method initCounter.
private Meter initCounter(String type) {
String className = clazz.getSimpleName();
// expects the form org.opendaylight.project.module
String project = clazz.getName().split("\\.")[2];
String module = clazz.getName().split("\\.")[3];
return metricProvider.newMeter(new MetricDescriptor() {
@Override
public Object anchor() {
return this;
}
@Override
public String project() {
return project;
}
@Override
public String module() {
return module;
}
@Override
public String id() {
return className + type;
}
});
}
Aggregations