Id-keyed TagMap.set(long) + insertion-comparison benchmark (phase 2)#11901
Id-keyed TagMap.set(long) + insertion-comparison benchmark (phase 2)#11901dougqh wants to merge 1 commit into
Conversation
🟢 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
f0cb351 to
7e3ed31
Compare
|
🎯 Code Coverage (details) 🔗 Commit SHA: 3295baa | Docs | Datadog PR Page | Give us feedback! |
ad3c1f7 to
369a591
Compare
Bits has a CI fix ready🟢 Investigated · 🟢 Fix prepared · ⚪ Validation skipped · 🟠 Ready The dense-tag initialization comment in View in Datadog | Reviewed commit 3295baa · Any feedback? Reach out in #deveng-pr-agent |
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>
7e3ed31 to
3295baa
Compare
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