Commit Graph

12 Commits

Author SHA1 Message Date
Bogdan Drutu cbe449b18a
[chore] Implement pooling support for oneOf messages (#13692)
Updates
https://github.com/open-telemetry/opentelemetry-collector/issues/13631

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-22 23:51:08 +00:00
Bogdan Drutu 313db34110
Optimize CopyTo messages to avoid any copy when same source and destination (#13680)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-21 11:19:29 +00:00
Bogdan Drutu 6db7374e2f
Add support for local memory pooling for data objects (#13678)
This feature is protected by a featuregate that is not yet enabled and
only marked as alpha. Preliminary results show > 20% CPU performance
improvement and at least 40% allocations improvement. I still need to
generate UnmarshalProto for AnyValue which should improve even more
results.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-21 03:19:49 +00:00
Bogdan Drutu caed03a4d1
[chore] Move UnmarshalJSON to use the ProtoField to generate (#13675)
Also, this PR improves JSON unmarshal logic by avoiding stack calls
caused by using the Read[Array|Object]CB and replace with simple
non-recursive iterations.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-19 20:47:42 +00:00
Bogdan Drutu 5d5ada5d6a
[chore] Remove internal.NewOrig* that returns directly the value (#13676)
The only non-test change is in the Unmarshal proto but that generates
exactly the same code using the "defaultValue" for the message.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-19 19:14:04 +00:00
Bogdan Drutu 6db802a019
[chore] Enhance TestEncodingValues to test for all cases (#13667)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-19 16:47:43 +00:00
Bogdan Drutu 5934839229
[chore] Call NewOrig* func instead of manually create new objects (#13646)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-15 21:45:34 +00:00
Bogdan Drutu b302feba10
[chore] Re-write the internal.State in pdata to support multiple properties. (#13633)
Part of
https://github.com/open-telemetry/opentelemetry-collector/issues/13631

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-15 16:38:54 +00:00
Bogdan Drutu eb9588bb3b
[chore] Fix custom marshaling code to preserve arrays order (#13641)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-14 18:03:50 +00:00
Bogdan Drutu 9b90d9f910
[chore] Generate custom proto unmarshal (#13626)
Benchmark results are in
https://github.com/open-telemetry/opentelemetry-collector/pull/13602

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-14 03:50:41 +00:00
Bogdan Drutu 787ae29ad2
[chore] pdatagen: Change JSON marshal to directly use the ProtoFields (#13616)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-11 20:40:52 +00:00
Bogdan Drutu 72f03cf4c0
Generate Logs/Traces/Metrics and ExportResponse (#13597)
This removes lots of hand written JSON encoding code, and will help when
start using generated proto size/marshal/unmarshal.

This also adds tests for all previously hand written funcs.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2025-08-11 15:48:56 +00:00