kkhatua commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r248471725
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileResources.java
 ##########
 @@ -219,6 +219,12 @@ public int getMaxFetchedQueries() {
       return 
work.getContext().getConfig().getInt(ExecConstants.HTTP_MAX_PROFILES);
     }
 
+    public String getQueriesPerPage() {
+      List<Integer> queriesPerPageOptions = 
work.getContext().getConfig().getIntList(ExecConstants.HTTP_PROFILES_PER_PAGE);
+      Collections.sort(queriesPerPageOptions);
 
 Review comment:
   The collection is not expected to be more than may be a dozen values. 
`TreeSet` would make sense if the number of objects (and the average size) are 
large, for sake of improved performance in sorting and not needing contiguous 
memory space.
   So, sorting with the Collections util seemed more than enough.

----------------------------------------------------------------
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

Reply via email to