Skip to content

Conversation

sarahchen6
Copy link
Contributor

What Does This Do

Update the build.gradle files for apache-http* instrumentations to kotlin

Motivation

Slowly upgrade our build

Additional Notes

I based a few changes in this PR off of #9103... Thanks @bric3 !

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@sarahchen6 sarahchen6 added type: enhancement Enhancements and improvements tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Sep 16, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Sep 16, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 59.75% (+0.09%)

View detailed report

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

@pr-commenter
Copy link

pr-commenter bot commented Sep 16, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master sarahchen6/kotlin-upgrade-pt-1
git_commit_date 1758053904 1758060454
git_commit_sha c68b54c 3bca58b
release_version 1.54.0-SNAPSHOT~c68b54c4d1 1.54.0-SNAPSHOT~3bca58b0ec
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1758062464 1758062464
ci_job_id 1132814190 1132814190
ci_pipeline_id 76690172 76690172
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-x4kymiyj 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-x4kymiyj 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 50 metrics, 9 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.06 s) : 0, 1060472
Total [baseline] (10.875 s) : 0, 10874918
Agent [candidate] (1.062 s) : 0, 1062404
Total [candidate] (10.661 s) : 0, 10661171
section appsec
Agent [baseline] (1.239 s) : 0, 1239486
Total [baseline] (11.075 s) : 0, 11075334
Agent [candidate] (1.236 s) : 0, 1235601
Total [candidate] (11.019 s) : 0, 11019037
section iast
Agent [baseline] (1.188 s) : 0, 1188022
Total [baseline] (10.958 s) : 0, 10958327
Agent [candidate] (1.189 s) : 0, 1188536
Total [candidate] (11.049 s) : 0, 11049226
section profiling
Agent [baseline] (1.211 s) : 0, 1211370
Total [baseline] (10.917 s) : 0, 10917397
Agent [candidate] (1.208 s) : 0, 1207919
Total [candidate] (10.847 s) : 0, 10847002
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.06 s -
Agent appsec 1.239 s 179.015 ms (16.9%)
Agent iast 1.188 s 127.551 ms (12.0%)
Agent profiling 1.211 s 150.898 ms (14.2%)
Total tracing 10.875 s -
Total appsec 11.075 s 200.416 ms (1.8%)
Total iast 10.958 s 83.409 ms (0.8%)
Total profiling 10.917 s 42.479 ms (0.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent appsec 1.236 s 173.196 ms (16.3%)
Agent iast 1.189 s 126.132 ms (11.9%)
Agent profiling 1.208 s 145.515 ms (13.7%)
Total tracing 10.661 s -
Total appsec 11.019 s 357.867 ms (3.4%)
Total iast 11.049 s 388.055 ms (3.6%)
Total profiling 10.847 s 185.832 ms (1.7%)
gantt
    title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.449 ms) : 0, 1449
