Skip to content

Conversation

@bric3
Copy link
Contributor

@bric3 bric3 commented Nov 17, 2025

What Does This Do

Refactors the call-site-instrumentation plugin that collected too much classpath, by querying tasks classpath, which may create various problems (like conflicting dependency resolution because they end-up in the same bucket).

Instead, this PR tries to make the csi plugin collect the minimum (main and test). Also, instead of querying tasks, it gather classpath via project's configurations. If something non standard is needed it makes it explicit via.

csi {
  additionalPaths.from(...)
}

This change exposed a bug in the way the csi plugin was setting up its type resolution classpath. It uses a URLClassLoader, however since the collected path is much more restricted, some compiled types exists in folders, and URLClassLoader requires a directory URL to end by a slash (/) otherwise it assumes the URL points to a jar even if it is actually a directory, this resulted in types not found at generation time.

Also, this plugins applies its changes during project.afterEvaluate, this has an unfortunate effect of the afterEvaluate and required to patch the classpath of some test related tasks directly. This is replaced a more appropriate declaration of a dependency in the appropriate configuration.

Other cleanups were added.

Motivation

Quality of life, correctness.

Follow-up

Related to

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@bric3 bric3 added type: enhancement Enhancements and improvements tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Nov 17, 2025
@pr-commenter
Copy link

pr-commenter bot commented Nov 17, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/make-csi-consume-way-less
git_commit_date 1763557084 1763668787
git_commit_sha 5adec51 c84d247
release_version 1.56.0-SNAPSHOT~5adec51856 1.56.0-SNAPSHOT~c84d247d72
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1763670583 1763670583
ci_job_id 1248903786 1248903786
ci_pipeline_id 83463156 83463156
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-xorehee7 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-xorehee7 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 58 metrics, 7 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.101 s) : 0, 1100515
Total [baseline] (8.877 s) : 0, 8877084
Agent [candidate] (1.097 s) : 0, 1096590
Total [candidate] (8.842 s) : 0, 8841846
section iast
Agent [baseline] (1.235 s) : 0, 1235048
Total [baseline] (9.539 s) : 0, 9539258
Agent [candidate] (1.246 s) : 0, 1246224
Total [candidate] (9.598 s) : 0, 9597517
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.101 s -
Agent iast 1.235 s 134.533 ms (12.2%)
Total tracing 8.877 s -
Total iast 9.539 s 662.175 ms (7.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.097 s -
Agent iast 1.246 s 149.634 ms (13.6%)
Total tracing 8.842 s -
Total iast 9.598 s 755.671 ms (8.5%)
gantt
    title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.483 ms) : 0, 1483
