Github user d2r commented on a diff in the pull request:
https://github.com/apache/spark/pull/9051#discussion_r44837993
--- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala ---
@@ -145,9 +145,20 @@ private[ui] class StageTableBase(
case None => "Unknown"
}
val finishTime = s.completionTime.getOrElse(System.currentTimeMillis)
- val duration = s.submissionTime.map { t =>
- if (finishTime > t) finishTime - t else System.currentTimeMillis - t
- }
+ val taskLaunchTimes = stageData.taskData.values
+ .filter(_.taskInfo.launchTime != 0)
+ .map(_.taskInfo.launchTime)
--- End diff --
That is much clearer, thanks. And I'll add a comment.
I was guarding against an empty list of launch times, which could throw an
exception if `min` were called on it. Do I need to worry about that here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]