Skip to content

Conversation

@PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Oct 24, 2025

What Does This Do

This PR improves the environment component to be able to check for virtual threads support.

EDIT: Support was already added in #9537 then this PR only brings few additional elements compared to the original ThreadUtils:

  • A syntactic sugar helper for threadId() with current thread
  • Expose the newVirtualThreadPerTaskExecutor() ExecutorServices to allow its usage from core
  • Use JavaVirtualMachine.isJavaVersionAtLeast() instead of JavaVersion.getRuntimeVersion().isAtLeast() to avoid parsing version number multiple times
  • Change name from ThreadUtils to the ThreadSupport as there are already two ThreadUtils classes (datadog.trace.ThreadUtils and datadog.trace.agent.test.utils.ThreadUtils)

Motivation

With the adoption of modern Java versions, we will need to check for virtual threads to avoid expensive per-thread work or memory allocation (like ThreadLocals).

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@PerfectSlayer PerfectSlayer added the type: enhancement Enhancements and improvements label Oct 24, 2025
@PerfectSlayer PerfectSlayer requested a review from a team as a code owner October 24, 2025 08:32
@PerfectSlayer PerfectSlayer added the comp: platform Platform components label Oct 24, 2025
@PerfectSlayer PerfectSlayer requested review from amarziali and removed request for a team October 24, 2025 08:32
@datadog-official
Copy link

datadog-official bot commented Oct 24, 2025

