[ 
https://issues.apache.org/jira/browse/DRILL-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15854980#comment-15854980
 ] 

ASF GitHub Bot commented on DRILL-5190:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/738#discussion_r99712967
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
 ---
    @@ -122,6 +125,31 @@ public String getQueryId() {
         return id;
       }
     
    +  public String getPlanningDuration() {
    +    //Check if Plan End is valid
    +    if (profile.getStart() > profile.getPlanEnd()) {
    --- End diff --
    
    Code clarity is always a goal. One handy technique is to pick off 
conditions quickly. Here, we could do:
    ```
    if (profile.getStart() <= profile.getPlanEnd()) {
      return ProfileResources.getPrettyDuration(profile.getStart(), 
profile.getPlanEnd());
    }
    // Don't estimate...


> Display planning time for a query in its profile page
> -----------------------------------------------------
>
>                 Key: DRILL-5190
>                 URL: https://issues.apache.org/jira/browse/DRILL-5190
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Web Server
>    Affects Versions: 1.9.0
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>
> Currently, the Web UI does not display the time spent in planning for a query 
> in its profile page. The estimate needs to be done by seeing how late did the 
> earliest major fragment start. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to