arina-ielchiieva commented on a change in pull request #1572: DRILL-6879: Show 
warnings for potential performance issues
URL: https://github.com/apache/drill/pull/1572#discussion_r241387866
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java
 ##########
 @@ -208,15 +229,46 @@ public void addSummary(TableBuilder tb, HashMap<String, 
Long> majorFragmentBusyT
     tb.appendNanos(Math.round(setupSum / size));
     tb.appendNanos(longSetup.getLeft().getSetupNanos());
 
+    HashMap<String, String> timeSkewMap = null;
     final ImmutablePair<OperatorProfile, Integer> longProcess = 
Collections.max(opList, Comparators.processTime);
-    tb.appendNanos(Math.round(processSum / size));
-    tb.appendNanos(longProcess.getLeft().getProcessNanos());
+    long avgProcTime = Math.round(processSum / size);
+    tb.appendNanos(avgProcTime);
+    long maxProcTime = longProcess.getLeft().getProcessNanos();
+    double maxSkew = (avgProcTime > 0) ? 
maxProcTime/Double.valueOf(avgProcTime) : 0.0d;
+    if (avgProcTime > TimeUnit.SECONDS.toNanos(timeSkewMin) && maxSkew > 
timeSkewRatio ) {
+      timeSkewMap = new HashMap<String, String>();
 
 Review comment:
   <>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to