crashtracking [candidate] (1.446 ms) : 0, 1446
BytebuddyAgent [baseline] (732.031 ms) : 0, 732031
BytebuddyAgent [candidate] (733.448 ms) : 0, 733448
GlobalTracer [baseline] (252.125 ms) : 0, 252125
GlobalTracer [candidate] (252.555 ms) : 0, 252555
AppSec [baseline] (30.526 ms) : 0, 30526
AppSec [candidate] (30.582 ms) : 0, 30582
Debugger [baseline] (6.387 ms) : 0, 6387
Debugger [candidate] (6.444 ms) : 0, 6444
Remote Config [baseline] (694.837 µs) : 0, 695
Remote Config [candidate] (692.107 µs) : 0, 692
Telemetry [baseline] (16.213 ms) : 0, 16213
Telemetry [candidate] (16.217 ms) : 0, 16217
section appsec
crashtracking [baseline] (1.454 ms) : 0, 1454
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (758.16 ms) : 0, 758160
BytebuddyAgent [candidate] (756.335 ms) : 0, 756335
GlobalTracer [baseline] (247.572 ms) : 0, 247572
GlobalTracer [candidate] (246.015 ms) : 0, 246015
IAST [baseline] (23.975 ms) : 0, 23975
IAST [candidate] (23.847 ms) : 0, 23847
AppSec [baseline] (171.807 ms) : 0, 171807
AppSec [candidate] (171.611 ms) : 0, 171611
Debugger [baseline] (6.062 ms) : 0, 6062
Debugger [candidate] (6.013 ms) : 0, 6013
Remote Config [baseline] (646.306 µs) : 0, 646
Remote Config [candidate] (640.718 µs) : 0, 641
Telemetry [baseline] (8.589 ms) : 0, 8589
Telemetry [candidate] (8.491 ms) : 0, 8491
section iast
crashtracking [baseline] (1.447 ms) : 0, 1447
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (850.286 ms) : 0, 850286
BytebuddyAgent [candidate] (850.409 ms) : 0, 850409
GlobalTracer [baseline] (245.399 ms) : 0, 245399
GlobalTracer [candidate] (243.003 ms) : 0, 243003
IAST [baseline] (27.056 ms) : 0, 27056
IAST [candidate] (32.484 ms) : 0, 32484
AppSec [baseline] (28.064 ms) : 0, 28064
AppSec [candidate] (25.408 ms) : 0, 25408
Debugger [baseline] (6.002 ms) : 0, 6002
Debugger [candidate] (6.091 ms) : 0, 6091
Remote Config [baseline] (591.872 µs) : 0, 592
Remote Config [candidate] (600.152 µs) : 0, 600
Telemetry [baseline] (8.286 ms) : 0, 8286
Telemetry [candidate] (8.085 ms) : 0, 8085
section profiling
crashtracking [baseline] (1.442 ms) : 0, 1442
crashtracking [candidate] (1.44 ms) : 0, 1440
BytebuddyAgent [baseline] (763.106 ms) : 0, 763106
BytebuddyAgent [candidate] (761.862 ms) : 0, 761862
GlobalTracer [baseline] (233.549 ms) : 0, 233549
GlobalTracer [candidate] (232.851 ms) : 0, 232851
AppSec [baseline] (30.47 ms) : 0, 30470
AppSec [candidate] (30.994 ms) : 0, 30994
Debugger [baseline] (10.611 ms) : 0, 10611
Debugger [candidate] (12.11 ms) : 0, 12110
Remote Config [baseline] (1.538 ms) : 0, 1538
Remote Config [candidate] (1.427 ms) : 0, 1427
Telemetry [baseline] (11.182 ms) : 0, 11182
Telemetry [candidate] (9.373 ms) : 0, 9373
ProfilingAgent [baseline] (107.453 ms) : 0, 107453
ProfilingAgent [candidate] (106.75 ms) : 0, 106750
Profiling [baseline] (108.106 ms) : 0, 108106
Profiling [candidate] (107.401 ms) : 0, 107401
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.061 s) : 0, 1060566
Total [baseline] (8.618 s) : 0, 8617639
Agent [candidate] (1.061 s) : 0, 1060866
Total [candidate] (8.621 s) : 0, 8620971
section iast
Agent [baseline] (1.188 s) : 0, 1188394
Total [baseline] (9.304 s) : 0, 9303970
Agent [candidate] (1.195 s) : 0, 1194686
Total [candidate] (9.361 s) : 0, 9361436
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent iast 1.188 s 127.827 ms (12.1%)
Total tracing 8.618 s -
Total iast 9.304 s 686.331 ms (8.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent iast 1.195 s 133.82 ms (12.6%)
Total tracing 8.621 s -
Total iast 9.361 s 740.466 ms (8.6%)
gantt
    title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.441 ms) : 0, 1441
