Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query task count to statistics field of QueryCompletedEvent #13334

Merged
merged 1 commit into from
Sep 5, 2019
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 @@ -164,6 +164,7 @@ public void queryImmediateFailureEvent(BasicQueryInfo queryInfo, ExecutionFailur
0,
0,
0,
0,
ImmutableList.of(),
0,
true,
Expand Down Expand Up @@ -230,6 +231,7 @@ private QueryStatistics createQueryStatistics(QueryInfo queryInfo)
ofMillis(queryStats.getTotalScheduledTime().toMillis()),
ofMillis(queryStats.getQueuedTime().toMillis()),
Optional.of(ofMillis(queryStats.getAnalysisTime().toMillis())),
queryStats.getPeakRunningTasks(),
queryStats.getPeakUserMemoryReservation().toBytes(),
queryStats.getPeakTotalMemoryReservation().toBytes(),
queryStats.getPeakTaskUserMemory().toBytes(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class QueryStatistics
private final Duration queuedTime;
private final Optional<Duration> analysisTime;

private final int peakRunningTasks;
private final long peakUserMemoryBytes;
// peak of user + system memory
private final long peakTotalNonRevocableMemoryBytes;
Expand Down Expand Up @@ -55,6 +56,7 @@ public QueryStatistics(
Duration wallTime,
Duration queuedTime,
Optional<Duration> analysisTime,
int peakRunningTasks,
long peakUserMemoryBytes,
long peakTotalNonRevocableMemoryBytes,
long peakTaskUserMemory,
Expand All @@ -77,6 +79,7 @@ public QueryStatistics(
this.wallTime = requireNonNull(wallTime, "wallTime is null");
this.queuedTime = requireNonNull(queuedTime, "queuedTime is null");
this.analysisTime = requireNonNull(analysisTime, "analysisTime is null");
this.peakRunningTasks = peakRunningTasks;
this.peakUserMemoryBytes = peakUserMemoryBytes;
this.peakTotalNonRevocableMemoryBytes = peakTotalNonRevocableMemoryBytes;
this.peakTaskUserMemory = peakTaskUserMemory;
Expand Down Expand Up @@ -116,6 +119,11 @@ public Optional<Duration> getAnalysisTime()
return analysisTime;
}

public int getPeakRunningTasks()
{
return peakRunningTasks;
}

public long getPeakUserMemoryBytes()
{
return peakUserMemoryBytes;
Expand Down