Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/739#discussion_r99688930 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java --- @@ -73,18 +73,35 @@ * e.g. getPrettyDuration(1468368841695,1468394096016) = '7 hr 00 min 54.321 sec' * @param startTimeMillis Start Time in milliseconds * @param endTimeMillis End Time in milliseconds + * @param format Display format * @return Human-Readable Elapsed Time */ - public static String getPrettyDuration(long startTimeMillis, long endTimeMillis) { + public static String getPrettyDuration(long startTimeMillis, long endTimeMillis, DurationFormat format) { --- End diff -- It is often cleaner to just have two methods, rather than one method with a "command". Since we need to split out the data into a bunch of fields, this can be done by another method that creates a structure. Then, since you've created the structure, it might as well be the class that does the format, and offer two format methods: compact and verbose.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---