Skip to content

Add Thread.sleep TaskBlock profiling instrumentation#11546

Draft
kaahos wants to merge 3 commits into
masterfrom
paul.fournillon/wallclock-threadsleep-taskblock
Draft

Add Thread.sleep TaskBlock profiling instrumentation#11546
kaahos wants to merge 3 commits into
masterfrom
paul.fournillon/wallclock-threadsleep-taskblock

Conversation

@kaahos

@kaahos kaahos commented Jun 3, 2026

Copy link
Copy Markdown

What Does This Do

Adds TaskBlock profiling for Thread.sleep and TimeUnit.sleep by rewriting sleep call sites and emitting deferred TaskBlock events with profiling context.

Motivation

Capturing sleep intervals as TaskBlock events makes that waiting time explicit in wall-clock profiles.

Additional Notes

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@datadog-datadog-prod-us1

This comment has been minimized.

@kaahos
kaahos force-pushed the paul.fournillon/wallclock-threadsleep-taskblock branch 6 times, most recently from 6773517 to 9518481 Compare June 9, 2026 00:26
@kaahos
kaahos force-pushed the paul.fournillon/wallclock-threadsleep-taskblock branch 2 times, most recently from cb6ac2e to 3813d16 Compare June 14, 2026 22:42
@kaahos
kaahos force-pushed the paul.fournillon/wallclock-threadsleep-taskblock branch 7 times, most recently from a17800d to 3b2438e Compare July 9, 2026 14:07
@dd-octo-sts

dd-octo-sts Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🔴 Java Benchmark SLOs — Performance SLO breach detected

Suite Status
Startup 🔴 breach

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.73 s 14.56 s [+0.4%; +1.9%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.49 s 13.68 s [-2.2%; -0.6%] (maybe better)
startup:petclinic:appsec:Agent 16.74 s 16.19 s [-1.1%; +7.8%] (no difference)
startup:petclinic:iast:Agent 16.92 s 16.92 s [-1.0%; +1.0%] (no difference)
startup:petclinic:profiling:Agent 16.71 s 16.54 s [-0.2%; +2.3%] (no difference)
startup:petclinic:sca:Agent 16.40 s 16.72 s [-6.3%; +2.5%] (no difference)
startup:petclinic:tracing:Agent 16.06 s 16.25 s [-2.0%; -0.3%] (maybe better)

Commit: 6d440fc6 · 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.

@kaahos
kaahos force-pushed the paul.fournillon/wallclock-threadsleep-taskblock branch 8 times, most recently from 820b25c to 6d440fc Compare July 9, 2026 22:31
@kaahos
kaahos force-pushed the paul.fournillon/wallclock-threadsleep-taskblock branch from 6d440fc to 3506c4e Compare July 16, 2026 14:49
@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

❌ New Groovy Files Detected

Please avoid introducing new .groovy files to this repository.

  • dd-java-agent/instrumentation/datadog/profiling/lock-support/src/test/groovy/LockSupportProfilingDisabledForkedTest.groovy
  • dd-java-agent/instrumentation/datadog/profiling/lock-support/src/test/groovy/LockSupportProfilingInstrumentationForkedTest.groovy

Instead, rewrite the new file(s) in Java / JUnit. See the How to Test With JUnit Guide for more details.

If this PR needs an exception, add the tag: override groovy enforcement label to bypass this workflow.

@kaahos
kaahos force-pushed the paul.fournillon/wallclock-threadsleep-taskblock branch from 3506c4e to 576b153 Compare July 17, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant