Repository navigation
Add a late-attach Kafka benchmark that times the JIT invalidations an attach causes (macrobenchmark) - #13769
Draft
dougqh wants to merge 3 commits into
Draft
Add a late-attach Kafka benchmark that times the JIT invalidations an attach causes (macrobenchmark)#13769dougqh wants to merge 3 commits into
dougqh wants to merge 3 commits into
Conversation
… attach causes Attaches the agent to an already-warm consumer, keeps consuming past the next periodic metadata refresh, and reports throughput per second against the JIT's made-not-entrant events around the attach and around the refresh (where lookup-based header access becomes available). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without one, every trace send fails and the tracer runs its error path in every arm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared stub serves a real Agent's /info, so the tracer computes client-side stats and drops unsampled traces as in production; the local one 404'd /info. Also record what the stub received per endpoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 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
Adds
run-late-attach.shto the Kafka macro benchmark. It attaches the agent to a consumer that is already warm, keeps consuming past the consumer's next periodic metadata refresh, and reports what each event costs:For each event it reports which Kafka, tracer and benchmark methods the JIT invalidates (
made not entrant, flagging the app's own code), the worst second, the throughput lost over the next 30 s, and the time to recover.New files in
dd-java-agent/benchmark-integration/kafka/:LateAttachConsumer.java: a consumer that reads the prefilled topic in a loop and writes throughput for each second of JVM uptime. It also logs when the agent's classes appear and whenRecordHeaderAccess.accesschanges.Attach.java: loads an agent jar into a running JVM.run-late-attach.sh: starts the shared Agent stub (../agent-stub, a real Agent's/info) when no Agent listens onTRACE_AGENT_PORT, and runs the variants (NoAgentorlabel=agent.jar) with order rotating every rep. It captures-XX:+PrintCompilation, GC logs and Kafka's metadata updates (DEBUG, shifted onto JVM uptime) for each run.AnalyzeLateAttach.java: lines the throughput series, events, metadata refreshes and invalidations up per run.Motivation
Measures the late-attach path discussed in #13737 and #13656, the case lookup-based header access is designed to support. That PR's benchmarks cover steady state with the agent present from startup, so this fills the gap.
Additional Notes
broker.sh/prefill.sh, not Add a one-command containerized Kafka benchmark (macrobenchmark) #13757's containers: the Speedlab workload behind those can't attach an agent mid-run without a change there.kafka-clients-3.8instrumentation needs JDK 17+.metadata.max.age.ms, 8-minute runs, 3 reps.METADATA_MAX_AGE_MSshortens runs for a quick look, but the refresh has to land well after the attach has settled to separate the two events.-javaagent. The tracer reads them when it initializes after the attach.🤖 Generated with Claude Code