BytebuddyAgent [baseline] (732.018 ms) : 0, 732018
BytebuddyAgent [candidate] (732.848 ms) : 0, 732848
GlobalTracer [baseline] (252.116 ms) : 0, 252116
GlobalTracer [candidate] (252.496 ms) : 0, 252496
AppSec [baseline] (30.61 ms) : 0, 30610
AppSec [candidate] (30.619 ms) : 0, 30619
Debugger [baseline] (6.392 ms) : 0, 6392
Debugger [candidate] (6.383 ms) : 0, 6383
Remote Config [baseline] (692.127 µs) : 0, 692
Remote Config [candidate] (695.094 µs) : 0, 695
Telemetry [baseline] (15.564 ms) : 0, 15564
Telemetry [candidate] (15.466 ms) : 0, 15466
section iast
crashtracking [baseline] (1.455 ms) : 0, 1455
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (851.14 ms) : 0, 851140
BytebuddyAgent [candidate] (854.33 ms) : 0, 854330
GlobalTracer [baseline] (246.911 ms) : 0, 246911
GlobalTracer [candidate] (248.797 ms) : 0, 248797
AppSec [baseline] (25.349 ms) : 0, 25349
AppSec [candidate] (25.818 ms) : 0, 25818
Debugger [baseline] (6.04 ms) : 0, 6040
Debugger [candidate] (6.121 ms) : 0, 6121
Remote Config [baseline] (592.78 µs) : 0, 593
Remote Config [candidate] (602.687 µs) : 0, 603
Telemetry [baseline] (8.138 ms) : 0, 8138
Telemetry [candidate] (8.357 ms) : 0, 8357
IAST [baseline] (27.93 ms) : 0, 27930
IAST [candidate] (28.275 ms) : 0, 28275
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master sarahchen6/kotlin-upgrade-pt-1
git_commit_date 1758053904 1758060454
git_commit_sha c68b54c 3bca58b
release_version 1.54.0-SNAPSHOT~c68b54c4d1 1.54.0-SNAPSHOT~3bca58b0ec
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1758062206 1758062206
ci_job_id 1132814191 1132814191
ci_pipeline_id 76690172 76690172
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-hbp4d2cc 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-hbp4d2cc 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 0 performance regressions! Performance is the same for 10 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:iast_GLOBAL:high_load better
[-1158.015µs; -765.100µs] or [-10.584%; -6.993%]
unstable
[-12.012op/s; +93.199op/s] or [-2.827%; +21.936%]
9.980ms 465.469op/s 10.941ms 424.875op/s
scenario:load:petclinic:appsec:high_load better
[-3.787ms; -2.869ms] or [-7.553%; -5.722%]
unstable
[+0.018op/s; +13.257op/s] or [+0.019%; +14.203%]
46.809ms 99.975op/s 50.137ms 93.338op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.153 ms) : 36858, 37447
.   : milestone, 37153,
appsec (50.137 ms) : 49694, 50580
.   : milestone, 50137,
code_origins (45.926 ms) : 45519, 46332
.   : milestone, 45926,
iast (44.058 ms) : 43684, 44432
.   : milestone, 44058,
profiling (49.44 ms) : 48903, 49977
.   : milestone, 49440,
tracing (44.657 ms) : 44273, 45040
.   : milestone, 44657,
section candidate
no_agent (38.139 ms) : 37827, 38451
.   : milestone, 38139,
appsec (46.809 ms) : 46399, 47219
.   : milestone, 46809,
code_origins (44.817 ms) : 44432, 45201
.   : milestone, 44817,
iast (44.839 ms) : 44447, 45231
.   : milestone, 44839,
profiling (47.965 ms) : 47535, 48395
.   : milestone, 47965,
tracing (45.155 ms) : 44767, 45543
.   : milestone, 45155,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.153 ms [36.858 ms, 37.447 ms] -
appsec 50.137 ms [49.694 ms, 50.58 ms] 12.984 ms (34.9%)
code_origins 45.926 ms [45.519 ms, 46.332 ms] 8.773 ms (23.6%)
iast 44.058 ms [43.684 ms, 44.432 ms] 6.905 ms (18.6%)
profiling 49.44 ms [48.903 ms, 49.977 ms] 12.287 ms (33.1%)
tracing 44.657 ms [44.273 ms, 45.04 ms] 7.504 ms (20.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 38.139 ms [37.827 ms, 38.451 ms] -
appsec 46.809 ms [46.399 ms, 47.219 ms] 8.67 ms (22.7%)
code_origins 44.817 ms [44.432 ms, 45.201 ms] 6.678 ms (17.5%)
iast 44.839 ms [44.447 ms, 45.231 ms] 6.7 ms (17.6%)
profiling 47.965 ms [47.535 ms, 48.395 ms] 9.826 ms (25.8%)
tracing 45.155 ms [44.767 ms, 45.543 ms] 7.017 ms (18.4%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.285 ms) : 4236, 4335
.   : milestone, 4285,
iast (9.492 ms) : 9336, 9649
.   : milestone, 9492,
iast_FULL (14.636 ms) : 14335, 14936
.   : milestone, 14636,
iast_GLOBAL (10.941 ms) : 10749, 11134
.   : milestone, 10941,
profiling (9.038 ms) : 8888, 9188
.   : milestone, 9038,
tracing (7.476 ms) : 7363, 7588
.   : milestone, 7476,
section candidate
no_agent (4.402 ms) : 4352, 4451
.   : milestone, 4402,
iast (9.579 ms) : 9418, 9741
.   : milestone, 9579,
iast_FULL (14.483 ms) : 14191, 14776
.   : milestone, 14483,
iast_GLOBAL (9.98 ms) : 9808, 10152
.   : milestone, 9980,
profiling (9.081 ms) : 8940, 9222
.   : milestone, 9081,
tracing (7.54 ms) : 7436, 7645
.   : milestone, 7540,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.285 ms [4.236 ms, 4.335 ms] -
iast 9.492 ms [9.336 ms, 9.649 ms] 5.207 ms (121.5%)
iast_FULL 14.636 ms [14.335 ms, 14.936 ms] 10.35 ms (241.5%)
iast_GLOBAL 10.941 ms [10.749 ms, 11.134 ms] 6.656 ms (155.3%)
profiling 9.038 ms [8.888 ms, 9.188 ms] 4.752 ms (110.9%)
tracing 7.476 ms [7.363 ms, 7.588 ms] 3.19 ms (74.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.402 ms [4.352 ms, 4.451 ms] -
iast 9.579 ms [9.418 ms, 9.741 ms] 5.178 ms (117.6%)
iast_FULL 14.483 ms [14.191 ms, 14.776 ms] 10.082 ms (229.0%)
iast_GLOBAL 9.98 ms [9.808 ms, 10.152 ms] 5.578 ms (126.7%)
profiling 9.081 ms [8.94 ms, 9.222 ms] 4.679 ms (106.3%)
tracing 7.54 ms [7.436 ms, 7.645 ms] 3.139 ms (71.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master sarahchen6/kotlin-upgrade-pt-1
git_commit_date 1758053904 1758060454
git_commit_sha c68b54c 3bca58b
release_version 1.54.0-SNAPSHOT~c68b54c4d1 1.54.0-SNAPSHOT~3bca58b0ec
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1758062753 1758062753
ci_job_id 1132814192 1132814192
ci_pipeline_id 76690172 76690172
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-exrbowqb 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-exrbowqb 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 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.474 ms) : 1462, 1485
.   : milestone, 1474,
appsec (3.728 ms) : 3513, 3943
.   : milestone, 3728,
iast (2.207 ms) : 2144, 2271
.   : milestone, 2207,
iast_GLOBAL (2.237 ms) : 2174, 2300
.   : milestone, 2237,
profiling (2.064 ms) : 2012, 2116
.   : milestone, 2064,
tracing (2.026 ms) : 1977, 2075
.   : milestone, 2026,
section candidate
no_agent (1.476 ms) : 1465, 1488
.   : milestone, 1476,
appsec (3.715 ms) : 3495, 3936
.   : milestone, 3715,
iast (2.201 ms) : 2138, 2264
.   : milestone, 2201,
iast_GLOBAL (2.25 ms) : 2186, 2314
.   : milestone, 2250,
profiling (2.077 ms) : 2025, 2130
.   : milestone, 2077,
tracing (2.041 ms) : 1991, 2090
.   : milestone, 2041,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.462 ms, 1.485 ms] -
appsec 3.728 ms [3.513 ms, 3.943 ms] 2.254 ms (152.9%)
iast 2.207 ms [2.144 ms, 2.271 ms] 733.615 µs (49.8%)
iast_GLOBAL 2.237 ms [2.174 ms, 2.3 ms] 763.282 µs (51.8%)
profiling 2.064 ms [2.012 ms, 2.116 ms] 590.379 µs (40.1%)
tracing 2.026 ms [1.977 ms, 2.075 ms] 552.272 µs (37.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.465 ms, 1.488 ms] -
appsec 3.715 ms [3.495 ms, 3.936 ms] 2.239 ms (151.7%)
iast 2.201 ms [2.138 ms, 2.264 ms] 724.932 µs (49.1%)
iast_GLOBAL 2.25 ms [2.186 ms, 2.314 ms] 774.069 µs (52.4%)
profiling 2.077 ms [2.025 ms, 2.13 ms] 601.149 µs (40.7%)
tracing 2.041 ms [1.991 ms, 2.09 ms] 564.838 µs (38.3%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~3bca58b0ec, baseline=1.54.0-SNAPSHOT~c68b54c4d1
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.934 s) : 14934000, 14934000
.   : milestone, 14934000,
appsec (15.074 s) : 15074000, 15074000
.   : milestone, 15074000,
iast (18.731 s) : 18731000, 18731000
.   : milestone, 18731000,
iast_GLOBAL (17.969 s) : 17969000, 17969000
.   : milestone, 17969000,
profiling (15.94 s) : 15940000, 15940000
.   : milestone, 15940000,
tracing (14.854 s) : 14854000, 14854000
.   : milestone, 14854000,
section candidate
no_agent (15.752 s) : 15752000, 15752000
.   : milestone, 15752000,
appsec (14.848 s) : 14848000, 14848000
.   : milestone, 14848000,
iast (18.845 s) : 18845000, 18845000
.   : milestone, 18845000,
iast_GLOBAL (18.184 s) : 18184000, 18184000
.   : milestone, 18184000,
profiling (15.896 s) : 15896000, 15896000
.   : milestone, 15896000,
tracing (15.182 s) : 15182000, 15182000
.   : milestone, 15182000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.934 s [14.934 s, 14.934 s] -
appsec 15.074 s [15.074 s, 15.074 s] 140.0 ms (0.9%)
iast 18.731 s [18.731 s, 18.731 s] 3.797 s (25.4%)
iast_GLOBAL 17.969 s [17.969 s, 17.969 s] 3.035 s (20.3%)
profiling 15.94 s [15.94 s, 15.94 s] 1.006 s (6.7%)
tracing 14.854 s [14.854 s, 14.854 s] -80.0 ms (-0.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.752 s [15.752 s, 15.752 s] -
appsec 14.848 s [14.848 s, 14.848 s] -904.0 ms (-5.7%)
iast 18.845 s [18.845 s, 18.845 s] 3.093 s (19.6%)
iast_GLOBAL 18.184 s [18.184 s, 18.184 s] 2.432 s (15.4%)
profiling 15.896 s [15.896 s, 15.896 s] 144.0 ms (0.9%)
tracing 15.182 s [15.182 s, 15.182 s] -570.0 ms (-3.6%)

Comment on lines +18 to +23
// Helper extension for custom method from Groovy DSL
fun addTestSuiteForDir(name: String, dirName: String) {
(project.extra["addTestSuiteForDir"] as? Closure<*>)?.call(name, dirName)
}

addTestSuiteForDir("latestDepTest", "test")
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably Kotlin alternative should be something like:

plugins {
    id("org.unbroken-dome.test-sets") version "4.1.0"
}

testSets {
    create("latestDepTest") {
        dirName = "test"
    }
}

See: https://github.com/unbroken-dome/gradle-testsets-plugin
Here and other similar places.

Copy link
Contributor

Choose a reason for hiding this comment

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

@AlexeyKuznetsov-DD That's an interesting plugin, but I'd rather hold until we have a discussion on conventions plugins.

Copy link
Contributor

@bric3 bric3 left a comment

Choose a reason for hiding this comment

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

Thanks for going into this topic.

I believe you discovered the first issues with this challenging task. 😅

Comment on lines +56 to +63
"iastIntegrationTestImplementation"(project(":dd-java-agent:agent-iast:iast-test-fixtures"))
"iastIntegrationTestImplementation"("org.apache.httpcomponents:httpclient:4.0")
"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:jetty:jetty-server:jetty-server-9.0"))
"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:apache-httpcore:apache-httpcore-4.0"))
"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:servlet"))
"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:java-lang"))
"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:java-net"))
"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:iast-instrumenter"))
Copy link
Contributor

Choose a reason for hiding this comment

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

note: This code is an example of the kotlin's invoke operator:

Parentheses are translated to calls to invoke with appropriate number of arguments.

So

"iastIntegrationTestRuntimeOnly"(project(":dd-java-agent:instrumentation:iast-instrumenter"))

is actually :

"iastIntegrationTestRuntimeOnly".invoke(project(":dd-java-agent:instrumentation:iast-instrumenter"))

which is nice since it allows you to see the method, and access its definition and javadoc.

Also, note that since Strings doesn't have .invoke operators, it has to be an extension function on a String. On a personal note I think having the invoke operator on String (this is a Gradle API) is a bit scabrous, and I would prefer the more explicit way :

add("iastIntegrationTestRuntimeOnly", project(":dd-java-agent:instrumentation:iast-instrumenter"))

Comment on lines +18 to +23
// Helper extension for custom method from Groovy DSL
fun addTestSuiteForDir(name: String, dirName: String) {
(project.extra["addTestSuiteForDir"] as? Closure<*>)?.call(name, dirName)
}

addTestSuiteForDir("latestDepTest", "test")
Copy link
Contributor

Choose a reason for hiding this comment

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

@AlexeyKuznetsov-DD That's an interesting plugin, but I'd rather hold until we have a discussion on conventions plugins.

