Repository navigation
Conversation
LLM ValidationLLM Validation Gate — java-agent-instructions✅ PASS
6 case(s) · quality 81.1 → 81.6 (+0.5) · win-rate 47% [44%–50%] Details — analysis and per-case resultsAnalysisChanged instruction file(s): 1 case(s) dipped but stayed within the pass bar.
Results
Cases
Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs. |
🟢 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. |
0f0e032 to
225288e
Compare
401cf0b to
f4bf924
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The completed static review found no actionable defect in the bounded canonicalization logic. Parser adoption is deferred, and timing and allocation benefits remain unverified.
🤖 Bits Code Review · Commit f4bf924
f4bf924 to
b6eda3e
Compare
There was a problem hiding this comment.
More details
Length and probe-limit fallbacks preserve text equality while allowing sharing to stop. Parser adoption is deferred, so integration behavior and performance remain unvalidated.
🤖 Bits Code Review · Commit b6eda3e
94db48f to
fc4cd13
Compare
b6eda3e to
ef3a5a2
Compare
There was a problem hiding this comment.
More details
Length and probe limits sacrifice sharing while preserving the returned text. The utility is not yet adopted by parsers, so this change does not alter existing parsing behavior.
🤖 Bits Code Review · Commit ef3a5a2
Shares one String per distinct text within one parse, from a parser's char buffer or from strings, so long-lived parsed state keeps a single copy of each repeated key, id or value. Sharing is per instance, never JVM-wide, because parsed texts can be customer data. Generalized from dd-openfeature's version (#13553) with the review fixes built in: the hashSpread multiply instead of h ^ (h >>> 16), a bound on equal-hash comparisons so input built from colliding strings can't make each lookup compare against all the others, and a length limit above which texts are neither hashed nor shared. StringCanonicalizerBenchmark compares it with plain new String, a HashMap interner and the original version, over generated keys, random ids and colliding strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fc4cd13 to
10d466d
Compare
ef3a5a2 to
d7001a0
Compare
There was a problem hiding this comment.
More details
The length and probe limits preserve text equality when sharing is skipped, with no actionable defects reported by the static reviewer. Parser adoption is deferred, so integration behavior remains unvalidated.
🤖 Bits Code Review · Commit d7001a0
What Does This Do
Adds
datadog.trace.util.StringCanonicalizertocomponents/toolbox. It shares oneStringinstance per distinct text within one parse.canonical(char[], offset, length)reads from a parser's character buffer and allocates only on a text's first occurrence.canonical(String)serves parsers that only hand out strings. Both share one table.Two bounds keep the cost of a parse predictable, whatever the input:
maxLength(default 128) are neither hashed nor shared.Giving up only costs sharing: the result is always equal to the text.
Adds
StringCanonicalizerBenchmark(internal-api JMH).Motivation
Long-lived parsed state, such as a configuration that stays in the old generation until the next one replaces it, pays for every duplicate string in memory and in marking work for as long as it lives. dd-openfeature's version (#13553) takes the
scaleflag configuration from 27.4 to 21.3 MB retained (−22% bytes, −30% objects), and allocates 4.6% less per parse. Remote config, sampling rules and probe configurations also keep parsed JSON for a long time, so this is a shared need.This is the generalized version, with the review findings on #13553 fixed:
HashingUtils.hashSpread(Spread StringIndex hashes so sequential names don't cluster (FFE optimization) #13576) instead ofh ^ (h >>> 16), which clusters generated keys likescale-bulk-NNNNNunder linear probing.Aa/BBblocks). With Share equal strings within a parsed feature flag configuration (FFE optimization) #13553's unbounded probing, input made of them compares each lookup against all the others, which is quadratic per parse. The bound caps that at 16 comparisons per lookup.scale-json(the other two are the spread and, in the parser, not canonicalizing JSON field names). Long values rarely repeat, so hashing them buys little. How much of the +23% it recovers is unmeasured, since that needs the dd-openfeature adoption.Sharing stays per instance. It is never JVM-wide like
String.intern(), because parsed texts can be customer data, such as targeting ids.Measured (Bits,
StringCanonicalizerBenchmark, JDK 21, 3 forks per arm, 4 threads, 3×5 s warmup and 5×5 s measurement,-prof gc, steal median 0.3%). Per token: median fork in ns [fork range], then B:newStringcanonicalizerhashMaporiginal(#13553)new Stringdoes at 4 repeats, and 1/3 of aHashMapinterner. It's above the ideal 0.25× because of the table's growth (String[]andint[]doubling), about 6–13 B per token.new Stringper token (+50–90 ns). It's paid while parsing, and it's on par with aHashMapinterner (±10–16%) on keys and ids.Additional Notes
hashSpread), which is stacked on Extract the perf toolbox into a dependency-free components/toolbox module (FFE optimization) #13531 (the toolbox module).MembershipIndex.StringTable(a second hand-written string table with the same clustering), is a follow-up, so Share equal strings within a parsed feature flag configuration (FFE optimization) #13553 doesn't depend on the toolbox stack.intcomparison. The 256-slot bound is only a backstop.FlatHashtableentries: this keeps the table to two arrays, with no extra object per distinct text during a parse.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue🤖 Generated with Claude Code