-
Notifications
You must be signed in to change notification settings - Fork 57
Weight stage duration average by task count #2147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -968,15 +968,17 @@ case class StageAggTaskMetricsProfileResult( | |
| def aggregateStageProfileMetric( | ||
| other: StageAggTaskMetricsProfileResult | ||
| ): StageAggTaskMetricsProfileResult = { | ||
| val mergedNumTasks = this.numTasks + other.numTasks | ||
| val mergedDurationSum = this.durationSum + other.durationSum | ||
| StageAggTaskMetricsProfileResult( | ||
| id = this.id, | ||
| numTasks = this.numTasks + other.numTasks, | ||
| numTasks = mergedNumTasks, | ||
| duration = Option(this.duration.getOrElse(0L) + other.duration.getOrElse(0L)), | ||
| diskBytesSpilledSum = this.diskBytesSpilledSum + other.diskBytesSpilledSum, | ||
| durationSum = this.durationSum + other.durationSum, | ||
| durationSum = mergedDurationSum, | ||
| durationMax = Math.max(this.durationMax, other.durationMax), | ||
| durationMin = Math.min(this.durationMin, other.durationMin), | ||
| durationAvg = (this.durationAvg + other.durationAvg) / 2, | ||
| durationAvg = ToolUtils.calculateAverage(mergedDurationSum, mergedNumTasks, 1), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is character-for-character what |
||
| executorCPUTimeSum = this.executorCPUTimeSum + other.executorCPUTimeSum, | ||
| executorDeserializeCpuTimeSum = this.executorDeserializeCpuTimeSum + | ||
| other.executorDeserializeCpuTimeSum, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging for awareness; no change requested here. An attempt that ran zero tasks still produces a row, and
finalizeAggregationcallsresetFields()whennumTasks < 1, which setsdurationMinto 0.Math.min(0, x)then publishes 0 as the stage minimum. Measured: a stage whose only task took 907 ms reportsduration_minof 0 once a second attempt is submitted and aborted before any task end, in an otherwise complete log. Your fix makesdurationAvgimmune to this, which leavesdurationMinthe last field in this merge that a zero-task attempt corrupts.Filed separately as #2151.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for isolating and filing this. I have kept the zero-task
durationMinbehavior out of this PR and referenced #2151 in the updated description.