-
Notifications
You must be signed in to change notification settings - Fork 319
Drop the requirement of jvm environment variables for testJvm constraint
#9968
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
…ocal env, but keep them in CI
…ocal env, but keep them in CI
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 5 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.107 s) : 0, 1106549
Total [baseline] (8.863 s) : 0, 8863456
Agent [candidate] (1.113 s) : 0, 1112806
Total [candidate] (8.87 s) : 0, 8870418
section iast
Agent [baseline] (1.251 s) : 0, 1251133
Total [baseline] (9.565 s) : 0, 9565315
Agent [candidate] (1.253 s) : 0, 1252701
Total [candidate] (9.608 s) : 0, 9608122
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (710.883 ms) : 0, 710883
BytebuddyAgent [candidate] (716.673 ms) : 0, 716673
GlobalTracer [baseline] (250.824 ms) : 0, 250824
GlobalTracer [candidate] (251.299 ms) : 0, 251299
AppSec [baseline] (32.459 ms) : 0, 32459
AppSec [candidate] (32.316 ms) : 0, 32316
Debugger [baseline] (63.391 ms) : 0, 63391
Debugger [candidate] (63.321 ms) : 0, 63321
Remote Config [baseline] (631.149 µs) : 0, 631
Remote Config [candidate] (643.019 µs) : 0, 643
Telemetry [baseline] (8.264 ms) : 0, 8264
Telemetry [candidate] (8.263 ms) : 0, 8263
Flare Poller [baseline] (3.75 ms) : 0, 3750
Flare Poller [candidate] (3.696 ms) : 0, 3696
section iast
crashtracking [baseline] (1.485 ms) : 0, 1485
crashtracking [candidate] (1.477 ms) : 0, 1477
BytebuddyAgent [baseline] (841.321 ms) : 0, 841321
BytebuddyAgent [candidate] (842.75 ms) : 0, 842750
GlobalTracer [baseline] (239.076 ms) : 0, 239076
GlobalTracer [candidate] (239.187 ms) : 0, 239187
AppSec [baseline] (33.26 ms) : 0, 33260
AppSec [candidate] (33.539 ms) : 0, 33539
Debugger [baseline] (60.551 ms) : 0, 60551
Debugger [candidate] (60.183 ms) : 0, 60183
Remote Config [baseline] (553.404 µs) : 0, 553
Remote Config [candidate] (544.473 µs) : 0, 544
Telemetry [baseline] (7.609 ms) : 0, 7609
Telemetry [candidate] (7.614 ms) : 0, 7614
Flare Poller [baseline] (3.444 ms) : 0, 3444
Flare Poller [candidate] (3.457 ms) : 0, 3457
IAST [baseline] (28.716 ms) : 0, 28716
IAST [candidate] (28.614 ms) : 0, 28614
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.103 s) : 0, 1103420
Total [baseline] (10.768 s) : 0, 10768363
Agent [candidate] (1.117 s) : 0, 1117157
Total [candidate] (10.9 s) : 0, 10899940
section appsec
Agent [baseline] (1.294 s) : 0, 1293789
Total [baseline] (11.224 s) : 0, 11223558
Agent [candidate] (1.284 s) : 0, 1284448
Total [candidate] (11.134 s) : 0, 11134259
section iast
Agent [baseline] (1.252 s) : 0, 1252050
Total [baseline] (11.303 s) : 0, 11303403
Agent [candidate] (1.243 s) : 0, 1243290
Total [candidate] (11.227 s) : 0, 11226789
section profiling
Agent [baseline] (1.235 s) : 0, 1235027
Total [baseline] (11.151 s) : 0, 11150502
Agent [candidate] (1.235 s) : 0, 1234675
Total [candidate] (11.199 s) : 0, 11198751
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.447 ms) : 0, 1447
crashtracking [candidate] (1.479 ms) : 0, 1479
BytebuddyAgent [baseline] (708.168 ms) : 0, 708168
BytebuddyAgent [candidate] (718.223 ms) : 0, 718223
GlobalTracer [baseline] (249.647 ms) : 0, 249647
GlobalTracer [candidate] (252.509 ms) : 0, 252509
AppSec [baseline] (32.127 ms) : 0, 32127
AppSec [candidate] (32.546 ms) : 0, 32546
Debugger [baseline] (64.283 ms) : 0, 64283
Debugger [candidate] (64.545 ms) : 0, 64545
Remote Config [baseline] (631.286 µs) : 0, 631
Remote Config [candidate] (638.741 µs) : 0, 639
Telemetry [baseline] (8.396 ms) : 0, 8396
Telemetry [candidate] (8.319 ms) : 0, 8319
Flare Poller [baseline] (3.82 ms) : 0, 3820
Flare Poller [candidate] (3.717 ms) : 0, 3717
section appsec
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.469 ms) : 0, 1469
BytebuddyAgent [baseline] (738.148 ms) : 0, 738148
BytebuddyAgent [candidate] (733.897 ms) : 0, 733897
GlobalTracer [baseline] (242.615 ms) : 0, 242615
GlobalTracer [candidate] (241.136 ms) : 0, 241136
AppSec [baseline] (176.061 ms) : 0, 176061
AppSec [candidate] (174.143 ms) : 0, 174143
Debugger [baseline] (62.347 ms) : 0, 62347
Debugger [candidate] (61.222 ms) : 0, 61222
Remote Config [baseline] (666.86 µs) : 0, 667
Remote Config [candidate] (661.508 µs) : 0, 662
Telemetry [baseline] (8.217 ms) : 0, 8217
Telemetry [candidate] (8.194 ms) : 0, 8194
Flare Poller [baseline] (3.944 ms) : 0, 3944
Flare Poller [candidate] (3.965 ms) : 0, 3965
IAST [baseline] (25.094 ms) : 0, 25094
IAST [candidate] (24.758 ms) : 0, 24758
section iast
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (842.007 ms) : 0, 842007
BytebuddyAgent [candidate] (834.462 ms) : 0, 834462
GlobalTracer [baseline] (239.27 ms) : 0, 239270
GlobalTracer [candidate] (238.224 ms) : 0, 238224
AppSec [baseline] (33.138 ms) : 0, 33138
AppSec [candidate] (34.066 ms) : 0, 34066
Debugger [baseline] (60.732 ms) : 0, 60732
Debugger [candidate] (60.669 ms) : 0, 60669
Remote Config [baseline] (548.993 µs) : 0, 549
Remote Config [candidate] (536.818 µs) : 0, 537
Telemetry [baseline] (7.576 ms) : 0, 7576
Telemetry [candidate] (7.629 ms) : 0, 7629
Flare Poller [baseline] (3.474 ms) : 0, 3474
Flare Poller [candidate] (3.481 ms) : 0, 3481
IAST [baseline] (28.63 ms) : 0, 28630
IAST [candidate] (27.692 ms) : 0, 27692
section profiling
crashtracking [baseline] (1.447 ms) : 0, 1447
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (735.59 ms) : 0, 735590
BytebuddyAgent [candidate] (735.478 ms) : 0, 735478
GlobalTracer [baseline] (223.388 ms) : 0, 223388
GlobalTracer [candidate] (223.229 ms) : 0, 223229
AppSec [baseline] (32.229 ms) : 0, 32229
AppSec [candidate] (32.326 ms) : 0, 32326
Debugger [baseline] (63.081 ms) : 0, 63081
Debugger [candidate] (63.257 ms) : 0, 63257
Remote Config [baseline] (674.202 µs) : 0, 674
Remote Config [candidate] (650.602 µs) : 0, 651
Telemetry [baseline] (8.051 ms) : 0, 8051
Telemetry [candidate] (7.971 ms) : 0, 7971
Flare Poller [baseline] (3.805 ms) : 0, 3805
Flare Poller [candidate] (3.806 ms) : 0, 3806
ProfilingAgent [baseline] (96.819 ms) : 0, 96819
ProfilingAgent [candidate] (96.801 ms) : 0, 96801
Profiling [baseline] (97.41 ms) : 0, 97410
Profiling [candidate] (97.383 ms) : 0, 97383
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section baseline
no_agent (1.185 ms) : 1174, 1196
. : milestone, 1185,
iast (3.264 ms) : 3218, 3309
. : milestone, 3264,
iast_FULL (5.825 ms) : 5766, 5884
. : milestone, 5825,
iast_GLOBAL (3.352 ms) : 3307, 3396
. : milestone, 3352,
profiling (2.061 ms) : 2043, 2079
. : milestone, 2061,
tracing (1.874 ms) : 1857, 1890
. : milestone, 1874,
section candidate
no_agent (1.204 ms) : 1192, 1216
. : milestone, 1204,
iast (3.287 ms) : 3240, 3333
. : milestone, 3287,
iast_FULL (5.863 ms) : 5791, 5936
. : milestone, 5863,
iast_GLOBAL (3.503 ms) : 3453, 3554
. : milestone, 3503,
profiling (2.014 ms) : 1997, 2031
. : milestone, 2014,
tracing (1.829 ms) : 1812, 1846
. : milestone, 1829,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section baseline
no_agent (19.1 ms) : 18907, 19292
. : milestone, 19100,
appsec (18.664 ms) : 18472, 18857
. : milestone, 18664,
code_origins (17.927 ms) : 17745, 18109
. : milestone, 17927,
iast (18.257 ms) : 18076, 18438
. : milestone, 18257,
profiling (19.975 ms) : 19775, 20176
. : milestone, 19975,
tracing (17.527 ms) : 17356, 17698
. : milestone, 17527,
section candidate
no_agent (17.953 ms) : 17770, 18135
. : milestone, 17953,
appsec (18.603 ms) : 18414, 18792
. : milestone, 18603,
code_origins (18.802 ms) : 18615, 18989
. : milestone, 18802,
iast (17.987 ms) : 17807, 18168
. : milestone, 17987,
profiling (18.829 ms) : 18641, 19018
. : milestone, 18829,
tracing (17.585 ms) : 17408, 17762
. : milestone, 17585,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section baseline
no_agent (15.026 s) : 15026000, 15026000
. : milestone, 15026000,
appsec (14.572 s) : 14572000, 14572000
. : milestone, 14572000,
iast (18.242 s) : 18242000, 18242000
. : milestone, 18242000,
iast_GLOBAL (17.998 s) : 17998000, 17998000
. : milestone, 17998000,
profiling (15.283 s) : 15283000, 15283000
. : milestone, 15283000,
tracing (14.61 s) : 14610000, 14610000
. : milestone, 14610000,
section candidate
no_agent (15.777 s) : 15777000, 15777000
. : milestone, 15777000,
appsec (14.475 s) : 14475000, 14475000
. : milestone, 14475000,
iast (18.475 s) : 18475000, 18475000
. : milestone, 18475000,
iast_GLOBAL (18.249 s) : 18249000, 18249000
. : milestone, 18249000,
profiling (14.915 s) : 14915000, 14915000
. : milestone, 14915000,
tracing (14.901 s) : 14901000, 14901000
. : milestone, 14901000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~e5d8ca24c1, baseline=1.57.0-SNAPSHOT~533755a5d1
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (3.671 ms) : 3456, 3886
. : milestone, 3671,
iast (2.22 ms) : 2156, 2285
. : milestone, 2220,
iast_GLOBAL (2.259 ms) : 2194, 2324
. : milestone, 2259,
profiling (2.089 ms) : 2035, 2144
. : milestone, 2089,
tracing (2.054 ms) : 2003, 2105
. : milestone, 2054,
section candidate
no_agent (1.479 ms) : 1468, 1491
. : milestone, 1479,
appsec (2.478 ms) : 2426, 2530
. : milestone, 2478,
iast (2.214 ms) : 2150, 2279
. : milestone, 2214,
iast_GLOBAL (2.26 ms) : 2195, 2324
. : milestone, 2260,
profiling (2.097 ms) : 2043, 2150
. : milestone, 2097,
tracing (2.051 ms) : 2000, 2102
. : milestone, 2051,
|
| if (javaVersions.isEmpty()) { | ||
| throw GradleException("No valid JAVA_X_HOME environment variables found.") | ||
| when (testJvm) { | ||
| "stable" -> { |
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.
Could we rename stable -> latest? or similar? stable is kind of misleading to me, WDYT?
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.
I'm hesitant to that right now, as there were prior discussions on this.
Maybe we can have both, like lastStable :D
| * Handles the `testJvm` property to resolve a Java launcher for testing. | ||
| * | ||
| * The `testJvm` property can be set via command line or environment variable to specify | ||
| * which JVM to use for running tests. E.g. | ||
| * | ||
| * ```shell | ||
| * ./gradlew test -DtestJvm=ZULU11 | ||
| * ``` |
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.
I wish we have TESTING.md with all this useful documentation from this class :)
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.
Exactly, I started the kdoc here, so we can reuse this text for such a file.
buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt
Outdated
Show resolved
Hide resolved
|
Nice! |
Co-authored-by: Sarah Chen <sarah.chen@datadoghq.com>
…-JVM-environment-variables
…raint (#9968) * chore: Drop org.gradle.java.installations.fromEnv toolchain restriction * chore: Drop org.gradle.java.installations toolchain restriction for local env, but keep them in CI * chore: Drop org.gradle.java.installations toolchain restriction for local env, but keep them in CI * feat: Allow discovery of testJvm without environment variables * feat: Only rely on Gradle's toolchain to run tests * fix: Auto discover JAVA_xx_HOME variables from the build image * typo: Use `-P` Co-authored-by: Sarah Chen <sarah.chen@datadoghq.com> --------- Co-authored-by: Sarah Chen <sarah.chen@datadoghq.com>
What Does This Do
Allow our testJvmContraint plugin to let Gradle find the relevant JVM using the Gradle Toolchain.
Also, in CI, discover dynamically the JAVA_x_HOME environment variables exposed by the DataDog/dd-trace-java-docker-build image.
Motivation
Easier local setup. And follow-up to
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]