@@ -36,42 +36,42 @@ func GenerateProfilesOneEmptyProfile() pprofile.Profiles {
3636
3737func GenerateProfilesOneProfile () pprofile.Profiles {
3838 pd := GenerateProfilesOneEmptyProfile ()
39- fillProfileOne (pd .ResourceProfiles ().At (0 ).ScopeProfiles ().At (0 ).Profiles ().At (0 ))
39+ fillProfileOne (pd .ProfilesDictionary (), pd . ResourceProfiles ().At (0 ).ScopeProfiles ().At (0 ).Profiles ().At (0 ))
4040 return pd
4141}
4242
4343func GenerateProfilesTwoProfilesSameResource () pprofile.Profiles {
4444 pd := GenerateProfilesOneEmptyProfile ()
4545 profiles := pd .ResourceProfiles ().At (0 ).ScopeProfiles ().At (0 ).Profiles ()
46- fillProfileOne (profiles .At (0 ))
47- fillProfileTwo (profiles .AppendEmpty ())
46+ fillProfileOne (pd . ProfilesDictionary (), profiles .At (0 ))
47+ fillProfileTwo (pd . ProfilesDictionary (), profiles .AppendEmpty ())
4848 return pd
4949}
5050
51- func fillProfileOne (profile pprofile.Profile ) {
51+ func fillProfileOne (dic pprofile. ProfilesDictionary , profile pprofile.Profile ) {
5252 profile .SetStartTime (TestProfileStartTimestamp )
5353 profile .SetProfileID ([16 ]byte {0x01 , 0x02 , 0x03 , 0x04 })
5454
5555 profile .AttributeIndices ().Append (0 )
56- a := profile .AttributeTable ().AppendEmpty ()
56+ a := dic .AttributeTable ().AppendEmpty ()
5757 a .SetKey ("app" )
5858 a .Value ().SetStr ("server" )
5959 profile .AttributeIndices ().Append (0 )
60- a = profile .AttributeTable ().AppendEmpty ()
60+ a = dic .AttributeTable ().AppendEmpty ()
6161 a .SetKey ("instance_num" )
6262 a .Value ().SetInt (1 )
6363}
6464
65- func fillProfileTwo (profile pprofile.Profile ) {
65+ func fillProfileTwo (dic pprofile. ProfilesDictionary , profile pprofile.Profile ) {
6666 profile .SetStartTime (TestProfileStartTimestamp )
6767 profile .SetProfileID ([16 ]byte {0x05 , 0x06 , 0x07 , 0x08 })
6868
6969 profile .AttributeIndices ().Append (0 )
70- a := profile .AttributeTable ().AppendEmpty ()
70+ a := dic .AttributeTable ().AppendEmpty ()
7171 a .SetKey ("customer" )
7272 a .Value ().SetStr ("acme" )
7373 profile .AttributeIndices ().Append (0 )
74- a = profile .AttributeTable ().AppendEmpty ()
74+ a = dic .AttributeTable ().AppendEmpty ()
7575 a .SetKey ("env" )
7676 a .Value ().SetStr ("dev" )
7777}
0 commit comments