Explicit Gradle daemon isolation in build logic tests#10912
Open
Explicit Gradle daemon isolation in build logic tests#10912
Conversation
In 748292c the GradleRuner used the temporary directory of the current test (projectDir) which comes from JUnit's `@TempDir`. When JUnit finishes its test it tries to cleanupt the temporary folder, however the daemon may still be running and lock files under this folder. With the change each fixture still gets its own isolated testkit dir to ensure the daemon isolation preserved. gradle/gradle#12535
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 63 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1069923
Total [baseline] (8.864 s) : 0, 8864098
Agent [candidate] (1.065 s) : 0, 1065218
Total [candidate] (8.832 s) : 0, 8832238
section iast
Agent [baseline] (1.224 s) : 0, 1223803
Total [baseline] (9.518 s) : 0, 9518137
Agent [candidate] (1.229 s) : 0, 1228923
Total [candidate] (9.535 s) : 0, 9534732
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (637.404 ms) : 0, 637404
BytebuddyAgent [candidate] (633.364 ms) : 0, 633364
AgentMeter [baseline] (29.771 ms) : 0, 29771
AgentMeter [candidate] (29.606 ms) : 0, 29606
GlobalTracer [baseline] (259.721 ms) : 0, 259721
GlobalTracer [candidate] (258.56 ms) : 0, 258560
AppSec [baseline] (32.204 ms) : 0, 32204
AppSec [candidate] (31.918 ms) : 0, 31918
Debugger [baseline] (60.294 ms) : 0, 60294
Debugger [candidate] (59.915 ms) : 0, 59915
Remote Config [baseline] (593.549 µs) : 0, 594
Remote Config [candidate] (587.341 µs) : 0, 587
Telemetry [baseline] (8.116 ms) : 0, 8116
Telemetry [candidate] (8.064 ms) : 0, 8064
Flare Poller [baseline] (4.304 ms) : 0, 4304
Flare Poller [candidate] (5.858 ms) : 0, 5858
section iast
crashtracking [baseline] (1.213 ms) : 0, 1213
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (794.448 ms) : 0, 794448
BytebuddyAgent [candidate] (796.991 ms) : 0, 796991
AgentMeter [baseline] (11.38 ms) : 0, 11380
AgentMeter [candidate] (11.429 ms) : 0, 11429
GlobalTracer [baseline] (246.403 ms) : 0, 246403
GlobalTracer [candidate] (247.902 ms) : 0, 247902
IAST [baseline] (25.329 ms) : 0, 25329
IAST [candidate] (25.425 ms) : 0, 25425
AppSec [baseline] (26.357 ms) : 0, 26357
AppSec [candidate] (26.572 ms) : 0, 26572
Debugger [baseline] (68.315 ms) : 0, 68315
Debugger [candidate] (69.58 ms) : 0, 69580
Remote Config [baseline] (527.597 µs) : 0, 528
Remote Config [candidate] (553.666 µs) : 0, 554
Telemetry [baseline] (10.184 ms) : 0, 10184
Telemetry [candidate] (9.729 ms) : 0, 9729
Flare Poller [baseline] (3.623 ms) : 0, 3623
Flare Poller [candidate] (3.491 ms) : 0, 3491
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056520
Total [baseline] (11.02 s) : 0, 11019532
Agent [candidate] (1.054 s) : 0, 1054366
Total [candidate] (11.069 s) : 0, 11068656
section appsec
Agent [baseline] (1.246 s) : 0, 1245657
Total [baseline] (11.111 s) : 0, 11110716
Agent [candidate] (1.253 s) : 0, 1253050
Total [candidate] (11.202 s) : 0, 11202006
section iast
Agent [baseline] (1.236 s) : 0, 1235524
Total [baseline] (11.308 s) : 0, 11307561
Agent [candidate] (1.228 s) : 0, 1227672
Total [candidate] (11.205 s) : 0, 11205282
section profiling
Agent [baseline] (1.182 s) : 0, 1182332
Total [baseline] (11.038 s) : 0, 11037731
Agent [candidate] (1.19 s) : 0, 1189759
Total [candidate] (11.074 s) : 0, 11074093
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (628.923 ms) : 0, 628923
BytebuddyAgent [candidate] (626.808 ms) : 0, 626808
AgentMeter [baseline] (29.312 ms) : 0, 29312
AgentMeter [candidate] (29.277 ms) : 0, 29277
GlobalTracer [baseline] (256.977 ms) : 0, 256977
GlobalTracer [candidate] (256.53 ms) : 0, 256530
AppSec [baseline] (31.727 ms) : 0, 31727
AppSec [candidate] (31.643 ms) : 0, 31643
Debugger [baseline] (60.263 ms) : 0, 60263
Debugger [candidate] (60.171 ms) : 0, 60171
Remote Config [baseline] (604.705 µs) : 0, 605
Remote Config [candidate] (589.793 µs) : 0, 590
Telemetry [baseline] (7.999 ms) : 0, 7999
Telemetry [candidate] (7.959 ms) : 0, 7959
Flare Poller [baseline] (3.517 ms) : 0, 3517
Flare Poller [candidate] (4.302 ms) : 0, 4302
section appsec
crashtracking [baseline] (1.191 ms) : 0, 1191
crashtracking [candidate] (1.215 ms) : 0, 1215
BytebuddyAgent [baseline] (657.868 ms) : 0, 657868
BytebuddyAgent [candidate] (662.865 ms) : 0, 662865
AgentMeter [baseline] (12.171 ms) : 0, 12171
AgentMeter [candidate] (12.198 ms) : 0, 12198
GlobalTracer [baseline] (258.092 ms) : 0, 258092
GlobalTracer [candidate] (259.357 ms) : 0, 259357
IAST [baseline] (24.199 ms) : 0, 24199
IAST [candidate] (24.351 ms) : 0, 24351
AppSec [baseline] (177.504 ms) : 0, 177504
AppSec [candidate] (178.139 ms) : 0, 178139
Debugger [baseline] (65.972 ms) : 0, 65972
Debugger [candidate] (66.19 ms) : 0, 66190
Remote Config [baseline] (622.008 µs) : 0, 622
Remote Config [candidate] (625.161 µs) : 0, 625
Telemetry [baseline] (8.335 ms) : 0, 8335
Telemetry [candidate] (8.296 ms) : 0, 8296
Flare Poller [baseline] (3.566 ms) : 0, 3566
Flare Poller [candidate] (3.559 ms) : 0, 3559
section iast
crashtracking [baseline] (1.202 ms) : 0, 1202
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (802.423 ms) : 0, 802423
BytebuddyAgent [candidate] (796.21 ms) : 0, 796210
AgentMeter [baseline] (11.685 ms) : 0, 11685
AgentMeter [candidate] (11.439 ms) : 0, 11439
GlobalTracer [baseline] (248.476 ms) : 0, 248476
GlobalTracer [candidate] (247.485 ms) : 0, 247485
IAST [baseline] (25.632 ms) : 0, 25632
IAST [candidate] (25.334 ms) : 0, 25334
AppSec [baseline] (26.673 ms) : 0, 26673
AppSec [candidate] (26.506 ms) : 0, 26506
Debugger [baseline] (66.913 ms) : 0, 66913
Debugger [candidate] (69.595 ms) : 0, 69595
Remote Config [baseline] (537.489 µs) : 0, 537
Remote Config [candidate] (534.047 µs) : 0, 534
Telemetry [baseline] (11.777 ms) : 0, 11777
Telemetry [candidate] (9.742 ms) : 0, 9742
Flare Poller [baseline] (4.082 ms) : 0, 4082
Flare Poller [candidate] (3.527 ms) : 0, 3527
section profiling
crashtracking [baseline] (1.161 ms) : 0, 1161
crashtracking [candidate] (1.181 ms) : 0, 1181
BytebuddyAgent [baseline] (682.196 ms) : 0, 682196
BytebuddyAgent [candidate] (687.125 ms) : 0, 687125
AgentMeter [baseline] (9.034 ms) : 0, 9034
AgentMeter [candidate] (9.034 ms) : 0, 9034
GlobalTracer [baseline] (215.354 ms) : 0, 215354
GlobalTracer [candidate] (216.65 ms) : 0, 216650
AppSec [baseline] (32.169 ms) : 0, 32169
AppSec [candidate] (32.443 ms) : 0, 32443
Debugger [baseline] (66.236 ms) : 0, 66236
Debugger [candidate] (65.339 ms) : 0, 65339
Remote Config [baseline] (564.874 µs) : 0, 565
Remote Config [candidate] (564.357 µs) : 0, 564
Telemetry [baseline] (7.72 ms) : 0, 7720
Telemetry [candidate] (7.768 ms) : 0, 7768
Flare Poller [baseline] (3.452 ms) : 0, 3452
Flare Poller [candidate] (4.29 ms) : 0, 4290
ProfilingAgent [baseline] (93.553 ms) : 0, 93553
ProfilingAgent [candidate] (93.909 ms) : 0, 93909
Profiling [baseline] (94.115 ms) : 0, 94115
Profiling [candidate] (94.473 ms) : 0, 94473
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 3 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.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section baseline
no_agent (1.172 ms) : 1161, 1183
. : milestone, 1172,
iast (3.121 ms) : 3078, 3165
. : milestone, 3121,
iast_FULL (5.726 ms) : 5669, 5783
. : milestone, 5726,
iast_GLOBAL (3.568 ms) : 3514, 3621
. : milestone, 3568,
profiling (2.2 ms) : 2178, 2222
. : milestone, 2200,
tracing (1.752 ms) : 1738, 1766
. : milestone, 1752,
section candidate
no_agent (1.178 ms) : 1167, 1190
. : milestone, 1178,
iast (3.257 ms) : 3210, 3304
. : milestone, 3257,
iast_FULL (6.0 ms) : 5939, 6061
. : milestone, 6000,
iast_GLOBAL (3.666 ms) : 3606, 3725
. : milestone, 3666,
profiling (2.154 ms) : 2132, 2175
. : milestone, 2154,
tracing (1.82 ms) : 1803, 1836
. : milestone, 1820,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section baseline
no_agent (17.886 ms) : 17704, 18068
. : milestone, 17886,
appsec (18.364 ms) : 18179, 18549
. : milestone, 18364,
code_origins (18.116 ms) : 17936, 18296
. : milestone, 18116,
iast (17.828 ms) : 17651, 18005
. : milestone, 17828,
profiling (19.58 ms) : 19382, 19778
. : milestone, 19580,
tracing (17.86 ms) : 17682, 18038
. : milestone, 17860,
section candidate
no_agent (19.232 ms) : 19033, 19430
. : milestone, 19232,
appsec (18.471 ms) : 18282, 18660
. : milestone, 18471,
code_origins (18.605 ms) : 18416, 18794
. : milestone, 18605,
iast (17.956 ms) : 17780, 18132
. : milestone, 17956,
profiling (19.702 ms) : 19500, 19903
. : milestone, 19702,
tracing (17.808 ms) : 17631, 17985
. : milestone, 17808,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section baseline
no_agent (1.484 ms) : 1472, 1496
. : milestone, 1484,
appsec (3.801 ms) : 3580, 4022
. : milestone, 3801,
iast (2.262 ms) : 2193, 2330
. : milestone, 2262,
iast_GLOBAL (2.304 ms) : 2234, 2373
. : milestone, 2304,
profiling (2.088 ms) : 2033, 2142
. : milestone, 2088,
tracing (2.071 ms) : 2018, 2124
. : milestone, 2071,
section candidate
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (3.818 ms) : 3595, 4040
. : milestone, 3818,
iast (2.262 ms) : 2193, 2331
. : milestone, 2262,
iast_GLOBAL (2.304 ms) : 2234, 2373
. : milestone, 2304,
profiling (2.093 ms) : 2038, 2149
. : milestone, 2093,
tracing (2.076 ms) : 2023, 2130
. : milestone, 2076,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~ddc823dcf0, baseline=1.61.0-SNAPSHOT~828c9cc58f
dateFormat X
axisFormat %s
section baseline
no_agent (14.952 s) : 14952000, 14952000
. : milestone, 14952000,
appsec (14.651 s) : 14651000, 14651000
. : milestone, 14651000,
iast (18.69 s) : 18690000, 18690000
. : milestone, 18690000,
iast_GLOBAL (17.747 s) : 17747000, 17747000
. : milestone, 17747000,
profiling (15.041 s) : 15041000, 15041000
. : milestone, 15041000,
tracing (14.672 s) : 14672000, 14672000
. : milestone, 14672000,
section candidate
no_agent (15.459 s) : 15459000, 15459000
. : milestone, 15459000,
appsec (14.993 s) : 14993000, 14993000
. : milestone, 14993000,
iast (18.18 s) : 18180000, 18180000
. : milestone, 18180000,
iast_GLOBAL (17.93 s) : 17930000, 17930000
. : milestone, 17930000,
profiling (15.055 s) : 15055000, 15055000
. : milestone, 15055000,
tracing (14.87 s) : 14870000, 14870000
. : milestone, 14870000,
|
Commit 41002d9 intended to place the testkit directory in a separate OS temp location, but the change still used file(".testkit") which resolves to File(projectDir, ".testkit") — still inside the JUnit @tempdir. So closing the daemon is not enough because the Gradle daemon held file locks on the testkit caches when JUnit attempted cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Shutdown the Gradle daemon that are started in the build logic plugin tests. Before Gradle daemon could lock some files longer than what JUnit wants.
Motivation
Build stability
Additional Notes
Related to gradle/gradle#12535