Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use slices of pointers in pprofile #11339

Merged
merged 10 commits into from
Oct 3, 2024
20 changes: 20 additions & 0 deletions .chloggen/pprofile-slice-ptrs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'breaking'

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: pdata/pprofile

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Replace slices of values to slices of pointers for the `Mapping`, `Location`, `Line`, `Function`, `AttributeUnit`, `Link`, `Value`, `Sample` and `Labels` attributes.

# One or more tracking issues or pull requests related to the change
issues: [11339]

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [api]
18 changes: 9 additions & 9 deletions pdata/internal/cmd/pdatagen/internal/pprofile_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ var profile = &messageValueStruct{
},
}

var valueTypeSlice = &sliceOfValues{
var valueTypeSlice = &sliceOfPtrs{
structName: "ValueTypeSlice",
element: valueType,
}
Expand Down Expand Up @@ -261,7 +261,7 @@ var valueType = &messageValueStruct{
},
}

var sampleSlice = &sliceOfValues{
var sampleSlice = &sliceOfPtrs{
structName: "SampleSlice",
element: sample,
}
Expand Down Expand Up @@ -318,7 +318,7 @@ var sample = &messageValueStruct{
},
}

var labelSlice = &sliceOfValues{
var labelSlice = &sliceOfPtrs{
structName: "LabelSlice",
element: label,
}
Expand Down Expand Up @@ -355,7 +355,7 @@ var label = &messageValueStruct{
},
}

var mappingSlice = &sliceOfValues{
var mappingSlice = &sliceOfPtrs{
structName: "MappingSlice",
element: mapping,
}
Expand Down Expand Up @@ -441,7 +441,7 @@ var mapping = &messageValueStruct{
},
}

var locationSlice = &sliceOfValues{
var locationSlice = &sliceOfPtrs{
structName: "LocationSlice",
element: location,
}
Expand Down Expand Up @@ -492,7 +492,7 @@ var location = &messageValueStruct{
},
}

var lineSlice = &sliceOfValues{
var lineSlice = &sliceOfPtrs{
structName: "LineSlice",
element: line,
}
Expand Down Expand Up @@ -523,7 +523,7 @@ var line = &messageValueStruct{
},
}

var functionSlice = &sliceOfValues{
var functionSlice = &sliceOfPtrs{
structName: "FunctionSlice",
element: function,
}
Expand Down Expand Up @@ -567,7 +567,7 @@ var function = &messageValueStruct{
},
}

var attributeUnitSlice = &sliceOfValues{
var attributeUnitSlice = &sliceOfPtrs{
structName: "AttributeUnitSlice",
element: attributeUnit,
}
Expand All @@ -592,7 +592,7 @@ var attributeUnit = &messageValueStruct{
},
}

var linkSlice = &sliceOfValues{
var linkSlice = &sliceOfPtrs{
structName: "LinkSlice",
element: link,
}
Expand Down

Large diffs are not rendered by default.

34 changes: 25 additions & 9 deletions pdata/pprofile/generated_attributeunitslice.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 22 additions & 5 deletions pdata/pprofile/generated_attributeunitslice_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 25 additions & 9 deletions pdata/pprofile/generated_functionslice.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 22 additions & 5 deletions pdata/pprofile/generated_functionslice_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading