Github user prasadns14 commented on a diff in the pull request: https://github.com/apache/drill/pull/1074#discussion_r159028202 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java --- @@ -195,23 +196,31 @@ public String getQueuedDuration() { } public String getExecutionDuration() { - //Check if State is STARTING or RUNNING + //Check if State is STARTING or ENQUEUED if (profile.getState() == QueryState.STARTING || - profile.getState() == QueryState.ENQUEUED || - profile.getState() == QueryState.RUNNING) { + profile.getState() == QueryState.ENQUEUED) { return NOT_AVAILABLE_LABEL; } + long queryEndTime; + + // Check if State is RUNNING, set end time to current time + if (profile.getState() == QueryState.RUNNING) { + queryEndTime = Time.now(); --- End diff -- made changes @paul-rogers, please review
---