[
https://issues.apache.org/jira/browse/DRILL-5172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15820709#comment-15820709
]
ASF GitHub Bot commented on DRILL-5172:
---------------------------------------
Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/721#discussion_r95764706
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java
---
@@ -68,20 +68,43 @@
@Inject DrillUserPrincipal principal;
@Inject SecurityContext sc;
+ /**
+ * Returns elapsed time a human-readable format. If end time is less
than the start time, current epoch time is assumed as the end time.
+ * e.g. getPrettyDuration(1468368841695,1468394096016) = '7 hr 00 min
54.321 sec'
+ * @param startTimeMillis Start Time in milliseconds
+ * @param endTimeMillis End Time in milliseconds
+ * @return Human-Readable Elapsed Time
+ */
+ public static String getPrettyDuration(long startTimeMillis, long
endTimeMillis) {
+ long durationInMillis = ( startTimeMillis > endTimeMillis ?
System.currentTimeMillis() : endTimeMillis ) - startTimeMillis;
--- End diff --
Please remove space after -> `(startTimeMillis` and before ->
`endTimeMillis)` parenthesis.
> Display elapsed time for queries in the UI
> ------------------------------------------
>
> Key: DRILL-5172
> URL: https://issues.apache.org/jira/browse/DRILL-5172
> Project: Apache Drill
> Issue Type: Improvement
> Components: Web Server
> Affects Versions: 1.9.0
> Reporter: Kunal Khatua
> Assignee: Kunal Khatua
> Priority: Minor
> Fix For: 1.10.0
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently, the Web UI does not display the runtime for a query either in the
> list of queries or the query profile page itself.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)