Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Update math formatting
  • Loading branch information
Kimahriman committed Apr 19, 2021
commit a833ee68cb390d8f91a6d23402ac93daecbc18c1
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/ui/UIUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ private[spark] object UIUtils extends Logging {
skipped: Int,
reasonToNumKilled: Map[String, Int],
total: Int): Seq[Node] = {
val ratio = if (total == 0) 100.0 else (completed.toDouble/total)*100
val ratio = if (total == 0) 100.0 else (completed.toDouble / total) * 100
val completeWidth = "width: %s%%".format(ratio)
// started + completed can be > total when there are speculative tasks
val boundedStarted = math.min(started, total - completed)
val startRatio = if (total == 0) 0.0 else (boundedStarted.toDouble/total)*100
val startRatio = if (total == 0) 0.0 else (boundedStarted.toDouble / total) * 100
val startWidth = "width: %s%%".format(startRatio)

<div class="progress">
Expand Down