Repository navigation
Conversation
Contributor
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. |
This was referenced Nov 19, 2026
Draft
…dule Moves the toolbox primitives that have no dependencies outside the JDK out of internal-api, with their tests: Hashtable, FlatHashtable, StringIndex, ChunkedBuffer, Cursor, Maybe, the hashing utilities, BitUtils and FNV64Hash, plus the contract annotations and the Strategy, StrategyConsumer and NoEscape markers. Package names do not change, and internal-api re-exports the module, so callers are unchanged. Strings.caseInsensitiveHashCode moves to HashingUtils, which FlatHashtable uses. Strings keeps the method and delegates to it. The agent's shared and per-product jars exclude the module, as they do the other bootstrap components, so each class is packaged once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The moved classes passed under internal-api's thresholds (0.7 branch, 0.8 instruction). The new module got the 0.9 default instead, which failed coverage verification for seven of them. Using internal-api's thresholds keeps enforcement exactly as it was before the move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 19, 2026 21:24
3d4204f to
8dd30e7
Compare
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 19, 2026 21:24
dc0a80f to
af61b74
Compare
Nothing calls the Strings delegate, so drop it and move its test next to HashingUtils. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 19, 2026 22:38
8dd30e7 to
cdda826
Compare
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 19, 2026 22:41
af61b74 to
741cd7d
Compare
This was referenced Nov 19, 2026
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 20, 2026 13:36
741cd7d to
53bec3c
Compare
…cies The toolbox was extracted from internal-api, so it keeps the strict core performance rules in AGENTS.md and the perf-review posture. Its lockfile now covers the test configurations too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 20, 2026 13:39
89895cd to
8c81722
Compare
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 20, 2026 13:39
53bec3c to
17e1eaa
Compare
LLM ValidationLLM Validation Gate — java-agent-instructions✅ PASS
6 case(s) · quality 81.1 → 81.4 (+0.3) · win-rate 50% [47%–53%] Details — analysis and per-case resultsAnalysisChanged instruction file(s): No safety or blocking-case regressions across 6 case(s). Overall pairwise win-rate 50% [47%–53%], quality +0.3 — see the verdict above for whether that clears the noise band. Results
Cases
Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs. |
It only depends on toolbox classes, plus TriFunction, which moves with it in the same package, as Strategy did. internal-api exposes the toolbox as an api dependency, so its users compile unchanged. The size-manager test polls the thread state itself rather than through test-utils, so the toolbox tests keep junit as their only dependency, and hashIterator gets a direct test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 20, 2026 20:50
8c81722 to
6ac4db5
Compare
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 20, 2026 20:50
17e1eaa to
53df754
Compare
ConcurrentHashtable, StringIndex and FlatHashtable are on master and now live in components/toolbox; StringCanonicalizer and LruTable are coming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 20, 2026 21:32
6ac4db5 to
0e0d85e
Compare
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 20, 2026 21:32
53df754 to
a9c8f34
Compare
EscapeShapeBenchmark's arms are mergeWithStatic and mergeOfTwoAllocations now, and "merge of several allocations" replaces the compiler term "phi". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dd-openfeature is published on its own and must work with any attached agent version, so it can't depend on the toolbox module. Instead its published jar carries a relocated copy of the toolbox classes it uses, under com.datadog.openfeature.internal.shaded, and Shadow's minimize() drops the classes it doesn't reach. The Shadow plugin is not applied: publish.gradle would then list only api dependencies in the POM and drop opentelemetry-api. A ShadowJar task replaces the jar of the java component's apiElements and runtimeElements instead, so the publication and its POM are unchanged. The plain jar moves to the "unbundled" classifier, and the japicmp checks compare the published jar. checkToolboxRelocation, run by check, fails if an unrelocated toolbox class reaches the jar. Nothing in the SDK uses the toolbox yet, so the published jar has the same entries as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compareToReferenceJar (jardiff) compares the module's jar task output unless the Shadow plugin is applied. Here the plain jar moved to the "unbundled" classifier and toolboxJar became the published jar, so the check looked for an unbundled jar the reference set doesn't have. It now compares the published, shaded jar; a clean rebuild matches it byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI runs :dd-openfeature:jar and collects build/libs/*.jar, but jar now builds the unbundled jar into build/libs-unbundled, which left nothing for validate_build, the S3 upload or system-tests. jar is now finalized by toolboxJar, which writes the shaded jar to build/libs. The shaded jar also takes the plain jar's manifest, so it keeps the Implementation-* attributes the jar convention sets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One entry per subject, keyed by flag and subject without a key object, updated in place and linked in LRU order: a lookup allocates nothing, and a full cache holds one object per subject instead of three. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: dougqh <dougqh@gmail.com>
At full capacity its bucket array is 512 KiB, a humongous allocation on a small G1 heap, which a client that records no exposures should not pay for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 21, 2026 03:53
0e0d85e to
676974d
Compare
dougqh
force-pushed
the
dougqh/ffe-exposure-cache
branch
from
November 21, 2026 03:53
a9c8f34 to
8064973
Compare
dougqh
force-pushed
the
dougqh/ffe-toolbox-shading
branch
from
November 24, 2026 02:04
676974d to
97180eb
Compare
This branch has not been deployed
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 Do
Moves
ExposureDeduplicationCachefrom an access-orderedLinkedHashMaponto the toolbox'sHashtable.D2, keyed by flag and subject:Exposure) holds both keys, the last allocation, variant and serial id, and its links in the least-recently-used order. Before, each subject cost aLinkedHashMapentry, aKeyand aSent.containsandrecordIfChangedlook up by the two strings without a key object, andrecordIfChangedupdates the entry in place when the exposure changes. Before, each call built aKey, aSentand the varargs array ofObjects.hash.Motivation
The cache is long-lived: once a service has seen 65,536 subjects, it stays full. Every object it holds is old-generation state that each marking cycle has to walk. Per subject, with compressed oops:
LinkedHashMapentry (40 B),Key(24 B),Sent(24 B)Exposure(56 B)Key,Sent, anObject[2]The "after" sizes come from a class histogram at the end of a benchmark run: 65,536
Exposureinstances, 3,670,016 B. The "before" sizes are computed from the field layouts. The bucket array has 131,072 slots either way.Measured on its own by Bits: this PR's head before the review follow-ups (
af61b74853) against #13532's head (8dd30e7901). Both sides get the same benchmark-only overlay (#13529'sClientEvaluationBenchmarkand aconsentparam). Unique subjects, JDK 21.0.12,-prof gc; base, #13533, #13534 and #13535 forks rotate fork by fork, so those PRs share the base runs. "Noise" means the fork ranges overlap.Retained size of a full cache (65,536 entries, JOL):
256 MB heap, average time (5 forks at 1 thread, 3 at 4 threads):
scale/flagsscale/flagsscale/splitsscale/splits128 MB heap, G1, 4 threads, throughput (3 forks; per million evaluations, whole fork from the GC logs):
scale/flagsscale/splitsscale/splits: −17% GC ms per million evaluations at 1 thread, and −10% pause on the small heap.Additional Notes
Hashtableclasses.ExposureDeduplicationCacheTestpasses unchanged, including the LRU tests. The coverage exclusions forKeyandSentare removed with those classes.dd-openfeaturetests pass, and Spotless, SpotBugs (spotbugsMain,spotbugsTest,spotbugsJmh) andcheckToolboxRelocationpass. The sandbox run on the earlier base had 1,609 tests: Benchmark FFE evaluation on the scale suites #13485 adds the scale-suite tests.ConcurrentHashtable, socontainsreads without the lock. With 4 threads, JFR showed 61 contended enters (86 ms) on this cache's lock in 11 s, and every hit rewrites up to 6 link fields.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 issueJira ticket: [PROJ-IDENT]
Review follow-ups
Hashtable.D2table is created on the first recorded exposure. At full capacity its bucket array is 512 KiB, a humongous allocation on a small G1 heap, which a client that records no exposures no longer pays for.🤖 Generated with Claude Code