Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,6 @@ public String getProfile(String id) {
}
}

public String getLastQueryId() {
return queryIdDeque.getLast();
}

public String getProfileBrief(String queryID) {
readLock.lock();
try {
Expand Down Expand Up @@ -915,4 +911,10 @@ public void markExecutionProfileFinished(TUniqueId queryId) {
readLock.unlock();
}
}

public String getLastProfileId() {
PriorityQueue<ProfileElement> queueIdDeque = getProfileOrderByQueryFinishTime();
ProfileElement profileElement = queueIdDeque.poll();
return profileElement.profile.getSummaryProfile().getProfileId();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected Object profileText(HttpServletRequest request, HttpServletResponse res

String queryId = request.getParameter("query_id");
if (Strings.isNullOrEmpty(queryId)) {
queryId = ProfileManager.getInstance().getLastQueryId();
queryId = ProfileManager.getInstance().getLastProfileId();
}

String queryProfileStr = ProfileManager.getInstance().getProfile(queryId);
Expand Down