Skip to content

Commit 80184d1

Browse files
committed
Fix pprofile DurationNano to be a TypeUint64
pcommon.Timestamp better represents a point in time rather than a duration. So keeping the proto field type for DurationNano is a better fit. Signed-off-by: Florian Lehner <[email protected]>
1 parent f498a89 commit 80184d1

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

internal/cmd/pdatagen/internal/pdata/pprofile_package.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,10 @@ var profile = &messageStruct{
255255
protoID: 3,
256256
returnType: timestampType,
257257
},
258-
&TypedField{
259-
fieldName: "Duration",
260-
originFieldName: "DurationNano",
261-
protoID: 4,
262-
returnType: &TypedType{
263-
structName: "Timestamp",
264-
packageName: "pcommon",
265-
protoType: proto.TypeUint64,
266-
defaultVal: "0",
267-
testVal: "1234567890",
268-
},
258+
&PrimitiveField{
259+
fieldName: "DurationNano",
260+
protoID: 4,
261+
protoType: proto.TypeUint64,
269262
},
270263
&MessageField{
271264
fieldName: "PeriodType",

pdata/pprofile/generated_profile.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pdata/pprofile/generated_profile_test.go

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)