File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
pkg/pdatatest/pprofiletest Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,9 @@ func (sa *Sample) Transform(pp pprofile.Profile) {
194
194
panic ("length of profile.sample_type must be equal to the length of sample.value" )
195
195
}
196
196
psa := pp .Sample ().AppendEmpty ()
197
- psa .SetLocationsStartIndex (int32 (pp .LocationTable ().Len ()))
197
+ psa .SetLocationsStartIndex (int32 (pp .LocationIndices ().Len ()))
198
198
for _ , loc := range sa .Locations {
199
+ pp .LocationIndices ().Append (int32 (pp .LocationIndices ().Len ()))
199
200
ploc := pp .LocationTable ().AppendEmpty ()
200
201
if loc .Mapping != nil {
201
202
loc .Mapping .Transform (pp )
@@ -212,7 +213,7 @@ func (sa *Sample) Transform(pp pprofile.Profile) {
212
213
ploc .AttributeIndices ().Append (at .Transform (pp ))
213
214
}
214
215
}
215
- psa .SetLocationsLength (int32 (pp .LocationTable ().Len ()) - psa .LocationsStartIndex ())
216
+ psa .SetLocationsLength (int32 (pp .LocationIndices ().Len ()) - psa .LocationsStartIndex ())
216
217
psa .Value ().FromRaw (sa .Value )
217
218
for _ , at := range sa .Attributes {
218
219
psa .AttributeIndices ().Append (at .Transform (pp ))
You can’t perform that action at this time.
0 commit comments