From a46e228c64da0ae841e0e191fe270f5ef12949d5 Mon Sep 17 00:00:00 2001 From: Karthik Kumarguru Date: Wed, 21 Oct 2020 15:00:08 -0700 Subject: [PATCH] Fix bug where collector startTime is in nanoseconds --- .../collectors/PerformanceAnalyzerMetricsCollector.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/collectors/PerformanceAnalyzerMetricsCollector.java b/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/collectors/PerformanceAnalyzerMetricsCollector.java index edca6155d..5ab62b1cf 100644 --- a/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/collectors/PerformanceAnalyzerMetricsCollector.java +++ b/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/collectors/PerformanceAnalyzerMetricsCollector.java @@ -54,7 +54,6 @@ public void setStartTime(long startTime) { public void run() { try { - long startTime = System.nanoTime(); Util.invokePrivileged(() -> collectMetrics(startTime)); } catch (Exception ex) { // - should not be any...but in case, absorbing here @@ -66,7 +65,6 @@ public void run() { () -> StatExceptionCode.OTHER_COLLECTION_ERROR.toString()); StatsCollector.instance().logException(StatExceptionCode.OTHER_COLLECTION_ERROR); } finally { - LOG.debug("{} took {} time to execute", collectorName, System.nanoTime() - startTime); bInProgress.set(false); } }