Skip to content

Commit

Permalink
report: Fix profile count aggregation (#707)
Browse files Browse the repository at this point in the history
AddProfileEntries was creating a copy from the supplied update rather
than the global store of counts.

Signed-off-by: Charlie Egan <[email protected]>
  • Loading branch information
charlieegan3 committed May 8, 2024
1 parent 2bda636 commit d826f64
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ func (r *Report) AddProfileEntries(prof map[string]ProfileEntry) {
if _, ok := r.AggregateProfile[loc]; !ok {
r.AggregateProfile[loc] = entry
} else {
profCopy := prof[loc]
profCopy := r.AggregateProfile[loc]
profCopy.NumEval += entry.NumEval
profCopy.NumRedo += entry.NumRedo
profCopy.NumGenExpr += entry.NumGenExpr
profCopy.TotalTimeNs += entry.TotalTimeNs
profCopy.Location = entry.Location
r.AggregateProfile[loc] = profCopy
}
}
Expand Down

0 comments on commit d826f64

Please sign in to comment.