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_r241386490
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/FragmentWrapper.java
##########
@@ -118,15 +133,23 @@ public void addSummary(TableBuilder tb) {
tb.appendMillis(cumulativeFragmentDurationInMillis / complete.size());
tb.appendMillis(longRun.getEndTime() - longRun.getStartTime());
- tb.appendPercent(totalProcessInMillis / (totalProcessInMillis +
totalWaitInMillis), null,
- //#8721 is the summation sign: sum(Busy): ## + sum(Wait): ##
+ HashMap<String, String> percBusyAttrMap = new HashMap<String, String>();
+ //#8721 is the summation sign: sum(Busy): ## + sum(Wait): ##
+ percBusyAttrMap.put(HtmlAttribute.TITLE,
String.format("∑Busy: %,.2fs + ∑Wait: %,.2fs",
totalProcessInMillis/1E3, totalWaitInMillis/1E3));
+ tb.appendPercent(totalProcessInMillis / (totalProcessInMillis +
totalWaitInMillis), percBusyAttrMap);
final MinorFragmentProfile lastUpdate = Collections.max(complete,
Comparators.lastUpdate);
tb.appendMillis(System.currentTimeMillis()-lastUpdate.getLastUpdate());
final MinorFragmentProfile lastProgress = Collections.max(complete,
Comparators.lastProgress);
- tb.appendMillis(System.currentTimeMillis()-lastProgress.getLastProgress());
+ long elapsedSinceLastProgress =
System.currentTimeMillis()-lastProgress.getLastProgress();
+ HashMap<String, String> lastProgressAttrMap = null;
+ if (elapsedSinceLastProgress >
TimeUnit.SECONDS.toMillis(runningProfileProgressThreshold)) {
+ lastProgressAttrMap = 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