🎯 Code Coverage
Patch Coverage: 0.00%
Total Coverage: 59.24% (-0.44%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 29b3509 | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Oct 24, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-virtual-threads
git_commit_date 1761260114 1761303991
git_commit_sha f296927 29b3509
release_version 1.55.0-SNAPSHOT~f296927f57 1.55.0-SNAPSHOT~29b3509c96
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1761305964 1761305964
ci_job_id 1195877901 1195877901
ci_pipeline_id 80199021 80199021
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-tszots1c 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-tszots1c 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 11 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.033 s) : 0, 1033165
Total [baseline] (10.839 s) : 0, 10839460
Agent [candidate] (1.034 s) : 0, 1034038
Total [candidate] (10.874 s) : 0, 10873513
section appsec
Agent [baseline] (1.216 s) : 0, 1215976
Total [baseline] (11.024 s) : 0, 11023741
Agent [candidate] (1.211 s) : 0, 1211033
Total [candidate] (10.942 s) : 0, 10942040
section iast
Agent [baseline] (1.17 s) : 0, 1169944
Total [baseline] (11.205 s) : 0, 11204540
Agent [candidate] (1.167 s) : 0, 1167471
Total [candidate] (11.135 s) : 0, 11134979
section profiling
Agent [baseline] (1.174 s) : 0, 1174303
Total [baseline] (11.057 s) : 0, 11056562
Agent [candidate] (1.177 s) : 0, 1177355
Total [candidate] (10.907 s) : 0, 10906766
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.033 s -
Agent appsec 1.216 s 182.811 ms (17.7%)
Agent iast 1.17 s 136.779 ms (13.2%)
Agent profiling 1.174 s 141.138 ms (13.7%)
Total tracing 10.839 s -
Total appsec 11.024 s 184.28 ms (1.7%)
Total iast 11.205 s 365.079 ms (3.4%)
Total profiling 11.057 s 217.102 ms (2.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.034 s -
Agent appsec 1.211 s 176.995 ms (17.1%)
Agent iast 1.167 s 133.433 ms (12.9%)
Agent profiling 1.177 s 143.317 ms (13.9%)
Total tracing 10.874 s -
Total appsec 10.942 s 68.527 ms (0.6%)
Total iast 11.135 s 261.466 ms (2.4%)
Total profiling 10.907 s 33.253 ms (0.3%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.476 ms) : 0, 1476
BytebuddyAgent [baseline] (703.659 ms) : 0, 703659
BytebuddyAgent [candidate] (705.946 ms) : 0, 705946
GlobalTracer [baseline] (245.919 ms) : 0, 245919
GlobalTracer [candidate] (244.969 ms) : 0, 244969
AppSec [baseline] (32.533 ms) : 0, 32533
AppSec [candidate] (32.119 ms) : 0, 32119
Debugger [baseline] (6.427 ms) : 0, 6427
Debugger [candidate] (6.365 ms) : 0, 6365
Remote Config [baseline] (680.088 µs) : 0, 680
Remote Config [candidate] (678.272 µs) : 0, 678
Telemetry [baseline] (13.865 ms) : 0, 13865
Telemetry [candidate] (15.315 ms) : 0, 15315
Flare Poller [baseline] (7.37 ms) : 0, 7370
Flare Poller [candidate] (5.793 ms) : 0, 5793
section appsec
crashtracking [baseline] (1.5 ms) : 0, 1500
crashtracking [candidate] (1.469 ms) : 0, 1469
BytebuddyAgent [baseline] (736.554 ms) : 0, 736554
BytebuddyAgent [candidate] (731.528 ms) : 0, 731528
GlobalTracer [baseline] (237.433 ms) : 0, 237433
GlobalTracer [candidate] (237.611 ms) : 0, 237611
IAST [baseline] (25.182 ms) : 0, 25182
IAST [candidate] (25.316 ms) : 0, 25316
AppSec [baseline] (175.077 ms) : 0, 175077
AppSec [candidate] (174.875 ms) : 0, 174875
Debugger [baseline] (5.929 ms) : 0, 5929
Debugger [candidate] (5.931 ms) : 0, 5931
Remote Config [baseline] (623.631 µs) : 0, 624
Remote Config [candidate] (632.551 µs) : 0, 633
Telemetry [baseline] (8.389 ms) : 0, 8389
Telemetry [candidate] (8.525 ms) : 0, 8525
Flare Poller [baseline] (3.88 ms) : 0, 3880
Flare Poller [candidate] (3.897 ms) : 0, 3897
section iast
crashtracking [baseline] (1.475 ms) : 0, 1475
crashtracking [candidate] (1.517 ms) : 0, 1517
BytebuddyAgent [baseline] (830.148 ms) : 0, 830148
BytebuddyAgent [candidate] (828.648 ms) : 0, 828648
GlobalTracer [baseline] (235.279 ms) : 0, 235279
GlobalTracer [candidate] (234.668 ms) : 0, 234668
IAST [baseline] (31.047 ms) : 0, 31047
IAST [candidate] (31.73 ms) : 0, 31730
AppSec [baseline] (30.853 ms) : 0, 30853
AppSec [candidate] (29.971 ms) : 0, 29971
Debugger [baseline] (6.217 ms) : 0, 6217
Debugger [candidate] (6.138 ms) : 0, 6138
Remote Config [baseline] (619.175 µs) : 0, 619
Remote Config [candidate] (610.837 µs) : 0, 611
Telemetry [baseline] (8.626 ms) : 0, 8626
Telemetry [candidate] (8.591 ms) : 0, 8591
Flare Poller [baseline] (4.221 ms) : 0, 4221
Flare Poller [candidate] (4.123 ms) : 0, 4123
section profiling
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (726.176 ms) : 0, 726176
BytebuddyAgent [candidate] (729.089 ms) : 0, 729089
GlobalTracer [baseline] (219.914 ms) : 0, 219914
GlobalTracer [candidate] (221.428 ms) : 0, 221428
AppSec [baseline] (32.315 ms) : 0, 32315
AppSec [candidate] (32.319 ms) : 0, 32319
Debugger [baseline] (12.472 ms) : 0, 12472
Debugger [candidate] (12.848 ms) : 0, 12848
Remote Config [baseline] (1.484 ms) : 0, 1484
Remote Config [candidate] (690.095 µs) : 0, 690
Telemetry [baseline] (10.001 ms) : 0, 10001
Telemetry [candidate] (9.866 ms) : 0, 9866
Flare Poller [baseline] (4.172 ms) : 0, 4172
Flare Poller [candidate] (4.135 ms) : 0, 4135
ProfilingAgent [baseline] (111.005 ms) : 0, 111005
ProfilingAgent [candidate] (110.035 ms) : 0, 110035
Profiling [baseline] (111.677 ms) : 0, 111677
Profiling [candidate] (110.685 ms) : 0, 110685
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.041 s) : 0, 1040849
Total [baseline] (8.679 s) : 0, 8679426
Agent [candidate] (1.033 s) : 0, 1032503
Total [candidate] (8.697 s) : 0, 8697280
section iast
Agent [baseline] (1.163 s) : 0, 1162863
Total [baseline] (9.375 s) : 0, 9374611
Agent [candidate] (1.164 s) : 0, 1164180
Total [candidate] (9.354 s) : 0, 9354247
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.041 s -
Agent iast 1.163 s 122.014 ms (11.7%)
Total tracing 8.679 s -
Total iast 9.375 s 695.185 ms (8.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.033 s -
Agent iast 1.164 s 131.676 ms (12.8%)
Total tracing 8.697 s -
Total iast 9.354 s 656.967 ms (7.6%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.463 ms) : 0, 1463
BytebuddyAgent [baseline] (710.754 ms) : 0, 710754
BytebuddyAgent [candidate] (703.544 ms) : 0, 703544
GlobalTracer [baseline] (246.489 ms) : 0, 246489
GlobalTracer [candidate] (245.848 ms) : 0, 245848
AppSec [baseline] (32.684 ms) : 0, 32684
AppSec [candidate] (32.477 ms) : 0, 32477
Debugger [baseline] (6.395 ms) : 0, 6395
Debugger [candidate] (6.402 ms) : 0, 6402
Remote Config [baseline] (693.467 µs) : 0, 693
Remote Config [candidate] (675.696 µs) : 0, 676
Telemetry [baseline] (14.533 ms) : 0, 14533
Telemetry [candidate] (14.435 ms) : 0, 14435
Flare Poller [baseline] (6.441 ms) : 0, 6441
Flare Poller [candidate] (6.424 ms) : 0, 6424
section iast
crashtracking [baseline] (1.486 ms) : 0, 1486
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (824.376 ms) : 0, 824376
BytebuddyAgent [candidate] (825.049 ms) : 0, 825049
GlobalTracer [baseline] (234.229 ms) : 0, 234229
GlobalTracer [candidate] (234.962 ms) : 0, 234962
IAST [baseline] (30.068 ms) : 0, 30068
IAST [candidate] (33.824 ms) : 0, 33824
AppSec [baseline] (31.839 ms) : 0, 31839
AppSec [candidate] (28.13 ms) : 0, 28130
Debugger [baseline] (6.102 ms) : 0, 6102
Debugger [candidate] (6.163 ms) : 0, 6163
Remote Config [baseline] (603.322 µs) : 0, 603
Remote Config [candidate] (598.312 µs) : 0, 598
Telemetry [baseline] (8.559 ms) : 0, 8559
Telemetry [candidate] (8.516 ms) : 0, 8516
Flare Poller [baseline] (4.177 ms) : 0, 4177
Flare Poller [candidate] (4.155 ms) : 0, 4155
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-virtual-threads
git_commit_date 1761260114 1761303991
git_commit_sha f296927 29b3509
release_version 1.55.0-SNAPSHOT~f296927f57 1.55.0-SNAPSHOT~29b3509c96
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1761305626 1761305626
ci_job_id 1195877902 1195877902
ci_pipeline_id 80199021 80199021
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-8qr8qdgl 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-8qr8qdgl 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 2 performance improvements and 3 performance regressions! Performance is the same for 7 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:no_agent:high_load worse
[+107.995µs; +212.229µs] or [+2.611%; +5.131%]
unstable
[-158.846op/s; +78.408op/s] or [-14.338%; +7.078%]
4.296ms 1067.625op/s 4.136ms 1107.844op/s
scenario:load:insecure-bank:iast:high_load worse
[+432.627µs; +787.014µs] or [+4.633%; +8.427%]
unstable
[-86.225op/s; +26.037op/s] or [-17.353%; +5.240%]
9.949ms 466.781op/s 9.339ms 496.875op/s
scenario:load:insecure-bank:iast_FULL:high_load better
[-935.331µs; -314.336µs] or [-6.303%; -2.118%]
unstable
[-20.270op/s; +47.458op/s] or [-6.452%; +15.106%]
14.215ms 327.750op/s 14.840ms 314.156op/s
scenario:load:petclinic:no_agent:high_load better
[-1.628ms; -0.985ms] or [-4.345%; -2.630%]
unstable
[-4.809op/s; +13.809op/s] or [-3.855%; +11.070%]
36.164ms 129.238op/s 37.470ms 124.737op/s
scenario:load:petclinic:tracing:high_load worse
[+0.929ms; +1.719ms] or [+2.138%; +3.955%]
unstable
[-11.127op/s; +4.852op/s] or [-10.339%; +4.508%]
44.783ms 104.487op/s 43.459ms 107.625op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.136 ms) : 4088, 4185
.   : milestone, 4136,
iast (9.339 ms) : 9179, 9499
.   : milestone, 9339,
iast_FULL (14.84 ms) : 14545, 15135
.   : milestone, 14840,
iast_GLOBAL (10.691 ms) : 10500, 10881
.   : milestone, 10691,
profiling (8.905 ms) : 8758, 9053
.   : milestone, 8905,
tracing (7.863 ms) : 7739, 7986
.   : milestone, 7863,
section candidate
no_agent (4.296 ms) : 4248, 4345
.   : milestone, 4296,
iast (9.949 ms) : 9780, 10118
.   : milestone, 9949,
iast_FULL (14.215 ms) : 13933, 14497
.   : milestone, 14215,
iast_GLOBAL (11.031 ms) : 10829, 11233
.   : milestone, 11031,
profiling (8.597 ms) : 8465, 8729
.   : milestone, 8597,
tracing (7.735 ms) : 7624, 7846
.   : milestone, 7735,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.136 ms [4.088 ms, 4.185 ms] -
iast 9.339 ms [9.179 ms, 9.499 ms] 5.203 ms (125.8%)
iast_FULL 14.84 ms [14.545 ms, 15.135 ms] 10.704 ms (258.8%)
iast_GLOBAL 10.691 ms [10.5 ms, 10.881 ms] 6.554 ms (158.5%)
profiling 8.905 ms [8.758 ms, 9.053 ms] 4.769 ms (115.3%)
tracing 7.863 ms [7.739 ms, 7.986 ms] 3.726 ms (90.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.296 ms [4.248 ms, 4.345 ms] -
iast 9.949 ms [9.78 ms, 10.118 ms] 5.652 ms (131.6%)
iast_FULL 14.215 ms [13.933 ms, 14.497 ms] 9.919 ms (230.9%)
iast_GLOBAL 11.031 ms [10.829 ms, 11.233 ms] 6.735 ms (156.8%)
profiling 8.597 ms [8.465 ms, 8.729 ms] 4.301 ms (100.1%)
tracing 7.735 ms [7.624 ms, 7.846 ms] 3.439 ms (80.0%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.47 ms) : 37163, 37778
.   : milestone, 37470,
appsec (47.055 ms) : 46639, 47471
.   : milestone, 47055,
code_origins (43.311 ms) : 42929, 43693
.   : milestone, 43311,
iast (43.851 ms) : 43489, 44214
.   : milestone, 43851,
profiling (47.357 ms) : 46935, 47779
.   : milestone, 47357,
tracing (43.459 ms) : 43098, 43821
.   : milestone, 43459,
section candidate
no_agent (36.164 ms) : 35874, 36453
.   : milestone, 36164,
appsec (47.744 ms) : 47334, 48154
.   : milestone, 47744,
code_origins (42.122 ms) : 41758, 42487
.   : milestone, 42122,
iast (43.941 ms) : 43572, 44310
.   : milestone, 43941,
profiling (48.453 ms) : 47997, 48910
.   : milestone, 48453,
tracing (44.783 ms) : 44411, 45155
.   : milestone, 44783,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.47 ms [37.163 ms, 37.778 ms] -
appsec 47.055 ms [46.639 ms, 47.471 ms] 9.585 ms (25.6%)
code_origins 43.311 ms [42.929 ms, 43.693 ms] 5.841 ms (15.6%)
iast 43.851 ms [43.489 ms, 44.214 ms] 6.381 ms (17.0%)
profiling 47.357 ms [46.935 ms, 47.779 ms] 9.887 ms (26.4%)
tracing 43.459 ms [43.098 ms, 43.821 ms] 5.989 ms (16.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.164 ms [35.874 ms, 36.453 ms] -
appsec 47.744 ms [47.334 ms, 48.154 ms] 11.58 ms (32.0%)
code_origins 42.122 ms [41.758 ms, 42.487 ms] 5.959 ms (16.5%)
iast 43.941 ms [43.572 ms, 44.31 ms] 7.778 ms (21.5%)
profiling 48.453 ms [47.997 ms, 48.91 ms] 12.29 ms (34.0%)
tracing 44.783 ms [44.411 ms, 45.155 ms] 8.619 ms (23.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-virtual-threads
git_commit_date 1761260114 1761303991
git_commit_sha f296927 29b3509
release_version 1.55.0-SNAPSHOT~f296927f57 1.55.0-SNAPSHOT~29b3509c96
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1761306109 1761306109
ci_job_id 1195877903 1195877903
ci_pipeline_id 80199021 80199021
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-nniqal6d 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-nniqal6d 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.147 s) : 15147000, 15147000
.   : milestone, 15147000,
appsec (14.765 s) : 14765000, 14765000
.   : milestone, 14765000,
iast (18.7 s) : 18700000, 18700000
.   : milestone, 18700000,
iast_GLOBAL (18.126 s) : 18126000, 18126000
.   : milestone, 18126000,
profiling (15.028 s) : 15028000, 15028000
.   : milestone, 15028000,
tracing (14.98 s) : 14980000, 14980000
.   : milestone, 14980000,
section candidate
no_agent (15.446 s) : 15446000, 15446000
.   : milestone, 15446000,
appsec (15.011 s) : 15011000, 15011000
.   : milestone, 15011000,
iast (18.813 s) : 18813000, 18813000
.   : milestone, 18813000,
iast_GLOBAL (18.325 s) : 18325000, 18325000
.   : milestone, 18325000,
profiling (15.18 s) : 15180000, 15180000
.   : milestone, 15180000,
tracing (15.236 s) : 15236000, 15236000
.   : milestone, 15236000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.147 s [15.147 s, 15.147 s] -
appsec 14.765 s [14.765 s, 14.765 s] -382.0 ms (-2.5%)
iast 18.7 s [18.7 s, 18.7 s] 3.553 s (23.5%)
iast_GLOBAL 18.126 s [18.126 s, 18.126 s] 2.979 s (19.7%)
profiling 15.028 s [15.028 s, 15.028 s] -119.0 ms (-0.8%)
tracing 14.98 s [14.98 s, 14.98 s] -167.0 ms (-1.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.446 s [15.446 s, 15.446 s] -
appsec 15.011 s [15.011 s, 15.011 s] -435.0 ms (-2.8%)
iast 18.813 s [18.813 s, 18.813 s] 3.367 s (21.8%)
iast_GLOBAL 18.325 s [18.325 s, 18.325 s] 2.879 s (18.6%)
profiling 15.18 s [15.18 s, 15.18 s] -266.0 ms (-1.7%)
tracing 15.236 s [15.236 s, 15.236 s] -210.0 ms (-1.4%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~29b3509c96, baseline=1.55.0-SNAPSHOT~f296927f57
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.482 ms) : 1471, 1494
.   : milestone, 1482,
appsec (3.725 ms) : 3501, 3949
.   : milestone, 3725,
iast (2.236 ms) : 2171, 2301
.   : milestone, 2236,
iast_GLOBAL (2.265 ms) : 2200, 2329
.   : milestone, 2265,
profiling (2.063 ms) : 2012, 2115
.   : milestone, 2063,
tracing (2.053 ms) : 2003, 2103
.   : milestone, 2053,
section candidate
no_agent (1.485 ms) : 1473, 1496
.   : milestone, 1485,
appsec (3.798 ms) : 3574, 4022
.   : milestone, 3798,
iast (2.223 ms) : 2159, 2288
.   : milestone, 2223,
iast_GLOBAL (2.279 ms) : 2214, 2344
.   : milestone, 2279,
profiling (2.476 ms) : 2318, 2634
.   : milestone, 2476,
tracing (2.043 ms) : 1993, 2094
.   : milestone, 2043,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.482 ms [1.471 ms, 1.494 ms] -
appsec 3.725 ms [3.501 ms, 3.949 ms] 2.243 ms (151.3%)
iast 2.236 ms [2.171 ms, 2.301 ms] 753.52 µs (50.8%)
iast_GLOBAL 2.265 ms [2.2 ms, 2.329 ms] 782.65 µs (52.8%)
profiling 2.063 ms [2.012 ms, 2.115 ms] 580.979 µs (39.2%)
tracing 2.053 ms [2.003 ms, 2.103 ms] 570.562 µs (38.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.485 ms [1.473 ms, 1.496 ms] -
appsec 3.798 ms [3.574 ms, 4.022 ms] 2.313 ms (155.8%)
iast 2.223 ms [2.159 ms, 2.288 ms] 738.419 µs (49.7%)
iast_GLOBAL 2.279 ms [2.214 ms, 2.344 ms] 794.001 µs (53.5%)
profiling 2.476 ms [2.318 ms, 2.634 ms] 991.392 µs (66.8%)
tracing 2.043 ms [1.993 ms, 2.094 ms] 558.366 µs (37.6%)

@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-virtual-threads branch from d498d7c to 29b3509 Compare October 24, 2025 11:08
@PerfectSlayer PerfectSlayer requested a review from a team as a code owner October 24, 2025 11:08
@PerfectSlayer PerfectSlayer changed the title Add support for virtual thread detection Improve support for virtual thread detection Oct 24, 2025
private static MethodHandle findThreadIdMethodHandle() {
if (JavaVirtualMachine.isJavaVersionAtLeast(19)) {
try {
return MethodHandles.lookup()
Copy link
Contributor

Choose a reason for hiding this comment

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

we have this utility class datadog.trace.util.MethodHandles for dealing with method handles lookup that might be handy to use. It also logs in case of failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That’s interesting but it’s part of :internal-api so it won’t be accessible.
Additionally, do we expect to log (in telemetry) when we are not sure about the method availability? Here, we are trying to get it to check if the capability is available but it’s fine if it isn’t.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: platform Platform components type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants