Skip to content

Atomics benchmark - #10862

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 12 commits into
masterfrom
dougqh/atomics-benchmark
Jun 23, 2026
Merged

Atomics benchmark#10862
gh-worker-dd-mergequeue-cf854d[bot] merged 12 commits into
masterfrom
dougqh/atomics-benchmark

Conversation

@dougqh

Copy link
Copy Markdown
Contributor

Benchmark to show cost of Atomic vs AtomicFieldUpdater

What Does This Do

Benchmark to show cost of Atomic vs AtomicFieldUpdater

Overall conclusion is to favor AtomicFieldUpdater when possible.
While Atomic is sometimes slightly better in ops/sec, AtomicFieldUpdater reduces memory footprint which is typically more important for the system as a whole

Motivation

Provide and illustrate recommendations to follow when contributing to the Java agent

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note:Once your PR is ready to merge, add it to the merge queue by commenting /merge./merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

Benchmark to show cost of Atomic vs AtomicFieldUpdater
@dougqh
dougqh requested a review from a team as a code ownerMarch 16, 2026 18:46
@github-actions

github-actionsBot commented Mar 16, 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.

@dougqhdougqh added comp: core Tracer core type: documentation tag: performance Performance related changes labels Mar 16, 2026
@pr-commenter

pr-commenterBot commented Mar 16, 2026

Copy link
Copy Markdown

Benchmarks

⚠️Warning: Baseline build not found for merge-base commit. Comparing against the latest commit on master instead.

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterdougqh/atomics-benchmark
git_commit_date17821580811782172799
git_commit_shaea827babb784c0
release_version1.64.0-SNAPSHOT~ea827ba0c41.61.0-SNAPSHOT~bb784c0bb1
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17821748831782174883
ci_job_id17941029641794102964
ci_pipeline_id120374107120374107
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-zfyrx7zua-project-304-concurrent-0-75xnlzdj 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/LinuxLinux runner-zfyrx7zua-project-304-concurrent-0-75xnlzdj 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
moduleAgentAgent
parentNoneNone

Summary

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

scenarioΔ mean execution_timecandidate mean execution_timebaseline mean execution_time
scenario:startup:insecure-bank:iast:BytebuddyAgentbetter
[-33.786ms; -27.780ms] or [-4.081%; -3.356%]
797.102ms827.885ms
scenario:startup:insecure-bank:iast:Telemetryworse
[+5.788ms; +6.077ms] or [+74.690%; +78.420%]
13.681ms7.749ms
scenario:startup:petclinic:appsec:AppSecbetter
[-12.485ms; -9.468ms] or [-6.581%; -4.991%]
178.745ms189.721ms
scenario:startup:petclinic:appsec:Flare Pollerbetter
[-5.914ms; -5.545ms] or [-62.984%; -59.059%]
3.660ms9.389ms
scenario:startup:petclinic:iast:BytebuddyAgentbetter
[-35.420ms; -28.619ms] or [-4.267%; -3.448%]
798.038ms830.057ms
scenario:startup:petclinic:iast:Telemetryworse
[+5.871ms; +6.194ms] or [+75.221%; +79.350%]
13.838ms7.805ms
scenario:startup:petclinic:profiling:Agent.startbetter
[-142.639ms; -134.864ms] or [-10.809%; -10.220%]
1.181s1.320s
scenario:startup:petclinic:profiling:crashtrackingworse
[+612.890µs; +643.320µs] or [+112.663%; +118.257%]
1172.106µs544.001µs
scenario:startup:petclinic:profiling:Remote Configbetter
[-54.537µs; -21.198µs] or [-8.973%; -3.488%]
569.900µs607.768µs
scenario:startup:petclinic:tracing:Telemetrybetter
[-523.691µs; -310.574µs] or [-6.215%; -3.686%]
8.009ms8.426ms
Startup time reports for petclinic
gantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067245
Total [baseline] (10.94 s) : 0, 10939830
Agent [candidate] (1.054 s) : 0, 1053765
Total [candidate] (11.152 s) : 0, 11152352
section appsec
Agent [baseline] (1.28 s) : 0, 1279920
Total [baseline] (10.94 s) : 0, 10939843
Agent [candidate] (1.251 s) : 0, 1250716
Total [candidate] (11.194 s) : 0, 11194240
section iast
Agent [baseline] (1.251 s) : 0, 1251351
Total [baseline] (11.257 s) : 0, 11257422
Agent [candidate] (1.226 s) : 0, 1225533
Total [candidate] (11.333 s) : 0, 11332801
section profiling
Agent [baseline] (1.32 s) : 0, 1319613
Total [baseline] (10.966 s) : 0, 10965999
Agent [candidate] (1.181 s) : 0, 1180862
Total [candidate] (11.064 s) : 0, 11063763
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.067 s-
Agentappsec1.28 s212.675 ms (19.9%)
Agentiast1.251 s184.106 ms (17.3%)
Agentprofiling1.32 s252.369 ms (23.6%)
Totaltracing10.94 s-
Totalappsec10.94 s12.783 µs (0.0%)
Totaliast11.257 s317.592 ms (2.9%)
Totalprofiling10.966 s26.169 ms (0.2%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.054 s-
Agentappsec1.251 s196.951 ms (18.7%)
Agentiast1.226 s171.768 ms (16.3%)
Agentprofiling1.181 s127.097 ms (12.1%)
Totaltracing11.152 s-
Totalappsec11.194 s41.889 ms (0.4%)
Totaliast11.333 s180.449 ms (1.6%)
Totalprofiling11.064 s-88.589 ms (-0.8%)
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.209 ms) : 0, 1209
crashtracking [candidate] (1.181 ms) : 0, 1181
BytebuddyAgent [baseline] (637.988 ms) : 0, 637988
BytebuddyAgent [candidate] (629.233 ms) : 0, 629233
AgentMeter [baseline] (30.055 ms) : 0, 30055
AgentMeter [candidate] (29.447 ms) : 0, 29447
GlobalTracer [baseline] (248.335 ms) : 0, 248335
GlobalTracer [candidate] (250.984 ms) : 0, 250984
AppSec [baseline] (32.311 ms) : 0, 32311
AppSec [candidate] (31.889 ms) : 0, 31889
Debugger [baseline] (60.202 ms) : 0, 60202
Debugger [candidate] (60.598 ms) : 0, 60598
Remote Config [baseline] (597.908 µs) : 0, 598
Remote Config [candidate] (595.066 µs) : 0, 595
Telemetry [baseline] (8.426 ms) : 0, 8426
Telemetry [candidate] (8.009 ms) : 0, 8009
Flare Poller [baseline] (11.381 ms) : 0, 11381
Flare Poller [candidate] (5.873 ms) : 0, 5873
section appsec
crashtracking [baseline] (1.206 ms) : 0, 1206
crashtracking [candidate] (1.204 ms) : 0, 1204
BytebuddyAgent [baseline] (682.689 ms) : 0, 682689
BytebuddyAgent [candidate] (664.35 ms) : 0, 664350
AgentMeter [baseline] (12.192 ms) : 0, 12192
AgentMeter [candidate] (12.153 ms) : 0, 12153
GlobalTracer [baseline] (248.949 ms) : 0, 248949
GlobalTracer [candidate] (254.198 ms) : 0, 254198
AppSec [baseline] (189.721 ms) : 0, 189721
AppSec [candidate] (178.745 ms) : 0, 178745
Debugger [baseline] (65.878 ms) : 0, 65878
Debugger [candidate] (66.648 ms) : 0, 66648
Remote Config [baseline] (584.709 µs) : 0, 585
Remote Config [candidate] (648.165 µs) : 0, 648
Telemetry [baseline] (8.092 ms) : 0, 8092
Telemetry [candidate] (8.374 ms) : 0, 8374
Flare Poller [baseline] (9.389 ms) : 0, 9389
Flare Poller [candidate] (3.66 ms) : 0, 3660
IAST [baseline] (24.41 ms) : 0, 24410
IAST [candidate] (24.395 ms) : 0, 24395
section iast
crashtracking [baseline] (1.212 ms) : 0, 1212
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (830.057 ms) : 0, 830057
BytebuddyAgent [candidate] (798.038 ms) : 0, 798038
AgentMeter [baseline] (11.526 ms) : 0, 11526
AgentMeter [candidate] (11.529 ms) : 0, 11529
GlobalTracer [baseline] (239.422 ms) : 0, 239422
GlobalTracer [candidate] (242.805 ms) : 0, 242805
AppSec [baseline] (28.07 ms) : 0, 28070
AppSec [candidate] (26.632 ms) : 0, 26632
Debugger [baseline] (63.755 ms) : 0, 63755
Debugger [candidate] (64.535 ms) : 0, 64535
Remote Config [baseline] (527.363 µs) : 0, 527
Remote Config [candidate] (533.733 µs) : 0, 534
Telemetry [baseline] (7.805 ms) : 0, 7805
Telemetry [candidate] (13.838 ms) : 0, 13838
Flare Poller [baseline] (3.351 ms) : 0, 3351
Flare Poller [candidate] (4.828 ms) : 0, 4828
IAST [baseline] (28.071 ms) : 0, 28071
IAST [candidate] (25.42 ms) : 0, 25420
section profiling
crashtracking [baseline] (544.001 µs) : 0, 544
crashtracking [candidate] (1.172 ms) : 0, 1172
BytebuddyAgent [baseline] (691.01 ms) : 0, 691010
BytebuddyAgent [candidate] (683.407 ms) : 0, 683407
AgentMeter [baseline] (9.61 ms) : 0, 9610
AgentMeter [candidate] (9.115 ms) : 0, 9115
GlobalTracer [baseline] (211.13 ms) : 0, 211130
GlobalTracer [candidate] (210.381 ms) : 0, 210381
AppSec [baseline] (32.623 ms) : 0, 32623
AppSec [candidate] (32.275 ms) : 0, 32275
Debugger [baseline] (66.11 ms) : 0, 66110
Debugger [candidate] (65.301 ms) : 0, 65301
Remote Config [baseline] (607.768 µs) : 0, 608
Remote Config [candidate] (569.9 µs) : 0, 570
Telemetry [baseline] (8.059 ms) : 0, 8059
Telemetry [candidate] (8.579 ms) : 0, 8579
Flare Poller [baseline] (3.555 ms) : 0, 3555
Flare Poller [candidate] (3.552 ms) : 0, 3552
ProfilingAgent [baseline] (95.47 ms) : 0, 95470
ProfilingAgent [candidate] (95.259 ms) : 0, 95259
Profiling [baseline] (96.02 ms) : 0, 96020
Profiling [candidate] (95.853 ms) : 0, 95853
Loading
Startup time reports for insecure-bank
gantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.069 s) : 0, 1069455
Total [baseline] (8.875 s) : 0, 8875421
Agent [candidate] (1.052 s) : 0, 1052311
Total [candidate] (8.844 s) : 0, 8843736
section iast
Agent [baseline] (1.247 s) : 0, 1246897
Total [baseline] (9.486 s) : 0, 9485731
Agent [candidate] (1.225 s) : 0, 1224933
Total [candidate] (9.565 s) : 0, 9565263
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.069 s-
Agentiast1.247 s177.442 ms (16.6%)
Totaltracing8.875 s-
Totaliast9.486 s610.31 ms (6.9%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.052 s-
Agentiast1.225 s172.621 ms (16.4%)
Totaltracing8.844 s-
Totaliast9.565 s721.527 ms (8.2%)
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.204 ms) : 0, 1204
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (640.489 ms) : 0, 640489
BytebuddyAgent [candidate] (629.635 ms) : 0, 629635
AgentMeter [baseline] (30.212 ms) : 0, 30212
AgentMeter [candidate] (29.37 ms) : 0, 29370
GlobalTracer [baseline] (248.351 ms) : 0, 248351
GlobalTracer [candidate] (251.508 ms) : 0, 251508
AppSec [baseline] (32.487 ms) : 0, 32487
AppSec [candidate] (31.783 ms) : 0, 31783
Debugger [baseline] (59.656 ms) : 0, 59656
Debugger [candidate] (59.888 ms) : 0, 59888
Remote Config [baseline] (609.066 µs) : 0, 609
Remote Config [candidate] (610.187 µs) : 0, 610
Telemetry [baseline] (9.186 ms) : 0, 9186
Telemetry [candidate] (8.023 ms) : 0, 8023
Flare Poller [baseline] (10.571 ms) : 0, 10571
Flare Poller [candidate] (4.258 ms) : 0, 4258
section iast
crashtracking [baseline] (1.204 ms) : 0, 1204
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (827.885 ms) : 0, 827885
BytebuddyAgent [candidate] (797.102 ms) : 0, 797102
AgentMeter [baseline] (11.493 ms) : 0, 11493
AgentMeter [candidate] (11.442 ms) : 0, 11442
GlobalTracer [baseline] (240.39 ms) : 0, 240390
GlobalTracer [candidate] (243.657 ms) : 0, 243657
AppSec [baseline] (26.477 ms) : 0, 26477
AppSec [candidate] (26.795 ms) : 0, 26795
Debugger [baseline] (62.965 ms) : 0, 62965
Debugger [candidate] (63.727 ms) : 0, 63727
Remote Config [baseline] (524.954 µs) : 0, 525
Remote Config [candidate] (536.79 µs) : 0, 537
Telemetry [baseline] (7.749 ms) : 0, 7749
Telemetry [candidate] (13.681 ms) : 0, 13681
Flare Poller [baseline] (3.271 ms) : 0, 3271
Flare Poller [candidate] (5.073 ms) : 0, 5073
IAST [baseline] (28.34 ms) : 0, 28340
IAST [candidate] (25.514 ms) : 0, 25514
Loading

Load

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterdougqh/atomics-benchmark
git_commit_date17821580811782172799
git_commit_shaea827babb784c0
release_version1.64.0-SNAPSHOT~ea827ba0c41.61.0-SNAPSHOT~bb784c0bb1
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17821753621782175362
ci_job_id17941029651794102965
ci_pipeline_id120374107120374107
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-zfyrx7zua-project-304-concurrent-1-dannj0hd 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/LinuxLinux runner-zfyrx7zua-project-304-concurrent-1-dannj0hd 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 1 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.

scenarioΔ mean agg_http_req_duration_p50Δ mean agg_http_req_duration_p95Δ mean throughputcandidate mean agg_http_req_duration_p50candidate mean agg_http_req_duration_p95candidate mean throughputbaseline mean agg_http_req_duration_p50baseline mean agg_http_req_duration_p95baseline mean throughput
scenario:load:petclinic:profiling:high_loadworse
[+505.850µs; +1052.967µs] or [+2.834%; +5.899%]
worse
[+0.630ms; +2.035ms] or [+2.183%; +7.049%]
unstable
[-35.577op/s; +15.139op/s] or [-13.852%; +5.894%]
18.630ms30.202ms246.625op/s17.851ms28.870ms256.844op/s
scenario:load:petclinic:code_origins:high_loadbetter
[-1459.168µs; -538.513µs] or [-7.903%; -2.917%]
same
[-1264.282µs; +121.560µs] or [-4.273%; +0.411%]
unstable
[-14.508op/s; +38.320op/s] or [-5.813%; +15.355%]
17.465ms29.014ms261.469op/s18.464ms29.585ms249.562op/s
Request duration reports for insecure-bank
gantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section baseline
no_agent (1.26 ms) : 1248, 1271
. : milestone, 1260,
iast (3.343 ms) : 3294, 3391
. : milestone, 3343,
iast_FULL (6.021 ms) : 5961, 6082
. : milestone, 6021,
iast_GLOBAL (3.709 ms) : 3648, 3769
. : milestone, 3709,
profiling (2.485 ms) : 2460, 2509
. : milestone, 2485,
tracing (1.901 ms) : 1885, 1916
. : milestone, 1901,
section candidate
no_agent (1.286 ms) : 1273, 1299
. : milestone, 1286,
iast (3.313 ms) : 3269, 3357
. : milestone, 3313,
iast_FULL (6.038 ms) : 5976, 6099
. : milestone, 6038,
iast_GLOBAL (3.675 ms) : 3612, 3738
. : milestone, 3675,
profiling (2.238 ms) : 2215, 2261
. : milestone, 2238,
tracing (1.97 ms) : 1953, 1987
. : milestone, 1970,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.26 ms [1.248 ms, 1.271 ms]-
iast3.343 ms [3.294 ms, 3.391 ms]2.083 ms (165.4%)
iast_FULL6.021 ms [5.961 ms, 6.082 ms]4.762 ms (378.1%)
iast_GLOBAL3.709 ms [3.648 ms, 3.769 ms]2.449 ms (194.5%)
profiling2.485 ms [2.46 ms, 2.509 ms]1.225 ms (97.3%)
tracing1.901 ms [1.885 ms, 1.916 ms]641.314 µs (50.9%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.286 ms [1.273 ms, 1.299 ms]-
iast3.313 ms [3.269 ms, 3.357 ms]2.027 ms (157.6%)
iast_FULL6.038 ms [5.976 ms, 6.099 ms]4.752 ms (369.5%)
iast_GLOBAL3.675 ms [3.612 ms, 3.738 ms]2.389 ms (185.8%)
profiling2.238 ms [2.215 ms, 2.261 ms]951.95 µs (74.0%)
tracing1.97 ms [1.953 ms, 1.987 ms]683.815 µs (53.2%)
Request duration reports for petclinic
gantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section baseline
no_agent (19.156 ms) : 18961, 19352
. : milestone, 19156,
appsec (18.716 ms) : 18525, 18907
. : milestone, 18716,
code_origins (18.695 ms) : 18509, 18880
. : milestone, 18695,
iast (18.715 ms) : 18527, 18904
. : milestone, 18715,
profiling (18.169 ms) : 17990, 18348
. : milestone, 18169,
tracing (18.227 ms) : 18045, 18409
. : milestone, 18227,
section candidate
no_agent (18.442 ms) : 18251, 18634
. : milestone, 18442,
appsec (18.416 ms) : 18231, 18600
. : milestone, 18416,
code_origins (17.846 ms) : 17669, 18023
. : milestone, 17846,
iast (18.011 ms) : 17837, 18184
. : milestone, 18011,
profiling (18.924 ms) : 18732, 19116
. : milestone, 18924,
tracing (18.011 ms) : 17834, 18188
. : milestone, 18011,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent19.156 ms [18.961 ms, 19.352 ms]-
appsec18.716 ms [18.525 ms, 18.907 ms]-439.921 µs (-2.3%)
code_origins18.695 ms [18.509 ms, 18.88 ms]-461.397 µs (-2.4%)
iast18.715 ms [18.527 ms, 18.904 ms]-440.958 µs (-2.3%)
profiling18.169 ms [17.99 ms, 18.348 ms]-986.908 µs (-5.2%)
tracing18.227 ms [18.045 ms, 18.409 ms]-929.242 µs (-4.9%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent18.442 ms [18.251 ms, 18.634 ms]-
appsec18.416 ms [18.231 ms, 18.6 ms]-26.691 µs (-0.1%)
code_origins17.846 ms [17.669 ms, 18.023 ms]-596.487 µs (-3.2%)
iast18.011 ms [17.837 ms, 18.184 ms]-431.749 µs (-2.3%)
profiling18.924 ms [18.732 ms, 19.116 ms]481.228 µs (2.6%)
tracing18.011 ms [17.834 ms, 18.188 ms]-431.577 µs (-2.3%)

Dacapo

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterdougqh/atomics-benchmark
git_commit_date17821580811782172799
git_commit_shaea827babb784c0
release_version1.64.0-SNAPSHOT~ea827ba0c41.61.0-SNAPSHOT~bb784c0bb1
See matching parameters
BaselineCandidate
applicationbiojavabiojava
ci_job_date17821750431782175043
ci_job_id17941029661794102966
ci_pipeline_id120374107120374107
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-zfyrx7zua-project-304-concurrent-0-w1mzl1qo 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/LinuxLinux runner-zfyrx7zua-project-304-concurrent-0-w1mzl1qo 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 tomcat
gantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section baseline
no_agent (1.488 ms) : 1476, 1499
. : milestone, 1488,
appsec (3.83 ms) : 3606, 4053
. : milestone, 3830,
iast (2.296 ms) : 2226, 2366
. : milestone, 2296,
iast_GLOBAL (2.334 ms) : 2263, 2405
. : milestone, 2334,
profiling (2.553 ms) : 2388, 2718
. : milestone, 2553,
tracing (2.11 ms) : 2055, 2165
. : milestone, 2110,
section candidate
no_agent (1.49 ms) : 1478, 1502
. : milestone, 1490,
appsec (3.824 ms) : 3603, 4045
. : milestone, 3824,
iast (2.274 ms) : 2205, 2343
. : milestone, 2274,
iast_GLOBAL (2.313 ms) : 2243, 2383
. : milestone, 2313,
profiling (2.122 ms) : 2066, 2179
. : milestone, 2122,
tracing (2.08 ms) : 2026, 2133
. : milestone, 2080,
Loading
  • baseline results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.488 ms [1.476 ms, 1.499 ms]-
appsec3.83 ms [3.606 ms, 4.053 ms]2.342 ms (157.4%)
iast2.296 ms [2.226 ms, 2.366 ms]808.272 µs (54.3%)
iast_GLOBAL2.334 ms [2.263 ms, 2.405 ms]846.499 µs (56.9%)
profiling2.553 ms [2.388 ms, 2.718 ms]1.065 ms (71.6%)
tracing2.11 ms [2.055 ms, 2.165 ms]622.357 µs (41.8%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.49 ms [1.478 ms, 1.502 ms]-
appsec3.824 ms [3.603 ms, 4.045 ms]2.334 ms (156.6%)
iast2.274 ms [2.205 ms, 2.343 ms]784.188 µs (52.6%)
iast_GLOBAL2.313 ms [2.243 ms, 2.383 ms]822.858 µs (55.2%)
profiling2.122 ms [2.066 ms, 2.179 ms]632.192 µs (42.4%)
tracing2.08 ms [2.026 ms, 2.133 ms]589.623 µs (39.6%)
Execution time for biojava
gantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~bb784c0bb1, baseline=1.64.0-SNAPSHOT~ea827ba0c4
dateFormat X
axisFormat %s
section baseline
no_agent (15.223 s) : 15223000, 15223000
. : milestone, 15223000,
appsec (14.851 s) : 14851000, 14851000
. : milestone, 14851000,
iast (18.626 s) : 18626000, 18626000
. : milestone, 18626000,
iast_GLOBAL (17.781 s) : 17781000, 17781000
. : milestone, 17781000,
profiling (15.425 s) : 15425000, 15425000
. : milestone, 15425000,
tracing (14.865 s) : 14865000, 14865000
. : milestone, 14865000,
section candidate
no_agent (15.437 s) : 15437000, 15437000
. : milestone, 15437000,
appsec (14.593 s) : 14593000, 14593000
. : milestone, 14593000,
iast (18.162 s) : 18162000, 18162000
. : milestone, 18162000,
iast_GLOBAL (17.731 s) : 17731000, 17731000
. : milestone, 17731000,
profiling (15.001 s) : 15001000, 15001000
. : milestone, 15001000,
tracing (14.801 s) : 14801000, 14801000
. : milestone, 14801000,
Loading
  • baseline results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.223 s [15.223 s, 15.223 s]-
appsec14.851 s [14.851 s, 14.851 s]-372.0 ms (-2.4%)
iast18.626 s [18.626 s, 18.626 s]3.403 s (22.4%)
iast_GLOBAL17.781 s [17.781 s, 17.781 s]2.558 s (16.8%)
profiling15.425 s [15.425 s, 15.425 s]202.0 ms (1.3%)
tracing14.865 s [14.865 s, 14.865 s]-358.0 ms (-2.4%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.437 s [15.437 s, 15.437 s]-
appsec14.593 s [14.593 s, 14.593 s]-844.0 ms (-5.5%)
iast18.162 s [18.162 s, 18.162 s]2.725 s (17.7%)
iast_GLOBAL17.731 s [17.731 s, 17.731 s]2.294 s (14.9%)
profiling15.001 s [15.001 s, 15.001 s]-436.0 ms (-2.8%)
tracing14.801 s [14.801 s, 14.801 s]-636.0 ms (-4.1%)

@Warmup(iterations = 2)
@Measurement(iterations = 3)
@Threads(8)
public class AtomicsBenchmark {

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.

question: Would it make sense to include JCTools equivalents?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I'm not very familiar with jctools, but probably, the idea is for these to serve as kind of a "menu" to compare different equivalent mechanisms.

Comment threadinternal-api/src/jmh/java/datadog/trace/util/AtomicsBenchmark.java Outdated
…java
Co-authored-by: Sarah Chen <sarah.chen@datadoghq.com>

@sarahchen6sarahchen6 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.

LGTM!

@dougqh

dougqh commented Jun 22, 2026

Copy link
Copy Markdown
ContributorAuthor

I'm going to re-run once more to get fresh numbers after a methodology fix, then I'll merge it.

@datadog-datadog-prod-us1

This comment has been minimized.

sharedLookupIndex was a plain static int incremented by all 8 JMH
threads without synchronization — a data race that could cause
contention measurements to reflect arbitrary holder access patterns.
Move index to @State(Scope.Thread) so each thread has its own cursor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dd-octo-stsdd-octo-stsBot added the tag: ai generated Largely based on code generated by an AI or LLM label Jun 22, 2026
dougqhand others added 4 commits June 22, 2026 19:38
Without this, -Pjmh.includes is silently ignored by the me.champeau.jmh
plugin, requiring a full fat-jar build to run a single benchmark.
-PtestJvm was also ignored for JMH execution, defaulting to the Gradle
daemon JVM regardless of the requested version.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Re-run after fixing the shared-index data race. The incrementAndGet
results increased dramatically (~16M → ~91-121M ops/s) because the
prior run was measuring contention on the shared index rather than the
atomics themselves.
Notable: atomic_incrementAndGet (121M) now outperforms
atomicFieldUpdater_incrementAndGet (91M) for the increment op; the
AFU advantage is in construction (2215M vs 1872M, saving 16 B/op).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…attern
AFU wins on construction (16 B vs 32 B/op); AtomicInteger wins on
incrementAndGet (~33% faster). Updated Javadoc to present both sides
rather than a blanket recommendation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
VarHandle (Java 9+) is the modern replacement for AtomicIntegerFieldUpdater
and would likely close the incrementAndGet performance gap. Not usable here
because internal-api targets Java 8.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@bric3bric3 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.

Pre-approving

Comment threadinternal-api/build.gradle.kts Outdated
* the incrementAndGet gap with AtomicInteger while retaining the construction allocation advantage.
* Not available here because internal-api targets Java 8.
*
* <code> Java 17 - MacBook M1 - 8 threads

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.

quibble:

Suggested change
* <code> Java17 - MacBookM1 - 8threads
* <code> Java17 - MacBookM1ProMax- 8threads

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.

Also, did you notice changes across JVMs ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I haven't checked extensively. The main thing is that avoid using Java 8 locally.
Java 8 was the first JVM to support ARM64 and the code gen was really quite poor. It improved significantly over the next couple major releases.

*
* While the performance of Atomic is on par with AtomicFieldUpdater (and sometimes slightly better) inside a frequently
* constructed object, the impact of the extra allocation on garbage collection is detrimental to the application as a whole.
* <p><b>Future:</b> {@code VarHandle} (Java 9+) is the modern replacement for

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.

note: As far as I know VarHandle are not as good until Java 25 or 26.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah, I haven't extensively tested it yet. I just decided to add a note for completeness.

Comment threadinternal-api/build.gradle.kts Outdated
@dd-octo-sts

dd-octo-stsBot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

SuiteStatus
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
ScenarioCandidatemasterΔ (95% CI of mean)
startup:insecure-bank:iast:Agent14.00 s13.95 s[-0.5%; +1.2%] (no difference)
startup:insecure-bank:tracing:Agent12.95 s13.00 s[-1.1%; +0.4%] (no difference)
startup:petclinic:appsec:Agent16.96 s16.58 s[+1.4%; +3.2%] (significantly worse)
startup:petclinic:iast:Agent16.70 s16.98 s[-2.5%; -0.8%] (maybe better)
startup:petclinic:profiling:Agent16.94 s16.81 s[-0.3%; +1.8%] (no difference)
startup:petclinic:sca:Agent16.94 s16.83 s[-0.4%; +1.8%] (no difference)
startup:petclinic:tracing:Agent16.02 s16.19 s[-2.0%; -0.1%] (maybe better)

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

The internal-api/build.gradle.kts -Pjmh.includes / -PtestJvm wiring belongs in
its dedicated PR (#11703), not here. Revert it so this PR is just the benchmark.
Also correct the results header to "MacBook M1 Pro Max".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dougqh
dougqh added this pull request to the merge queueJun 23, 2026
@dd-octo-sts

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351Bot commented Jun 23, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-23 19:14:09 UTC ℹ️ Start processing command /merge


2026-06-23 19:14:13 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-06-23 20:15:14 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Jun 23, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot merged commit 8206fbc into masterJun 23, 2026
583 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the dougqh/atomics-benchmark branch June 23, 2026 20:15
@github-actionsgithub-actionsBot added this to the 1.64.0 milestone Jun 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: coreTracer coretag: ai generatedLargely based on code generated by an AI or LLMtag: performancePerformance related changestype: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dougqh@bric3@sarahchen6