crashtracking [candidate] (1.451 ms) : 0, 1451
BytebuddyAgent [baseline] (706.21 ms) : 0, 706210
BytebuddyAgent [candidate] (703.778 ms) : 0, 703778
GlobalTracer [baseline] (249.351 ms) : 0, 249351
GlobalTracer [candidate] (248.682 ms) : 0, 248682
AppSec [baseline] (32.335 ms) : 0, 32335
AppSec [candidate] (32.144 ms) : 0, 32144
Debugger [baseline] (63.622 ms) : 0, 63622
Debugger [candidate] (63.351 ms) : 0, 63351
Remote Config [baseline] (644.47 µs) : 0, 644
Remote Config [candidate] (625.119 µs) : 0, 625
Telemetry [baseline] (8.205 ms) : 0, 8205
Telemetry [candidate] (8.093 ms) : 0, 8093
Flare Poller [baseline] (3.741 ms) : 0, 3741
Flare Poller [candidate] (3.639 ms) : 0, 3639
section iast
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (827.211 ms) : 0, 827211
BytebuddyAgent [candidate] (835.438 ms) : 0, 835438
GlobalTracer [baseline] (238.055 ms) : 0, 238055
GlobalTracer [candidate] (239.052 ms) : 0, 239052
AppSec [baseline] (34.099 ms) : 0, 34099
AppSec [candidate] (33.809 ms) : 0, 33809
Debugger [baseline] (60.013 ms) : 0, 60013
Debugger [candidate] (60.742 ms) : 0, 60742
Remote Config [baseline] (543.78 µs) : 0, 544
Remote Config [candidate] (573.332 µs) : 0, 573
Telemetry [baseline] (7.675 ms) : 0, 7675
Telemetry [candidate] (7.801 ms) : 0, 7801
Flare Poller [baseline] (3.458 ms) : 0, 3458
Flare Poller [candidate] (3.55 ms) : 0, 3550
IAST [baseline] (27.555 ms) : 0, 27555
IAST [candidate] (28.828 ms) : 0, 28828
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.1 s) : 0, 1099519
Total [baseline] (10.737 s) : 0, 10737402
Agent [candidate] (1.099 s) : 0, 1099224
Total [candidate] (10.743 s) : 0, 10743099
section appsec
Agent [baseline] (1.278 s) : 0, 1278484
Total [baseline] (10.942 s) : 0, 10942395
Agent [candidate] (1.286 s) : 0, 1285822
Total [candidate] (11.041 s) : 0, 11040661
section iast
Agent [baseline] (1.239 s) : 0, 1239165
Total [baseline] (11.294 s) : 0, 11294368
Agent [candidate] (1.241 s) : 0, 1241439
Total [candidate] (11.192 s) : 0, 11192266
section profiling
Agent [baseline] (1.238 s) : 0, 1238129
Total [baseline] (11.06 s) : 0, 11059706
Agent [candidate] (1.226 s) : 0, 1226317
Total [candidate] (11.035 s) : 0, 11035185
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.1 s -
Agent appsec 1.278 s 178.965 ms (16.3%)
Agent iast 1.239 s 139.646 ms (12.7%)
Agent profiling 1.238 s 138.61 ms (12.6%)
Total tracing 10.737 s -
Total appsec 10.942 s 204.993 ms (1.9%)
Total iast 11.294 s 556.966 ms (5.2%)
Total profiling 11.06 s 322.304 ms (3.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.099 s -
Agent appsec 1.286 s 186.597 ms (17.0%)
Agent iast 1.241 s 142.215 ms (12.9%)
Agent profiling 1.226 s 127.093 ms (11.6%)
Total tracing 10.743 s -
Total appsec 11.041 s 297.563 ms (2.8%)
Total iast 11.192 s 449.167 ms (4.2%)
Total profiling 11.035 s 292.086 ms (2.7%)
gantt
    title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.458 ms) : 0, 1458
