Id-keyed TagMap.set(long) + insertion-comparison benchmark#11901
Draft
dougqh wants to merge 1 commit into
Draft
Conversation
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
267ebad to
56550cb
Compare
set(long id, Object value) is the id-keyed insertion path: the caller passes a resolved KnownTags id, so it skips the keyOf name resolution the set(String, ...) methods pay and stores densely. The id must be a stored known-tag id; custom names have no id and use the name-keyed setters. The name is resolved lazily only to clear a read-through tombstone (rare). Adds TagMapInsertionComparisonBenchmark (dense vs HashMap insertion, -prof gc) — the isolated micro where the dense store + bloom insertion win shows, and the home for the id-keyed vs string-keyed comparison. Reconciled onto the tag registry (#11961). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
f0cb351 to
7e3ed31
Compare
|
🎯 Code Coverage (details) 🔗 Commit SHA: 7e3ed31 | Docs | Datadog PR Page | Give us feedback! |
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
On top of the bloom fast-path (#11900):
TagMap.set(long id, Object)— the id-keyed insertion path: given a resolvedKnownTags.*_ID, store densely and skipkeyOfname resolution. SoleTagMapimpl (OptimizedTagMap); the id must be a stored known id (custom names keep the name setters).TagMapInsertionComparisonBenchmark— HashMap / 1.0-bucket / 2.0-name / 2.0-id, alloc + throughput; the numbers behind the deck's slides 3/7/8.Results (idle box,
-prof gc -f 5 -wi 5 -i 5; persisted in the benchmark header)hashMaptagMapByIdtagMapByNametagMapCustom(1.0 bucket)id==name(the bloom/dense win is CPU, not alloc).fieldPos & 63.Scope
Minimal id API (TagMap level). Full
AgentSpan.setTag(long)+ theKnownTagscall-site migration are follow-ons.set(long)has no production caller yet — by design, it lands with its benchmark evidence ahead of the migration that consumes it (each PR stands alone in sequence).Stacking
#11814 (dense storage) → #11900 (bloom) → this (id API + comparison benchmark).
Follow-ups
TagMap.Ledger+SpanBuilderid support; per-type graph coloring; master run to pin true-1.0 (nokeyOf).🤖 Generated with Claude Code