Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 43309e4

Browse files
authored
Fixes mapping slice insertion (#479)
1 parent 27bb8d1 commit 43309e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/phlaredb/sample_merge.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ func (b *singleBlockQuerier) resolvePprofSymbols(ctx context.Context, stacktrace
221221
model.A.BuildID = names[stringsIds[model.B.BuildId]]
222222
}
223223

224-
mappingResult := make([]*profile.Mapping, len(mappingIDs))
225-
for i, model := range mappingIDs {
226-
mappingResult[i] = model.A
224+
mappingResult := make([]*profile.Mapping, 0, len(mappingIDs))
225+
for _, model := range mappingIDs {
226+
mappingResult = append(mappingResult, model.A)
227227
}
228228

229229
for id, model := range stacktraceAggrByID {

0 commit comments

Comments
 (0)