BytebuddyAgent [baseline] (704.575 ms) : 0, 704575
BytebuddyAgent [candidate] (705.202 ms) : 0, 705202
GlobalTracer [baseline] (249.133 ms) : 0, 249133
GlobalTracer [candidate] (248.771 ms) : 0, 248771
AppSec [baseline] (32.219 ms) : 0, 32219
AppSec [candidate] (32.208 ms) : 0, 32208
Debugger [baseline] (64.741 ms) : 0, 64741
Debugger [candidate] (64.253 ms) : 0, 64253
Remote Config [baseline] (643.445 µs) : 0, 643
Remote Config [candidate] (628.046 µs) : 0, 628
Telemetry [baseline] (8.19 ms) : 0, 8190
Telemetry [candidate] (8.179 ms) : 0, 8179
Flare Poller [baseline] (3.678 ms) : 0, 3678
Flare Poller [candidate] (3.703 ms) : 0, 3703
section appsec
crashtracking [baseline] (1.452 ms) : 0, 1452
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (728.777 ms) : 0, 728777
BytebuddyAgent [candidate] (733.039 ms) : 0, 733039
GlobalTracer [baseline] (240.562 ms) : 0, 240562
GlobalTracer [candidate] (241.361 ms) : 0, 241361
IAST [baseline] (24.774 ms) : 0, 24774
IAST [candidate] (24.881 ms) : 0, 24881
AppSec [baseline] (174.469 ms) : 0, 174469
AppSec [candidate] (175.234 ms) : 0, 175234
Debugger [baseline] (60.526 ms) : 0, 60526
Debugger [candidate] (61.926 ms) : 0, 61926
Remote Config [baseline] (673.458 µs) : 0, 673
Remote Config [candidate] (677.578 µs) : 0, 678
Telemetry [baseline] (8.304 ms) : 0, 8304
Telemetry [candidate] (8.274 ms) : 0, 8274
Flare Poller [baseline] (3.862 ms) : 0, 3862
Flare Poller [candidate] (3.793 ms) : 0, 3793
section iast
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.49 ms) : 0, 1490
BytebuddyAgent [baseline] (829.599 ms) : 0, 829599
BytebuddyAgent [candidate] (832.469 ms) : 0, 832469
GlobalTracer [baseline] (238.35 ms) : 0, 238350
GlobalTracer [candidate] (238.072 ms) : 0, 238072
IAST [baseline] (28.266 ms) : 0, 28266
IAST [candidate] (30.061 ms) : 0, 30061
AppSec [baseline] (33.522 ms) : 0, 33522
AppSec [candidate] (31.584 ms) : 0, 31584
Debugger [baseline] (61.059 ms) : 0, 61059
Debugger [candidate] (60.951 ms) : 0, 60951
Remote Config [baseline] (558.379 µs) : 0, 558
Remote Config [candidate] (549.904 µs) : 0, 550
Telemetry [baseline] (7.723 ms) : 0, 7723
Telemetry [candidate] (7.648 ms) : 0, 7648
Flare Poller [baseline] (3.524 ms) : 0, 3524
Flare Poller [candidate] (3.469 ms) : 0, 3469
section profiling
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.425 ms) : 0, 1425
BytebuddyAgent [baseline] (736.221 ms) : 0, 736221
BytebuddyAgent [candidate] (729.338 ms) : 0, 729338
GlobalTracer [baseline] (223.772 ms) : 0, 223772
GlobalTracer [candidate] (221.801 ms) : 0, 221801
AppSec [baseline] (32.641 ms) : 0, 32641
AppSec [candidate] (32.123 ms) : 0, 32123
Debugger [baseline] (63.414 ms) : 0, 63414
Debugger [candidate] (62.804 ms) : 0, 62804
Remote Config [baseline] (661.749 µs) : 0, 662
Remote Config [candidate] (650.259 µs) : 0, 650
Telemetry [baseline] (8.109 ms) : 0, 8109
Telemetry [candidate] (7.949 ms) : 0, 7949
Flare Poller [baseline] (3.83 ms) : 0, 3830
Flare Poller [candidate] (3.762 ms) : 0, 3762
ProfilingAgent [baseline] (97.701 ms) : 0, 97701
ProfilingAgent [candidate] (96.705 ms) : 0, 96705
Profiling [baseline] (98.301 ms) : 0, 98301
Profiling [candidate] (97.293 ms) : 0, 97293
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/make-csi-consume-way-less
git_commit_date 1763557084 1763668787
git_commit_sha 5adec51 c84d247
release_version 1.56.0-SNAPSHOT~5adec51856 1.56.0-SNAPSHOT~c84d247d72
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1763671077 1763671077
ci_job_id 1248903787 1248903787
ci_pipeline_id 83463156 83463156
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-pqzocjjn 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-pqzocjjn 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 3 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+127.653µs; +211.117µs] or [+4.565%; +7.550%]
unsure
[+157.668µs; +603.961µs] or [+1.998%; +7.655%]
unstable
[-186.080op/s; +81.830op/s] or [-14.478%; +6.367%]
2.966ms 8.271ms 1233.094op/s 2.796ms 7.890ms 1285.219op/s
scenario:load:insecure-bank:iast_FULL:high_load worse
[+237.983µs; +484.184µs] or [+4.664%; +9.490%]
worse
[+468.113µs; +1171.059µs] or [+3.844%; +9.617%]
unstable
[-145.446op/s; +26.571op/s] or [-18.139%; +3.314%]
5.463ms 12.996ms 742.406op/s 5.102ms 12.177ms 801.844op/s
scenario:load:petclinic:iast:high_load better
[-964.822µs; -358.593µs] or [-5.389%; -2.003%]
same
[-1131.000µs; +127.558µs] or [-3.868%; +0.436%]
unstable
[-16.925op/s; +31.987op/s] or [-6.603%; +12.480%]
17.240ms 28.736ms 263.844op/s 17.902ms 29.238ms 256.312op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.196 ms) : 1184, 1207
.   : milestone, 1196,
iast (3.225 ms) : 3181, 3268
.   : milestone, 3225,
iast_FULL (5.766 ms) : 5710, 5823
.   : milestone, 5766,
iast_GLOBAL (3.568 ms) : 3509, 3628
.   : milestone, 3568,
profiling (1.999 ms) : 1983, 2016
.   : milestone, 1999,
tracing (1.802 ms) : 1787, 1817
.   : milestone, 1802,
section candidate
no_agent (1.216 ms) : 1204, 1228
.   : milestone, 1216,
iast (3.293 ms) : 3243, 3343
.   : milestone, 3293,
iast_FULL (6.252 ms) : 6129, 6374
.   : milestone, 6252,
iast_GLOBAL (3.721 ms) : 3671, 3772
.   : milestone, 3721,
profiling (1.968 ms) : 1952, 1984
.   : milestone, 1968,
tracing (1.803 ms) : 1788, 1818
.   : milestone, 1803,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.196 ms [1.184 ms, 1.207 ms] -
iast 3.225 ms [3.181 ms, 3.268 ms] 2.029 ms (169.7%)
iast_FULL 5.766 ms [5.71 ms, 5.823 ms] 4.571 ms (382.3%)
iast_GLOBAL 3.568 ms [3.509 ms, 3.628 ms] 2.373 ms (198.5%)
profiling 1.999 ms [1.983 ms, 2.016 ms] 803.785 µs (67.2%)
tracing 1.802 ms [1.787 ms, 1.817 ms] 606.549 µs (50.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.216 ms [1.204 ms, 1.228 ms] -
iast 3.293 ms [3.243 ms, 3.343 ms] 2.077 ms (170.8%)
iast_FULL 6.252 ms [6.129 ms, 6.374 ms] 5.036 ms (414.2%)
iast_GLOBAL 3.721 ms [3.671 ms, 3.772 ms] 2.506 ms (206.1%)
profiling 1.968 ms [1.952 ms, 1.984 ms] 751.978 µs (61.8%)
tracing 1.803 ms [1.788 ms, 1.818 ms] 587.421 µs (48.3%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.237 ms) : 18051, 18424
.   : milestone, 18237,
appsec (18.628 ms) : 18437, 18818
.   : milestone, 18628,
code_origins (17.841 ms) : 17662, 18019
.   : milestone, 17841,
iast (18.205 ms) : 18021, 18390
.   : milestone, 18205,
profiling (18.736 ms) : 18546, 18926
.   : milestone, 18736,
tracing (17.691 ms) : 17517, 17864
.   : milestone, 17691,
section candidate
no_agent (18.966 ms) : 18774, 19157
.   : milestone, 18966,
appsec (18.624 ms) : 18436, 18812
.   : milestone, 18624,
code_origins (17.719 ms) : 17544, 17895
.   : milestone, 17719,
iast (17.683 ms) : 17504, 17861
.   : milestone, 17683,
profiling (18.556 ms) : 18368, 18744
.   : milestone, 18556,
tracing (17.501 ms) : 17325, 17676
.   : milestone, 17501,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.237 ms [18.051 ms, 18.424 ms] -
appsec 18.628 ms [18.437 ms, 18.818 ms] 390.333 µs (2.1%)
code_origins 17.841 ms [17.662 ms, 18.019 ms] -396.854 µs (-2.2%)
iast 18.205 ms [18.021 ms, 18.39 ms] -32.062 µs (-0.2%)
profiling 18.736 ms [18.546 ms, 18.926 ms] 498.213 µs (2.7%)
tracing 17.691 ms [17.517 ms, 17.864 ms] -546.762 µs (-3.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.966 ms [18.774 ms, 19.157 ms] -
appsec 18.624 ms [18.436 ms, 18.812 ms] -341.348 µs (-1.8%)
code_origins 17.719 ms [17.544 ms, 17.895 ms] -1.246 ms (-6.6%)
iast 17.683 ms [17.504 ms, 17.861 ms] -1.283 ms (-6.8%)
profiling 18.556 ms [18.368 ms, 18.744 ms] -409.637 µs (-2.2%)
tracing 17.501 ms [17.325 ms, 17.676 ms] -1.465 ms (-7.7%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/make-csi-consume-way-less
git_commit_date 1763557084 1763668787
git_commit_sha 5adec51 c84d247
release_version 1.56.0-SNAPSHOT~5adec51856 1.56.0-SNAPSHOT~c84d247d72
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1763670749 1763670749
ci_job_id 1248903788 1248903788
ci_pipeline_id 83463156 83463156
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-nv3thejl 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-nv3thejl 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.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.481 ms) : 1469, 1493
.   : milestone, 1481,
appsec (3.687 ms) : 3471, 3902
.   : milestone, 3687,
iast (2.23 ms) : 2165, 2295
.   : milestone, 2230,
iast_GLOBAL (2.259 ms) : 2194, 2324
.   : milestone, 2259,
profiling (2.076 ms) : 2024, 2129
.   : milestone, 2076,
tracing (2.048 ms) : 1997, 2098
.   : milestone, 2048,
section candidate
no_agent (1.485 ms) : 1474, 1497
.   : milestone, 1485,
appsec (3.755 ms) : 3534, 3975
.   : milestone, 3755,
iast (2.231 ms) : 2166, 2296
.   : milestone, 2231,
iast_GLOBAL (2.269 ms) : 2204, 2334
.   : milestone, 2269,
profiling (2.101 ms) : 2046, 2155
.   : milestone, 2101,
tracing (2.052 ms) : 2001, 2104
.   : milestone, 2052,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.469 ms, 1.493 ms] -
appsec 3.687 ms [3.471 ms, 3.902 ms] 2.206 ms (148.9%)
iast 2.23 ms [2.165 ms, 2.295 ms] 749.251 µs (50.6%)
iast_GLOBAL 2.259 ms [2.194 ms, 2.324 ms] 778.347 µs (52.6%)
profiling 2.076 ms [2.024 ms, 2.129 ms] 595.377 µs (40.2%)
tracing 2.048 ms [1.997 ms, 2.098 ms] 566.747 µs (38.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.485 ms [1.474 ms, 1.497 ms] -
appsec 3.755 ms [3.534 ms, 3.975 ms] 2.269 ms (152.8%)
iast 2.231 ms [2.166 ms, 2.296 ms] 745.472 µs (50.2%)
iast_GLOBAL 2.269 ms [2.204 ms, 2.334 ms] 783.807 µs (52.8%)
profiling 2.101 ms [2.046 ms, 2.155 ms] 615.631 µs (41.4%)
tracing 2.052 ms [2.001 ms, 2.104 ms] 566.921 µs (38.2%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~c84d247d72, baseline=1.56.0-SNAPSHOT~5adec51856
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.066 s) : 15066000, 15066000
.   : milestone, 15066000,
appsec (15.183 s) : 15183000, 15183000
.   : milestone, 15183000,
iast (18.639 s) : 18639000, 18639000
.   : milestone, 18639000,
iast_GLOBAL (18.082 s) : 18082000, 18082000
.   : milestone, 18082000,
profiling (14.836 s) : 14836000, 14836000
.   : milestone, 14836000,
tracing (14.822 s) : 14822000, 14822000
.   : milestone, 14822000,
section candidate
no_agent (15.372 s) : 15372000, 15372000
.   : milestone, 15372000,
appsec (14.651 s) : 14651000, 14651000
.   : milestone, 14651000,
iast (17.944 s) : 17944000, 17944000
.   : milestone, 17944000,
iast_GLOBAL (18.008 s) : 18008000, 18008000
.   : milestone, 18008000,
profiling (14.723 s) : 14723000, 14723000
.   : milestone, 14723000,
tracing (15.044 s) : 15044000, 15044000
.   : milestone, 15044000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.066 s [15.066 s, 15.066 s] -
appsec 15.183 s [15.183 s, 15.183 s] 117.0 ms (0.8%)
iast 18.639 s [18.639 s, 18.639 s] 3.573 s (23.7%)
iast_GLOBAL 18.082 s [18.082 s, 18.082 s] 3.016 s (20.0%)
profiling 14.836 s [14.836 s, 14.836 s] -230.0 ms (-1.5%)
tracing 14.822 s [14.822 s, 14.822 s] -244.0 ms (-1.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.372 s [15.372 s, 15.372 s] -
appsec 14.651 s [14.651 s, 14.651 s] -721.0 ms (-4.7%)
iast 17.944 s [17.944 s, 17.944 s] 2.572 s (16.7%)
iast_GLOBAL 18.008 s [18.008 s, 18.008 s] 2.636 s (17.1%)
profiling 14.723 s [14.723 s, 14.723 s] -649.0 ms (-4.2%)
tracing 15.044 s [15.044 s, 15.044 s] -328.0 ms (-2.1%)

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 17, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 59.62% (-0.04%)

View detailed report

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

Base automatically changed from bdu/do-not-include-latest-dep-classpath to master November 18, 2025 12:57
@bric3 bric3 force-pushed the bdu/make-csi-consume-way-less branch from 8022770 to f2f5205 Compare November 19, 2025 14:47
This forced to apply patching in afterEvaluate, instead, it's
easier and cleaner to add the csi output as dependency in the
appropriate configuration.
@bric3 bric3 force-pushed the bdu/make-csi-consume-way-less branch 2 times, most recently from 365af7b to 16f82db Compare November 19, 2025 16:17
@bric3 bric3 force-pushed the bdu/make-csi-consume-way-less branch from 16f82db to dea2a7c Compare November 19, 2025 16:26
Comment on lines +77 to +82
/**
* The paths used to look for the call site instrumenter dependencies.
*
* The plugin includes by default **only** the `main` and `test` source sets, and their
* related compilation classpath. As we don't want other test configurations by default.
*
* However, it's possible to contribute additional paths to look for dependencies.
*/
val additionalPaths: ConfigurableFileCollection = objectFactory.fileCollection()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Before the csi plugin consumed all test configurations, which forced to resolved all jvm test suites configurations. Now that the csi plugin is now restricted to the standard main and test, a way is needed to provide additional paths to the call site instrumenter generator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was moved from datadog/gradle/plugin to datadog/gradle/plugin/csi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extracted from datadog/gradle/plugin/CallSiteInstrumentationPlugin.kt‎

Comment on lines +49 to +51
configureSourceSets(project, csiExtension)
registerGenerateCallSiteTask(project, csiExtension, project.tasks.named<AbstractCompile>("compileJava"))
configureTestConfigurations(project, csiExtension)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Before this happened in project.afterEvaluate phase which is suboptimal. This was working because it was patching some task classpath very late, but prevented other avoidance tricks that Gradle could provide.

Instead to make other task aware of the csi output one has to use configurations, see configureTestConfigurations.

Comment on lines +213 to +228
get() = project.configurations.matching {
// Includes all main* source sets, but only the test (as wee don;t want other )
// * For main => runtimeClasspath, compileClasspath
// * For test => testRuntimeClasspath, testCompileClasspath
// * For other main* => "main_javaXXRuntimeClasspath", "main_javaXXCompileClasspath"

when (it.name) {
// Regular main and test source sets
RUNTIME_CLASSPATH_CONFIGURATION_NAME,
COMPILE_CLASSPATH_CONFIGURATION_NAME,
TEST_SOURCE_SET_NAME + RUNTIME_CLASSPATH_CONFIGURATION_NAME.capitalize(),
TEST_SOURCE_SET_NAME + COMPILE_CLASSPATH_CONFIGURATION_NAME.capitalize() -> true

else -> false
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Non greedy configurations collection by default. Before it could collect configurations (i.e. files, output folder), from many unrelated compile and test tasks.

Choose a reason for hiding this comment

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

Yep, before it was trying to catch em all. Did you observe any performance improvements during configuration or execution of gradle tasks with this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not yet sure at this time, but since less actual dependencies are needed (in particular those in last deps and others alike), this might be faster.

But the instrument plugin I believe, and possibly other constructs hides that.

Comment on lines -119 to -127
private fun newBuildFolder(project: Project, name: String): File {
val folder = project.layout.buildDirectory.dir(name).get().asFile
if (!folder.exists()) {
if (!folder.mkdirs()) {
throw GradleException("Cannot create folder $folder")
}
}
return folder
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: This is non necessary to create the folder, and also this is unnecessary to convert targetFolder to a String and recreate it from here.

Comment on lines -145 to -154
project.tasks.withType(AbstractCompile::class.java).matching {
task -> task.name.startsWith("compileTest")
}.configureEach {
inputs.dir(extension.targetFolder)
classpath += project.files(targetFolder)
}
project.tasks.withType(Test::class.java).configureEach {
inputs.dir(extension.targetFolder)
classpath += project.files(targetFolder)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: This works only if configureEach block is appended after everything else, i.e. in the project.afterEvaluate, which is suboptimal, this was changed to add the targetFolder as a dependency to the relevant jvm test suites.


private fun createTasks(project: Project, extension: CallSiteInstrumentationExtension) {
registerGenerateCallSiteTask(project, extension, "compileJava")
val targetFolder = extension.targetFolder.get().asFile
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: It's usually non necessary to convert to a File, the project.files(...) understand many types. (Also many other API indicates they rely on the project.files(...) behavior it's indicated in their Javadoc)

Comment on lines +96 to +105
project.pluginManager.withPlugin("jvm-test-suite") {
project.extensions.getByType<TestingExtension>().suites.withType<JvmTestSuite>().configureEach {
project.logger.info("Configuring jvm test suite '{}' to use csiExtension.targetFolder", name)
dependencies {
compileOnly.add(project.files(csiExtension.targetFolder))
runtimeOnly.add(project.files(csiExtension.targetFolder))
}
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: This replaces the old logic that patched test compile and test task classpath. The new code reacts to any registered test suites at configuration time.

@bric3 bric3 marked this pull request as ready for review November 19, 2025 17:08
@bric3 bric3 requested review from a team as code owners November 19, 2025 17:08
@bric3 bric3 requested a review from smola November 19, 2025 17:08
public static URL toURL(final Path path) {
try {
return path.toUri().toURL();
URL url = path.toUri().toURL();

Choose a reason for hiding this comment

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

Nice catch!

}

csi {
additionalPaths.from(classPathConfiguration)

Choose a reason for hiding this comment

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

This way to extend the classpath of the generator is way cleaner, nice!


// Remote Debug
if (project.providers.gradleProperty("debugCsiJar").isPresent) {
jvmArgs("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005")

Choose a reason for hiding this comment

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

👍

inputs.dir(csiExtension.srcFolder)
inputs.dir(csiExtension.rootFolder).optional()
inputs.file(pluginJarFile)
inputs.property("cis.suffix", csiExtension.suffix)

Choose a reason for hiding this comment

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

Good catch, didn't realize those should be part of the inputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the task was already cached, but adding these property was important to invalidate already cached results, e.g. when the java version changed.

@bric3 bric3 enabled auto-merge (squash) November 20, 2025 20:00
@bric3 bric3 merged commit 632fb11 into master Nov 20, 2025
538 checks passed
@bric3 bric3 deleted the bdu/make-csi-consume-way-less branch November 20, 2025 21:21
@github-actions github-actions bot added this to the 1.57.0 milestone Nov 20, 2025
amarziali pushed a commit that referenced this pull request Nov 21, 2025
* chore: Move CSI plugin to it's own package

* chore: Tweak some API to use kotlin friendly functions

* fix: Restrict default CSI classpath to main and test, compile and runtime configurations.

* chore: arg name rename

* fix: Include the main source set output

* fix: Always make sure java plugin is applied

* chore: Make csi plugin not running in project.afterEvaluate

* fix: Incorrect URLClassLoader initialization when url is a directory

* fix: Make depends on instrument task

The 'instrument' plugin changes destination around for now, it needs to be depended
on for the time being.

* chore: Refactor additional configurations to a `ConfigurableFileCollection`

* fix: extension property should not be queried at configuration time

* style: Reformat

* fix: call site plugin still has to add entries to classpath after jvm test suite ran

* chore: code tweaks

* fix: generateCallSite was missing a few input properties for up-date checks

* fix: csi plugin was patching test compile and test task classpath

This forced to apply patching in afterEvaluate, instead, it's
easier and cleaner to add the csi output as dependency in the
appropriate configuration.

* fix: unnecessary targetFolder directory creation and unnecessary transformation to string

* chore: Readability of CallSiteUtils::toURL

* typo: inout property type

* fix: Exclude Kotlin compiler daemon files
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