Skip to content

Commit

Permalink
Fix bug in SizeTracking*
Browse files Browse the repository at this point in the history
We were not incorporating the delta in sizes, because Seq does not
match the case a :: b :: c, while List does. This was originally
reported by @mateiz.
  • Loading branch information
andrewor14 committed Jul 18, 2014
1 parent 9b9a273 commit 2b7ee66
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private[spark] trait SizeTracker {
if (samples.size > 2) {
samples.remove(0)
}
val bytesDelta = samples.toSeq.reverse match {
val bytesDelta = samples.toList.reverse match {
case latest :: previous :: tail =>
(latest.size - previous.size).toDouble / (latest.numUpdates - previous.numUpdates)
// If fewer than 2 samples, assume no change
Expand Down

0 comments on commit 2b7ee66

Please sign in to comment.