fix: reduce heap allocations introduced by ETP#4960
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 9034d27 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-01 18:31:15 Comparing candidate commit 9034d27 in PR branch Found 8 performance improvements and 0 performance regressions! Performance is the same for 316 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
f5e9205 to
5e2fc07
Compare
Config Audit |
0af971e to
1d4e5fc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de1ac4fccb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
### What does this PR do? Replaces the decoder for certain benchmarks with a simple buffer read. Imitates a real HTTP request, but without additional decoding work that would interfere with what we actually want to benchmark (*encoding*) <!-- * A brief description of the change being made with this pull request. * If the description here cannot be expressed in a succinct form, consider opening multiple pull requests instead of a single one. --> ### Motivation Benchmarks should measure what we're actually interested in. <!-- * What inspired you to submit this pull request? * Link any related GitHub issues or PRs here. * If this resolves a GitHub issue, include "Fixes #XXXX" to link the issue and auto-close it on merge. --> ### Reviewer's Checklist <!-- * Authors can use this list as a reference to ensure that there are no problems during the review but the signing off is to be done by the reviewer(s). --> - [ ] Changed code has unit tests for its functionality at or near 100% coverage. - [ ] [System-Tests](https://github.com/DataDog/system-tests/) covering this feature have been added and enabled with the va.b.c-dev version tag. - [ ] There is a benchmark for any new code, or changes to existing code. - [ ] If this interacts with the agent in a new way, a system test has been added. - [ ] New code is free of linting errors. You can check this by running `make lint` locally. - [ ] New code doesn't break existing tests. You can check this by running `make test` locally. - [ ] Add an appropriate team label so this PR gets put in the right place for the release notes. - [ ] All generated files are up to date. You can check this by running `make generate` locally. - [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running `make fix-modules` locally. Unsure? Have a question? Request a review!
2fce544 to
9034d27
Compare
What does this PR do?
No longer includes decoding code in benchmarks, making measurements more accurate to what we actually care about (encoding payloads).
Partially or fully reverts the regressions from this PR.
Motivation
Reduce memory overhead of ETP benchmarks AND make benchmarks more accurate to real life customer data. Decoding does not happen in a customer app, but rather in the backend/agent. Having decoding measured as part of a benchmark's life cycle is not realistic or usually helpful.
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!