use of org.apache.storm.metric.internal.MultiLatencyStatAndMetric in project storm by apache.
the class CommonStats method valueStats.
protected Map valueStats(String[] fields) {
Map ret = new HashMap();
for (String field : fields) {
IMetric metric = this.get(field);
if (metric instanceof MultiCountStatAndMetric) {
StatsUtil.putKV(ret, field, ((MultiCountStatAndMetric) metric).getTimeCounts());
} else if (metric instanceof MultiLatencyStatAndMetric) {
StatsUtil.putKV(ret, field, ((MultiLatencyStatAndMetric) metric).getTimeLatAvg());
}
}
StatsUtil.putKV(ret, CommonStats.RATE, this.getRate());
return ret;
}
Aggregations