kkhatua 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_r241539149
 
 

 ##########
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##########
 @@ -48,8 +48,40 @@
         "lengthChange": false,
         "paging": false,
         "info": false
-      }
-    );} );
+      });
+      //Enable Warnings by making it visible
+      checkForWarnings();
+    });
+
+    //Check for Warnings
+    function checkForWarnings() {
+      //No Progress Warning
+      let noProgressFragmentCount = 
document.querySelectorAll('td[class=no-progress-tag]').length;
+      let majorFragmentCount = document.querySelectorAll('#fragment-overview 
table tbody tr').length;
+      toggleWarning("noProgressWarning", majorFragmentCount, 
noProgressFragmentCount);
+
+      //Spill To Disk Warnings
+      let spillCount = document.querySelectorAll('td[class=spill-tag]').length;
+      toggleWarning("spillToDiskWarning", true, (spillCount > 0));
+
+      //Slow Scan Warnings
+      let longScanWaitCount = 
document.querySelectorAll('td[class=scan-wait-tag]').length;
+      toggleWarning("longScanWaitWarning", true, (longScanWaitCount > 0));
+    }
+
+    //Show Warnings
+    function toggleWarning(warningElemId, expectedVal, actualVal) {
+        if (expectedVal == actualVal) { //TODO
 
 Review comment:
   Remnant of leftover testing. Will clean it up.

----------------------------------------------------------------
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