|
@@ -106,9 +106,7 @@ public class DataReportor extends ScheduledReporter {
|
|
|
|
|
|
private final Clock clock;
|
|
|
|
|
|
- private List<ReportInfo> reportInfoList = Lists.newArrayList();
|
|
|
-
|
|
|
- private int maxReportInfoSize = 10;
|
|
|
+ private ReportInfo reportInfo;
|
|
|
|
|
|
private DataReportor(MetricRegistry registry, Clock clock, TimeUnit rateUnit,
|
|
|
TimeUnit durationUnit, MetricFilter filter, ScheduledExecutorService executor,
|
|
@@ -155,11 +153,7 @@ public class DataReportor extends ScheduledReporter {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (reportInfoList.size() >= maxReportInfoSize) {
|
|
|
- reportInfoList = reportInfoList.subList(0, maxReportInfoSize);
|
|
|
- }
|
|
|
-
|
|
|
- reportInfoList.add(0, info);
|
|
|
+ reportInfo = info;
|
|
|
}
|
|
|
|
|
|
private MeterInfo getMeterInfo(String key, Meter meter) {
|
|
@@ -285,8 +279,8 @@ public class DataReportor extends ScheduledReporter {
|
|
|
return !getDisabledMetricAttributes().contains(type);
|
|
|
}
|
|
|
|
|
|
- public List<ReportInfo> getReportInfoList() {
|
|
|
- return reportInfoList;
|
|
|
+ public ReportInfo getReportInfo() {
|
|
|
+ return reportInfo;
|
|
|
}
|
|
|
|
|
|
}
|