From 8e957c7ecd418a3bd43f3e3239aca6425a3bb513 Mon Sep 17 00:00:00 2001 From: bkhan Date: Mon, 4 Mar 2024 22:43:26 +0800 Subject: [PATCH] display run time --- .../src/main/scala/org/apache/spark/ui/EnginePage.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala index 67f8f30d34b..d59b64dd9d2 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/ui/EnginePage.scala @@ -402,6 +402,7 @@ 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)) @@ -429,6 +430,7 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") { {formatDate(session.startTime)} {if (session.endTime > 0) formatDate(session.endTime)} {formatDuration(session.duration)} + {formatDuration(session.sessionRunTime)} {formatDuration(session.sessionCpuTime / 1000000)} {session.totalOperations} @@ -486,6 +488,7 @@ 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), @@ -526,6 +529,7 @@ private class StatementStatsPagedTable( {formatDuration(event.duration)} + {formatDuration(event.operationRunTime.getOrElse(0L))} {formatDuration(event.operationCpuTime.getOrElse(0L) / 1000000)} @@ -596,6 +600,7 @@ 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") @@ -632,6 +637,7 @@ 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)