feat: remove unnecessary decoding overhead from benchmarks#4977
Conversation
Config Audit |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 62ba899 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-01 16:49:45 Comparing candidate commit 62ba899 in PR branch Found 9 performance improvements and 0 performance regressions! Performance is the same for 315 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
### 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!
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)
Motivation
Benchmarks should measure what we're actually interested in.
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!