private HighResolutionClock createHighResClock(Config config) { if (new MetricsConfig(config).getMetricsTimerEnabled()) { return System::nanoTime; } else { return () -> 0; } } }
private HighResolutionClock createHighResClock(Config config) { if (new MetricsConfig(config).getMetricsTimerEnabled()) { return System::nanoTime; } else { return () -> 0; } } }
private HighResolutionClock createHighResClock(Config config) { if (new MetricsConfig(config).getMetricsTimerEnabled()) { return System::nanoTime; } else { return () -> 0; } } }
private HighResolutionClock createHighResClock(Config config) { if (new MetricsConfig(config).getMetricsTimerEnabled()) { return System::nanoTime; } else { return () -> 0; } } }
private HighResolutionClock createHighResClock(Config config) { MetricsConfig metricsConfig = new MetricsConfig(config); // The timer metrics calculation here is only enabled for debugging if (metricsConfig.getMetricsTimerEnabled() && metricsConfig.getMetricsTimerDebugEnabled()) { return System::nanoTime; } else { return () -> 0; } } }
@Override public void init(Context context) { MetricsConfig metricsConfig = new MetricsConfig(context.getJobContext().getConfig()); clock = metricsConfig.getMetricsTimerEnabled() ? () -> System.nanoTime() : () -> 0L; metrics = new TableMetrics(context, this, tableId); }
@Override public void init(Context context) { table.init(context); MetricsConfig metricsConfig = new MetricsConfig(context.getJobContext().getConfig()); if (metricsConfig.getMetricsTimerEnabled()) { TableMetricsUtil tableMetricsUtil = new TableMetricsUtil(context, this, tableId); if (isReadRateLimited()) { readRateLimiter.setTimerMetric(tableMetricsUtil.newTimer("get-throttle-ns")); } if (isWriteRateLimited()) { writeRateLimiter.setTimerMetric(tableMetricsUtil.newTimer("put-throttle-ns")); } } }