Repository navigation
Conversation
There was a problem hiding this comment.
AI review by Claude - workflow run
Patch is correct, with 0 blocking findings. The new well-known tag dispatch matches the old prefix-and-split logic. The stack and heap dedup paths give the same XOR keys as the old hash-set path. Skipping packed dedup when every tag hash is distinct is safe, because equal strings always have equal hashes.
There was a problem hiding this comment.
More details
Packed contexts skip deduplication only when tag hashes are distinct; repeated hashes retain the existing deduplication path. The completed static review identified no reportable defect.
🤖 Bits Code Review · Commit 94bf646
Binary Size Analysis (Agent Data Plane)Baseline: 625e229 · Comparison: 2850a6e · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
94bf646 to
1bac40e
Compare
There was a problem hiding this comment.
More details
The static review found that the hashing paths preserve duplicate-insensitive context identity and that first-byte tag classification retains existing well-known-tag behavior.
🤖 Bits Code Review · Commit 1bac40e
1bac40e to
e480326
Compare
There was a problem hiding this comment.
More details
Tag classification retains well-known-tag handling, and the packed-context shortcut keeps deduplication whenever tag hashes repeat. Runtime behavior was not exercised.
🤖 Bits Code Review · Commit e480326
e480326 to
8ba13e2
Compare
There was a problem hiding this comment.
More details
No reportable defect was identified in tag classification or stack-to-heap deduplication. Runtime correctness and the reported CPU savings were not independently validated.
🤖 Bits Code Review · Commit 8ba13e2
8ba13e2 to
8e2ddaf
Compare
There was a problem hiding this comment.
More details
The packing shortcut remains gated by repeated-tag-hash detection, preserving deduplication when duplicate tags may be present. The completed static review identified no reportable defects.
🤖 Bits Code Review · Commit 8e2ddaf
There was a problem hiding this comment.
More details
The packed-context shortcut skips deduplication only when regular-tag hashes are distinct, retaining deduplication for possible duplicates. Static review identified no reportable defects; runtime correctness and claimed CPU improvements were not independently exercised.
🤖 Bits Code Review · Commit 8d2fd81
8d2fd81 to
ff982a2
Compare
There was a problem hiding this comment.
More details
The packing optimization keeps duplicate removal enabled whenever tag hashes repeat, preserving conservative handling of duplicate tags and hash collisions. The completed static review reported no actionable defects.
🤖 Bits Code Review · Commit ff982a2
ff982a2 to
483ad61
Compare
There was a problem hiding this comment.
More details
Packed contexts skip deduplication only when the tag-hashing pass reports distinct hashes. No actionable defect was identified through static inspection; runtime behavior and the claimed CPU reductions remain unverified.
🤖 Bits Code Review · Commit 483ad61
483ad61 to
5d71e99
Compare
There was a problem hiding this comment.
More details
Context hashing retains its order- and duplicate-insensitive semantics. Packed-storage preallocation preserves tag iteration, deduplication, and layout.
🤖 Bits Code Review · Commit 5d71e99
5d71e99 to
99c4cd1
Compare
There was a problem hiding this comment.
More details
Stack and heap hashing preserve duplicate-insensitive context keys, and packing skips deduplication only when distinct tag hashes rule out duplicate tags.
🤖 Bits Code Review · Commit 99c4cd1
99c4cd1 to
ec5801b
Compare
There was a problem hiding this comment.
More details
Static review supports preserving tag classification and duplicate handling across the stack and heap paths. Runtime correctness and the claimed CPU improvements were not independently verified.
🤖 Bits Code Review · Commit ec5801b
ec5801b to
0fadfaa
Compare
There was a problem hiding this comment.
More details
An unavailable Git dependency blocked execution of the focused hashing test, so runtime equivalence remains unverified.
🤖 Bits Code Review · Commit 0fadfaa
0fadfaa to
f3cea4b
Compare
There was a problem hiding this comment.
More details
The specialist’s boundary checks support preservation of tag classification and deduplication semantics. Native Rust tests were not run, and sandbox proxy failures blocked access to the human PR discussion.
🤖 Bits Code Review · Commit f3cea4b
f3cea4b to
caa8110
Compare
There was a problem hiding this comment.
More details
Static review and boundary-model checks found no concrete defect in tag classification, hashing transitions, or packed-tag deduplication. Repository tests were not run.
🤖 Bits Code Review · Commit caa8110
caa8110 to
fc382ec
Compare
There was a problem hiding this comment.
More details
Packed contexts skip the second deduplication pass only when regular-tag hashes are distinct; repeated hashes retain it. Runtime behavior was not exercised.
🤖 Bits Code Review · Commit fc382ec
fc382ec to
6f9ed36
Compare
There was a problem hiding this comment.
More details
Duplicate tracking is preserved across stack-to-heap hashing transitions, keeping packed-tag deduplication enabled when needed. The completed static review identified no actionable defect.
🤖 Bits Code Review · Commit 6f9ed36
…tack ## Summary The DogStatsD codec checks every tag against four well-known prefixes with separate `starts_with` calls. It collects regular tags in a `SmallVec` with 32 inline slots, so a 50-tag line spills to the heap. The resolver then hashes each tag into a heap `PrehashedHashSet` to skip duplicates, and packing deduplicates the same tags again. This change dispatches on the first byte of each tag, so most tags skip every prefix check. Regular tags get 64 inline slots. Tag sets that fit deduplicate in a stack table kept at most half full, and larger sets use reusable scratch storage. When all tag hashes are distinct, packing skips its second deduplication pass. Stripped `optimized-release` Tier 1 runs show cgroup CPU falling 4.09% on SMP-500, 4.04% on 1M RUM and 7.50% on 50-tag. ## Change Type - [ ] Bug fix - [ ] New feature - [ ] Non-functional - [x] Performance ## How did you test this PR? - `cargo check --locked --workspace --tests` - `cargo test --locked -p saluki-core --lib context_hash_matches_hash_set_deduplication` - Tier 1 runs use stripped `optimized-release` builds against base `18f587f5f6` in cgroup v2, in default unbounded mode. - SMP-500 is the Saluki Single Machine Performance 3,000-context UDS case at 500 MiB/s. - 1M RUM holds 1,000,000 gauges that each carry one unique 51 B UUID tag and 4 to 10 shared tags. - 50-tag holds 1,000,000 gauges that each carry 50 tags drawn from a 100-tag shared pool. ## References - Requires: packed `Context` storage. - Required by: none. - Release note: `releasenotes/notes/dogstatsd-stack-tag-hashing-3681dfabf7d05702.yaml` ### Series overview - Context & Tag Density: pack contexts into one allocation and drop unused cache overhead. - Dense Aggregation: replace 177 B buckets with per-kind typed pages. - Resumable Flush: shrink metric buffers and interleave bounded flush chunks. - Idle Pipeline Bypass: skip inactive transforms and borrow client telemetry. - **`300m` CPU:** cut encoder, codec and worker-pool hot-path cost. - PR TBD: reuse V3 dictionary arenas and frame payloads in one pass - PR TBD: map packed tag symbols directly to V3 payload IDs - PR TBD: reuse the `zstd` context and gate per-column recompression - PR TBD: parse DogStatsD metrics in one pass and fast-path singleton scalars - **Current:** classify and deduplicate metric tags on the stack - PR TBD: size the dedicated topology worker pool to available CPUs - Memory Admission: enforce opt-in configured memory limits with idle reclaim and counted drops.
6f9ed36 to
2850a6e
Compare
There was a problem hiding this comment.
More details
Validation is limited to static analysis of tag classification, hashing, and packing. Tests were not run, and production data was intentionally excluded.
🤖 Bits Code Review · Commit 2850a6e
Summary
The DogStatsD codec checks every tag against four well-known prefixes with separate
starts_withcalls. It collects regular tags in aSmallVecwith 32 inline slots, so a 50-tag line spills to the heap. The resolver then hashes each tag into a heapPrehashedHashSetto skip duplicates, and packing deduplicates the same tags again.This change dispatches on the first byte of each tag, so most tags skip every prefix check. Regular tags get 64 inline slots. Tag sets that fit deduplicate in a stack table kept at most half full, and larger sets use reusable scratch storage. When all tag hashes are distinct, packing skips its second deduplication pass.
Stripped
optimized-releaseTier 1 runs show cgroup CPU falling 4.09% on SMP-500, 4.04% on 1M RUM and 7.50% on 50-tag.Change Type
How did you test this PR?
cargo check --locked --workspace --testscargo test --locked -p saluki-core --lib context_hash_matches_hash_set_deduplicationoptimized-releasebuilds against base18f587f5f6in cgroup v2, in default unbounded mode.References
blt/1m-16-dogstatsd-one-pass-parser)Contextstorage.releasenotes/notes/dogstatsd-stack-tag-hashing-3681dfabf7d05702.yamlSeries overview
300mCPU: cut encoder, codec and worker-pool hot-path cost.