Skip to content

Avoid queue-timing metadata reads before JFR is ready - #12550

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/skip-ineligible-queue-timing
Sep 21, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/skip-ineligible-queue-timing

Conversation

@amarziali

@amarziali amarziali commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

ThreadPoolExecutor instrumentation collected queue metadata before the timer helper checked whether JFR was ready. Move that readiness check ahead of metadata collection, preserving trace propagation and delayed profiling startup.

Avoiding queue.size() also avoids unnecessary lock acquisition—and potential blocking under contention—for queues such as ArrayBlockingQueue and PriorityBlockingQueue.

Share the readiness predicate through QueueTimerHelper, retaining its native-image exclusion and defensive check for other callers.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added the tag: override groovy enforcement Override the "Enforce Groovy Migration" check label Sep 17, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 0.00%
• Overall Coverage: 62.79% (+3.69%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4bae9f2 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.80 s 14.77 s [-0.6%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 13.67 s 13.76 s [-1.6%; +0.4%] (no difference)
startup:petclinic:appsec:Agent 17.09 s 16.95 s [-0.2%; +1.9%] (no difference)
startup:petclinic:iast:Agent 16.94 s 17.00 s [-1.1%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.51 s 16.87 s [-3.1%; -1.1%] (significantly better)
startup:petclinic:sca:Agent 16.87 s 16.85 s [-0.8%; +1.0%] (no difference)
startup:petclinic:tracing:Agent 16.09 s 15.59 s [-1.1%; +7.5%] (no difference)

Commit: 4bae9f2b · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@amarziali
amarziali marked this pull request as ready for review September 17, 2026 16:21
@amarziali
amarziali requested review from a team as code owners September 17, 2026 16:21
@amarziali
amarziali requested review from ValentinZakharov and bric3 and removed request for a team September 17, 2026 16:21
@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-17T16:24:43.250696Z 4bae9f2 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-17T16:24:48.240982Z 4bae9f2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@amarziali amarziali added type: feature Enhancements and improvements comp: profiling Profiling labels Sep 17, 2026
@amarziali
amarziali requested a review from jbachorik September 17, 2026 16:21

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The readiness guard runs before queue type and size reads. The defensive helper guard stays in place for other callers.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 4bae9f2 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@jbachorik jbachorik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@bric3 bric3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tweak !

@amarziali
amarziali added this pull request to the merge queue Sep 21, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-21 07:18:27 UTC ℹ️ Start processing command /merge


2026-09-21 07:18:32 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-09-21 08:31:23 UTC ❌ MergeQueue: The build pipeline failed for this merge request

Build pipeline has failing jobs for 9e18cc4:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 21, 2026
@amarziali
amarziali added this pull request to the merge queue Sep 21, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-21 09:39:56 UTC ℹ️ Start processing command /merge


2026-09-21 09:40:00 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-09-21 10:52:15 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 21, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit d5c61ec into master Sep 21, 2026
831 of 838 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the andrea.marziali/skip-ineligible-queue-timing branch September 21, 2026 10:52
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: profiling Profiling tag: override groovy enforcement Override the "Enforce Groovy Migration" check type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants