-
Notifications
You must be signed in to change notification settings - Fork 324
Use pure FFM to write on service discovery memfd from java 22 #10295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ac188f4 to
fa149c1
Compare
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/TracerInstaller.java
Outdated
Show resolved
Hide resolved
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 9 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1089375
Total [baseline] (10.935 s) : 0, 10934684
Agent [candidate] (1.089 s) : 0, 1089034
Total [candidate] (10.833 s) : 0, 10833417
section appsec
Agent [baseline] (1.267 s) : 0, 1266784
Total [baseline] (10.956 s) : 0, 10956456
Agent [candidate] (1.266 s) : 0, 1266058
Total [candidate] (10.829 s) : 0, 10828566
section iast
Agent [baseline] (1.23 s) : 0, 1229848
Total [baseline] (11.182 s) : 0, 11181573
Agent [candidate] (1.24 s) : 0, 1240145
Total [candidate] (11.244 s) : 0, 11244141
section profiling
Agent [baseline] (1.21 s) : 0, 1210264
Total [baseline] (11.098 s) : 0, 11097894
Agent [candidate] (1.204 s) : 0, 1204017
Total [candidate] (10.947 s) : 0, 10947305
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.207 ms) : 0, 1207
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (653.621 ms) : 0, 653621
BytebuddyAgent [candidate] (653.705 ms) : 0, 653705
GlobalTracer [baseline] (283.685 ms) : 0, 283685
GlobalTracer [candidate] (283.936 ms) : 0, 283936
AppSec [baseline] (32.702 ms) : 0, 32702
AppSec [candidate] (32.684 ms) : 0, 32684
Debugger [baseline] (68.052 ms) : 0, 68052
Debugger [candidate] (68.457 ms) : 0, 68457
Remote Config [baseline] (650.096 µs) : 0, 650
Remote Config [candidate] (628.177 µs) : 0, 628
Telemetry [baseline] (9.267 ms) : 0, 9267
Telemetry [candidate] (9.061 ms) : 0, 9061
Flare Poller [baseline] (4.611 ms) : 0, 4611
Flare Poller [candidate] (3.778 ms) : 0, 3778
section appsec
crashtracking [baseline] (1.183 ms) : 0, 1183
crashtracking [candidate] (1.179 ms) : 0, 1179
BytebuddyAgent [baseline] (691.981 ms) : 0, 691981
BytebuddyAgent [candidate] (691.688 ms) : 0, 691688
GlobalTracer [baseline] (258.5 ms) : 0, 258500
GlobalTracer [candidate] (258.488 ms) : 0, 258488
IAST [baseline] (24.629 ms) : 0, 24629
IAST [candidate] (24.57 ms) : 0, 24570
AppSec [baseline] (173.572 ms) : 0, 173572
AppSec [candidate] (173.767 ms) : 0, 173767
Debugger [baseline] (67.464 ms) : 0, 67464
Debugger [candidate] (67.127 ms) : 0, 67127
Remote Config [baseline] (778.557 µs) : 0, 779
Remote Config [candidate] (762.474 µs) : 0, 762
Telemetry [baseline] (9.414 ms) : 0, 9414
Telemetry [candidate] (9.432 ms) : 0, 9432
Flare Poller [baseline] (3.771 ms) : 0, 3771
Flare Poller [candidate] (3.722 ms) : 0, 3722
section iast
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (796.221 ms) : 0, 796221
BytebuddyAgent [candidate] (803.158 ms) : 0, 803158
GlobalTracer [baseline] (256.99 ms) : 0, 256990
GlobalTracer [candidate] (259.278 ms) : 0, 259278
IAST [baseline] (27.264 ms) : 0, 27264
IAST [candidate] (27.446 ms) : 0, 27446
AppSec [baseline] (34.545 ms) : 0, 34545
AppSec [candidate] (34.398 ms) : 0, 34398
Debugger [baseline] (65.579 ms) : 0, 65579
Debugger [candidate] (66.119 ms) : 0, 66119
Remote Config [baseline] (582.247 µs) : 0, 582
Remote Config [candidate] (604.121 µs) : 0, 604
Telemetry [baseline] (8.436 ms) : 0, 8436
Telemetry [candidate] (8.591 ms) : 0, 8591
Flare Poller [baseline] (3.54 ms) : 0, 3540
Flare Poller [candidate] (3.637 ms) : 0, 3637
section profiling
crashtracking [baseline] (1.218 ms) : 0, 1218
crashtracking [candidate] (1.209 ms) : 0, 1209
BytebuddyAgent [baseline] (703.503 ms) : 0, 703503
BytebuddyAgent [candidate] (703.137 ms) : 0, 703137
GlobalTracer [baseline] (221.208 ms) : 0, 221208
GlobalTracer [candidate] (220.237 ms) : 0, 220237
AppSec [baseline] (32.49 ms) : 0, 32490
AppSec [candidate] (32.004 ms) : 0, 32004
Debugger [baseline] (69.073 ms) : 0, 69073
Debugger [candidate] (67.886 ms) : 0, 67886
Remote Config [baseline] (637.169 µs) : 0, 637
Remote Config [candidate] (631.194 µs) : 0, 631
Telemetry [baseline] (9.073 ms) : 0, 9073
Telemetry [candidate] (8.763 ms) : 0, 8763
Flare Poller [baseline] (3.784 ms) : 0, 3784
Flare Poller [candidate] (3.69 ms) : 0, 3690
ProfilingAgent [baseline] (99.398 ms) : 0, 99398
ProfilingAgent [candidate] (96.723 ms) : 0, 96723
Profiling [baseline] (100.013 ms) : 0, 100013
Profiling [candidate] (97.302 ms) : 0, 97302
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.082 s) : 0, 1082017
Total [baseline] (8.742 s) : 0, 8741716
Agent [candidate] (1.094 s) : 0, 1093633
Total [candidate] (8.692 s) : 0, 8691781
section iast
Agent [baseline] (1.222 s) : 0, 1221641
Total [baseline] (9.331 s) : 0, 9331423
Agent [candidate] (1.224 s) : 0, 1224053
Total [candidate] (9.318 s) : 0, 9317817
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.206 ms) : 0, 1206
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (649.868 ms) : 0, 649868
BytebuddyAgent [candidate] (657.482 ms) : 0, 657482
GlobalTracer [baseline] (282.052 ms) : 0, 282052
GlobalTracer [candidate] (284.871 ms) : 0, 284871
AppSec [baseline] (32.495 ms) : 0, 32495
AppSec [candidate] (33.036 ms) : 0, 33036
Debugger [baseline] (67.58 ms) : 0, 67580
Debugger [candidate] (68.108 ms) : 0, 68108
Remote Config [baseline] (624.074 µs) : 0, 624
Remote Config [candidate] (638.144 µs) : 0, 638
Telemetry [baseline] (9.031 ms) : 0, 9031
Telemetry [candidate] (8.87 ms) : 0, 8870
Flare Poller [baseline] (3.712 ms) : 0, 3712
Flare Poller [candidate] (3.732 ms) : 0, 3732
section iast
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (790.361 ms) : 0, 790361
BytebuddyAgent [candidate] (792.469 ms) : 0, 792469
GlobalTracer [baseline] (255.494 ms) : 0, 255494
GlobalTracer [candidate] (256.333 ms) : 0, 256333
IAST [baseline] (27.003 ms) : 0, 27003
IAST [candidate] (26.912 ms) : 0, 26912
AppSec [baseline] (34.637 ms) : 0, 34637
AppSec [candidate] (33.582 ms) : 0, 33582
Debugger [baseline] (64.828 ms) : 0, 64828
Debugger [candidate] (65.565 ms) : 0, 65565
Remote Config [baseline] (608.916 µs) : 0, 609
Remote Config [candidate] (608.665 µs) : 0, 609
Telemetry [baseline] (8.543 ms) : 0, 8543
Telemetry [candidate] (8.379 ms) : 0, 8379
Flare Poller [baseline] (3.613 ms) : 0, 3613
Flare Poller [candidate] (3.575 ms) : 0, 3575
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (1.18 ms) : 1169, 1191
. : milestone, 1180,
iast (3.207 ms) : 3170, 3244
. : milestone, 3207,
iast_FULL (5.945 ms) : 5885, 6005
. : milestone, 5945,
iast_GLOBAL (3.634 ms) : 3582, 3687
. : milestone, 3634,
profiling (1.937 ms) : 1921, 1953
. : milestone, 1937,
tracing (1.831 ms) : 1815, 1846
. : milestone, 1831,
section candidate
no_agent (1.186 ms) : 1174, 1197
. : milestone, 1186,
iast (3.242 ms) : 3194, 3291
. : milestone, 3242,
iast_FULL (5.732 ms) : 5675, 5790
. : milestone, 5732,
iast_GLOBAL (3.512 ms) : 3461, 3563
. : milestone, 3512,
profiling (2.069 ms) : 2051, 2087
. : milestone, 2069,
tracing (1.794 ms) : 1779, 1810
. : milestone, 1794,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (19.099 ms) : 18899, 19299
. : milestone, 19099,
appsec (18.559 ms) : 18374, 18743
. : milestone, 18559,
code_origins (17.878 ms) : 17697, 18058
. : milestone, 17878,
iast (17.711 ms) : 17535, 17887
. : milestone, 17711,
profiling (18.465 ms) : 18278, 18652
. : milestone, 18465,
tracing (17.67 ms) : 17493, 17847
. : milestone, 17670,
section candidate
no_agent (17.845 ms) : 17663, 18027
. : milestone, 17845,
appsec (19.706 ms) : 19503, 19909
. : milestone, 19706,
code_origins (18.156 ms) : 17977, 18334
. : milestone, 18156,
iast (17.578 ms) : 17405, 17751
. : milestone, 17578,
profiling (18.868 ms) : 18682, 19053
. : milestone, 18868,
tracing (17.744 ms) : 17569, 17919
. : milestone, 17744,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (14.843 s) : 14843000, 14843000
. : milestone, 14843000,
appsec (14.46 s) : 14460000, 14460000
. : milestone, 14460000,
iast (17.867 s) : 17867000, 17867000
. : milestone, 17867000,
iast_GLOBAL (18.011 s) : 18011000, 18011000
. : milestone, 18011000,
profiling (14.985 s) : 14985000, 14985000
. : milestone, 14985000,
tracing (14.636 s) : 14636000, 14636000
. : milestone, 14636000,
section candidate
no_agent (15.327 s) : 15327000, 15327000
. : milestone, 15327000,
appsec (14.415 s) : 14415000, 14415000
. : milestone, 14415000,
iast (18.128 s) : 18128000, 18128000
. : milestone, 18128000,
iast_GLOBAL (17.891 s) : 17891000, 17891000
. : milestone, 17891000,
profiling (14.946 s) : 14946000, 14946000
. : milestone, 14946000,
tracing (14.703 s) : 14703000, 14703000
. : milestone, 14703000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~808a798a22, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.611 ms) : 3395, 3826
. : milestone, 3611,
iast (2.2 ms) : 2135, 2265
. : milestone, 2200,
iast_GLOBAL (2.253 ms) : 2188, 2318
. : milestone, 2253,
profiling (2.046 ms) : 1994, 2098
. : milestone, 2046,
tracing (2.044 ms) : 1993, 2095
. : milestone, 2044,
section candidate
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (3.731 ms) : 3511, 3952
. : milestone, 3731,
iast (2.199 ms) : 2135, 2263
. : milestone, 2199,
iast_GLOBAL (2.244 ms) : 2179, 2309
. : milestone, 2244,
profiling (2.067 ms) : 2014, 2119
. : milestone, 2067,
tracing (2.045 ms) : 1994, 2096
. : milestone, 2045,
|
...ng/src/main/java25/datadog/trace/agent/tooling/servicediscovery/ForeignMemoryWriterImpl.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/TracerInstaller.java
Outdated
Show resolved
Hide resolved
...ng/src/main/java25/datadog/trace/agent/tooling/servicediscovery/ForeignMemoryWriterImpl.java
Outdated
Show resolved
Hide resolved
...ng/src/main/java25/datadog/trace/agent/tooling/servicediscovery/ForeignMemoryWriterImpl.java
Outdated
Show resolved
Hide resolved
...-tooling/src/test/java/datadog/trace/agent/tooling/servicediscovery/MemFDUnixWriterTest.java
Show resolved
Hide resolved
da9c1b5 to
808a798
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Thanks for the follow up changes!
What Does This Do
Replace JNA based service discovery with a more future-proof implementation using FFM (panama) API.
The new implementation is plugged when the jvm is at least 22 otherwise the old jna based is used.
Unit test is provided
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]