Comment on lines +31 to +40
// Helper extensions for custom methods from Groovy DSL
fun addTestSuite(name: String) {
(project.extra["addTestSuite"] as? Closure<*>)?.call(name)
}
fun addTestSuiteForDir(name: String, dirName: String) {
(project.extra["addTestSuiteForDir"] as? Closure<*>)?.call(name, dirName)
}
fun addTestSuiteExtendingForDir(testSuiteName: String, parentSuiteName: String, dirName: String) {
(project.extra["addTestSuiteExtendingForDir"] as? Closure<*>)?.call(testSuiteName, parentSuiteName, dirName)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

note: Having these is actually why I'm holding off on migrating every build gradle to kotlin.

That doesn't mean it shouldn't happen there as now we have an example of some pain points.


Ideally, our test-suites.gradle script should be a convention plugin, that is applied as part of the declaration of the plugins { } block at the beginning of the build script.

[!NOTE] When Gradle parses the build scripts it processes the plugins {} block first, and can safely inject "accessors" to the classpath of this build script where the methods of the convention plugin are.
Gradle can't do that with script plugins.

E.g.g this comment // Kotlin accessors are not generated if not created by a plugin or explicitly declared is exactly about that.

=> Now as I'm mentioning convention plugins, the idea is to identify conventions and name them, for example instrumenqation projects could have a convention plugin datadog.instrumentation-project, and this plugin should:

  • apply other plugins as necessary,
  • configure them
  • add and extensions as needed (methods or configuration constructs)

Everything ./gradle/*.gradle should land in a convention plugin in some form.

Resources:

Note those link are referring to the 8.14.3, but script plugins are barely mentioned in Gradle 9, apart that they are not recommended, meaning it's likely Gradle will phase out these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see, thanks for all of the context!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes type: enhancement Enhancements and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants