Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16867#discussion_r102292628
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
    @@ -137,6 +137,12 @@ private[spark] class TaskSetManager(
       // Task index, start and finish time for each task attempt (indexed by 
task ID)
       val taskInfos = new HashMap[Long, TaskInfo]
     
    +  val successfulTasksSet = new scala.collection.mutable.TreeSet[Long] {
    --- End diff --
    
    this can't be a set, since multiple tasks might be running for the same 
amount of time.  you could change it to a set of `(time, count)` pairs, which 
would make the update logic a bit more complicated, or just keep a list of all 
runtimes.
    
    also the name should indicate that its the durations, eg. 
`successfulTaskDurations`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to