|
@@ -25,26 +25,26 @@ import com.codahale.metrics.Snapshot;
|
|
|
import com.codahale.metrics.Timer;
|
|
|
|
|
|
/**
|
|
|
- * 类注释
|
|
|
+ * 数据报告
|
|
|
*
|
|
|
* @author WANGWEI
|
|
|
* @date 2019年7月25日
|
|
|
* @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
|
*/
|
|
|
-public class ApiStatusReportor extends ScheduledReporter {
|
|
|
+public class DataReportor extends ScheduledReporter {
|
|
|
/**
|
|
|
- * Returns a new {@link Builder} for {@link ApiStatusReportor}.
|
|
|
+ * Returns a new {@link Builder} for {@link DataReportor}.
|
|
|
*
|
|
|
* @param registry
|
|
|
* the registry to report
|
|
|
- * @return a {@link Builder} instance for a {@link ApiStatusReportor}
|
|
|
+ * @return a {@link Builder} instance for a {@link DataReportor}
|
|
|
*/
|
|
|
public static Builder forRegistry(MetricRegistry registry) {
|
|
|
return new Builder(registry);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * A builder for {@link ApiStatusReportor} instances. Defaults to using the
|
|
|
+ * A builder for {@link DataReportor} instances. Defaults to using the
|
|
|
* default locale and time zone, writing to {@code System.out}, converting
|
|
|
* rates to events/second, converting durations to milliseconds, and not
|
|
|
* filtering metrics.
|
|
@@ -215,12 +215,12 @@ public class ApiStatusReportor extends ScheduledReporter {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Builds a {@link ApiStatusReportor} with the given properties.
|
|
|
+ * Builds a {@link DataReportor} with the given properties.
|
|
|
*
|
|
|
- * @return a {@link ApiStatusReportor}
|
|
|
+ * @return a {@link DataReportor}
|
|
|
*/
|
|
|
- public ApiStatusReportor build() {
|
|
|
- return new ApiStatusReportor(registry, output, locale, clock, timeZone, rateUnit,
|
|
|
+ public DataReportor build() {
|
|
|
+ return new DataReportor(registry, output, locale, clock, timeZone, rateUnit,
|
|
|
durationUnit, filter, executor, shutdownExecutorOnStop,
|
|
|
disabledMetricAttributes);
|
|
|
}
|
|
@@ -236,9 +236,9 @@ public class ApiStatusReportor extends ScheduledReporter {
|
|
|
|
|
|
private final DateFormat dateFormat;
|
|
|
|
|
|
- private ApiStatusReportor(MetricRegistry registry, PrintStream output, Locale locale,
|
|
|
- Clock clock, TimeZone timeZone, TimeUnit rateUnit, TimeUnit durationUnit,
|
|
|
- MetricFilter filter, ScheduledExecutorService executor, boolean shutdownExecutorOnStop,
|
|
|
+ private DataReportor(MetricRegistry registry, PrintStream output, Locale locale, Clock clock,
|
|
|
+ TimeZone timeZone, TimeUnit rateUnit, TimeUnit durationUnit, MetricFilter filter,
|
|
|
+ ScheduledExecutorService executor, boolean shutdownExecutorOnStop,
|
|
|
Set<MetricAttribute> disabledMetricAttributes) {
|
|
|
super(registry, "console-reporter", filter, rateUnit, durationUnit, executor,
|
|
|
shutdownExecutorOnStop, disabledMetricAttributes);
|