@Test public void testGetMetricsStopWatchWithMetricsFalse() throws Exception { MetricsStopWatch metricsStopWatch = MetricUtil.getMetricsStopWatch(false, LogLevel.OFF, WALL_CLOCK_TIME_MS); assertFalse(metricsStopWatch.getMetricsEnabled()); }
public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel, MetricType type) { if(!type.isLoggingEnabled(connectionLogLevel) && !isRequestMetricsEnabled) { return new MetricsStopWatch(false); } return new MetricsStopWatch(true); }
MetricUtil { public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel, MetricType type) { if(!type.isLoggingEnabled(connectionLogLevel) && !isRequestMetricsEnabled) { return new MetricsStopWatch(false); } return new MetricsStopWatch(true); } }
MetricUtil { public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel, MetricType type) { if(!type.isLoggingEnabled(connectionLogLevel) && !isRequestMetricsEnabled) { return new MetricsStopWatch(false); } return new MetricsStopWatch(true); }  }
MetricUtil { public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel, MetricType type) { if(!type.isLoggingEnabled(connectionLogLevel) && !isRequestMetricsEnabled) { return new MetricsStopWatch(false); } return new MetricsStopWatch(true); }  static CombinableMetric getCombinableMetric(boolean isRequestMetricsEnabled,
                                                       LogLevel connectionLogLevel,
                                                       MetricType type); static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,
                                                       LogLevel connectionLogLevel,
                                                       MetricType type); }
MetricUtil { public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled, LogLevel connectionLogLevel, MetricType type) { if(!type.isLoggingEnabled(connectionLogLevel) && !isRequestMetricsEnabled) { return new MetricsStopWatch(false); } return new MetricsStopWatch(true); }  static CombinableMetric getCombinableMetric(boolean isRequestMetricsEnabled,
                                                       LogLevel connectionLogLevel,
                                                       MetricType type); static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,
                                                       LogLevel connectionLogLevel,
                                                       MetricType type);  }