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

[KYUUBI #6108] Display the CPU time consumed by the statement in the Spark Engine tab #6113

Closed
Closed
Changes from 3 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 @@ -402,6 +402,8 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
("Start Time", true, None),
("Finish Time", true, None),
("Duration", true, None),
("Run Time", true, None),
("CPU Time", true, None),
("Total Statements", true, None))

headerStatRow(
Expand All @@ -428,6 +430,8 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
<td> {formatDate(session.startTime)} </td>
<td> {if (session.endTime > 0) formatDate(session.endTime)} </td>
<td> {formatDuration(session.duration)} </td>
<td> {formatDuration(session.sessionRunTime)} </td>
<td> {formatDuration(session.sessionCpuTime / 1000000)} </td>
<td> {session.totalOperations} </td>
</tr>
}
Expand Down Expand Up @@ -484,6 +488,8 @@ private class StatementStatsPagedTable(
("Create Time", true, None),
("Finish Time", true, None),
("Duration", true, None),
("Run Time", true, None),
("CPU Time", true, None),
("Statement", true, None),
("State", true, None),
("Query Details", true, None),
Expand Down Expand Up @@ -523,6 +529,8 @@ private class StatementStatsPagedTable(
<td >
{formatDuration(event.duration)}
</td>
<td> {formatDuration(event.operationRunTime.getOrElse(0L))} </td>
<td> {formatDuration(event.operationCpuTime.getOrElse(0L) / 1000000)} </td>
<td>
<span class="description-input">
{event.statement}
Expand Down Expand Up @@ -592,6 +600,8 @@ private class SessionStatsTableDataSource(
case "Start Time" => Ordering.by(_.startTime)
case "Finish Time" => Ordering.by(_.endTime)
case "Duration" => Ordering.by(_.duration)
case "Run Time" => Ordering.by(_.sessionRunTime)
case "CPU Time" => Ordering.by(_.sessionCpuTime)
case "Total Statements" => Ordering.by(_.totalOperations)
case unknownColumn => throw new IllegalArgumentException(s"Unknown column: $unknownColumn")
}
Expand Down Expand Up @@ -627,6 +637,8 @@ private class StatementStatsTableDataSource(
case "Create Time" => Ordering.by(_.createTime)
case "Finish Time" => Ordering.by(_.completeTime)
case "Duration" => Ordering.by(_.duration)
case "Run Time" => Ordering.by(_.operationRunTime.getOrElse(0L))
case "CPU Time" => Ordering.by(_.operationCpuTime.getOrElse(0L))
case "Statement" => Ordering.by(_.statement)
case "State" => Ordering.by(_.state)
case "Query Details" => Ordering.by(_.executionId)
Expand Down
Loading