@@ -368,25 +368,26 @@ func TestProfilesRoundTrip(t *testing.T) {
368
368
369
369
func CreateTestProfiles () pprofile.Profiles {
370
370
profiles := pprofile .NewProfiles ()
371
+ dic := profiles .ProfilesDictionary ()
371
372
resource := profiles .ResourceProfiles ().AppendEmpty ()
372
373
scope := resource .ScopeProfiles ().AppendEmpty ()
373
374
profile := scope .Profiles ().AppendEmpty ()
374
375
375
- profile .StringTable ().Append ("samples" , "count" , "cpu" , "nanoseconds" )
376
+ dic .StringTable ().Append ("samples" , "count" , "cpu" , "nanoseconds" )
376
377
st := profile .SampleType ().AppendEmpty ()
377
378
st .SetTypeStrindex (0 )
378
379
st .SetUnitStrindex (1 )
379
380
pt := profile .PeriodType ()
380
381
pt .SetTypeStrindex (2 )
381
382
pt .SetUnitStrindex (3 )
382
383
383
- a := profile .AttributeTable ().AppendEmpty ()
384
+ a := dic .AttributeTable ().AppendEmpty ()
384
385
a .SetKey ("process.executable.build_id.htlhash" )
385
386
a .Value ().SetStr ("600DCAFE4A110000F2BF38C493F5FB92" )
386
- a = profile .AttributeTable ().AppendEmpty ()
387
+ a = dic .AttributeTable ().AppendEmpty ()
387
388
a .SetKey ("profile.frame.type" )
388
389
a .Value ().SetStr ("native" )
389
- a = profile .AttributeTable ().AppendEmpty ()
390
+ a = dic .AttributeTable ().AppendEmpty ()
390
391
a .SetKey ("host.id" )
391
392
a .Value ().SetStr ("localhost" )
392
393
@@ -396,10 +397,10 @@ func CreateTestProfiles() pprofile.Profiles {
396
397
sample .TimestampsUnixNano ().Append (0 )
397
398
sample .SetLocationsLength (1 )
398
399
399
- m := profile .MappingTable ().AppendEmpty ()
400
+ m := dic .MappingTable ().AppendEmpty ()
400
401
m .AttributeIndices ().Append (0 )
401
402
402
- l := profile .LocationTable ().AppendEmpty ()
403
+ l := dic .LocationTable ().AppendEmpty ()
403
404
l .SetMappingIndex (0 )
404
405
l .SetAddress (111 )
405
406
l .AttributeIndices ().Append (1 )
0 commit comments