test(trace-utils): add V05 msgpack decode microbenchmark#2127
Draft
yannham wants to merge 1 commit into
Draft
Conversation
Adds a criterion microbenchmark for the V05 msgpack decode path (msgpack_decoder::v05::from_bytes), which exercises the shared-string dictionary dedup step that was previously uncovered. Benches both wall-time and bytes-allocated across span counts and string-sharing ratios (high vs low sharing), since the dictionary lookup-and-clone cost is the point of interest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
📚 Documentation Check Results📦
|
Contributor
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
Contributor
🔒 Cargo Deny Results📦
|
|
Contributor
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a criterion microbenchmark for the V05 msgpack decode path (
msgpack_decoder::v05::from_bytes) inlibdd-trace-utils. It is wired into the existingbenches/main.rsharness as a new module, so it runs under the sameReportingAllocatoras the other benches and contributes both a wall-time group (msgpack_decoder::v05) and a bytes-allocated group (msgpack_decoder::v05 (allocs)).Motivation
Only the V04 decode path was benched. The V05 wire format encodes a shared string dictionary up front and every span references its string fields (service, name, resource, type, and every meta/metrics key/value) by index into that dictionary. Decode therefore performs a dictionary lookup-and-clone per string slot, which is real per-span work on the agent ingestion hot path and had zero benchmark coverage.
Additional Notes
Throughput::Bytesis meaningful within a series but not directly comparable across the sharing dimension (high/low payloads differ greatly in encoded size); this is documented in the bench.Cargo.tomlis intentionally untouched to avoid conflicting with the sibling vecmap PR.How to test the change?
🤖 Generated with Claude Code