Skip to content

Avoid overlapping outputs for indexing tasks - #9725

Merged
bric3 merged 11 commits into
masterfrom
bdu/gen-index-tasks
Oct 14, 2025
Merged

Avoid overlapping outputs for indexing tasks#9725
bric3 merged 11 commits into
masterfrom
bdu/gen-index-tasks

Conversation

@bric3

@bric3bric3 commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

What Does This Do

Refactor indexing tasks to avoid overlapping outputs.
Overlapping outputs prevent Gradle to perform correct up-to-date checks. As such it can results in either accidental dependencies, or force Gradle to re-execute the tasks.

image

Motivation

Speed-up the build.

Tasks with overlapping output (i.e. tasks that write to the same location, like the same parent folder), defeat Gradle build cache.

While doing so, it was discovered that the jar had duplicated classes in the various sub agents.

E.g. in 1.54.0

image

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

* Emit index in proper generated source location and use the location as source dir.
* Deduplicate code.
… overlapping output
* Expand the included agent jars in another location buildDir/included, this location
contributes to the resources.
* Emit index in separate location, modified index to receive input folder and output folder,
this location contributes to the resources.
* Fix indexer logging.
@bric3
bric3 requested review from a team as code ownersOctober 10, 2025 13:29
@bric3
bric3 requested a review from mccullsOctober 10, 2025 13:29
@bric3bric3 changed the title Bdu/gen index tasksAvoid overlapping outputs for indexing tasksOct 10, 2025
@bric3bric3 added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling type: feature Enhancements and improvements labels Oct 10, 2025
@bric3

Copy link
Copy Markdown
ContributorAuthor

Another idea to improve the gradleiness, use configurations:

Pseudo code in Kotlin DSL when using configurations
val includedAgentDir = layout.buildDirectory.dir("generated/included")
val agentModules by configurations.registering {
isCanBeResolved =true
isCanBeConsumed =false
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named<Usage>("agent-module"))
attribute(Usage.USAGE_ATTRIBUTE, objects.named<Usage>(Usage::class.java, Usage.JAVA_RUNTIME))
attribute(Category.CATEGORY_ATTRIBUTE, objects.named<Category>(Category.LIBRARY))
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named<LibraryElements>(LibraryElements.JAR))
}
}
// Declare module dependencies with metadatadata classAgentModule(
valproject:String,
valtargetDir:String,
valspecialHandling: ((CopySpec) ->Unit)? = null
)
val moduleList =listOf(
AgentModule(":dd-java-agent:instrumentation", "inst") { spec ->
spec.duplicatesStrategy =DuplicatesStrategy.EXCLUDE
spec.eachFile {
if (path.contains("META-INF/versions/9/net/bytebuddy")) {
path = path.replace("META-INF/versions/9/", "")
}
}
},
AgentModule(":dd-java-agent:agent-jmxfetch", "metrics"),
AgentModule(":dd-java-agent:agent-profiling", "profiling"),
AgentModule(":dd-java-agent:appsec", "appsec"),
AgentModule(":dd-java-agent:agent-aiguard", "aiguard"),
AgentModule(":dd-java-agent:agent-iast", "iast"),
AgentModule(":dd-java-agent:agent-debugger", "debugger"),
AgentModule(":dd-java-agent:agent-ci-visibility", "ci-visibility"),
AgentModule(":dd-java-agent:agent-llmobs", "llm-obs"),
AgentModule(":dd-java-agent:agent-logs-intake", "logs-intake"),
AgentModule(":dd-java-agent:cws-tls", "cws-tls")
)
dependencies {
moduleList.forEach { module ->
agentModules(project(module.project))
}
}
// Single task to expand all agent modulesval expandAllAgentModules = tasks.register<Sync>("expandAllAgentModules") {
group =LifecycleBasePlugin.BUILD_GROUP
description ="Expand all agent shadow jars into subdirectories"
into(includedAgentDir)
val opentracingFound =AtomicBoolean()
moduleList.forEach { module ->val moduleProject = project(module.project)
val shadowJarTask = moduleProject.tasks.named<ShadowJar>("shadowJar")
dependsOn(shadowJarTask)
from(zipTree(shadowJarTask.map { it.archiveFile })) {
into(module.targetDir)
rename("(^.*)\\.class$", "$1.classdata")
rename("^LICENSE$", "LICENSE.renamed")
eachFile {
if (path.contains("opentracing") && name.contains("Format\$Builtin")) {
opentracingFound.set(true)
}
}
module.specialHandling?.invoke(this)
}
}
doLast {
if (opentracingFound.get()) {
throwGradleException("OpenTracing direct dependency found!")
}
}
}
val includedJarFileTree = fileTree(includedAgentDir) {
builtBy(expandAllAgentModules)
}
// Generate agent jar indexval generateAgentJarIndex = tasks.register<JavaExec>("generateAgentJarIndex") {
val destinationDir = layout.buildDirectory.dir("generated/$name")
group =LifecycleBasePlugin.BUILD_GROUP
description ="Generate dd-java-agent.index"
mainClass.set("datadog.trace.bootstrap.AgentJarIndex\$IndexGenerator")
inputs.files(includedJarFileTree)
inputs.files(classpath)
outputs.dir(destinationDir)
classpath = objects.fileCollection().from(
configurations.named("shadowInclude"),
configurations.named("slf4j-simple")
)
argumentProviders.add(CommandLineArgumentProvider {
listOf(
includedAgentDir.get().asFile.path,
destinationDir.get().asFile.path
)
})
}
sourceSets.main { resources.srcDir(expandAllAgentModules)
}

Comment on lines -55 to -56
// Include AgentPreCheck compiled with Java 6.
from sourceSets.main_java6.output

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

note: This was incorrectly added to all "included" sub jars, while it should only be present at the root. This was moved to the main shadowJar task.

@datadog-official

datadog-officialBot commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

🎯 Code Coverage
Patch Coverage: 0.00%
Total Coverage: 59.89% (-0.02%)

View detailed report

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

@pr-commenter

pr-commenterBot commented Oct 10, 2025

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterbdu/gen-index-tasks
git_commit_date17603899631760432723
git_commit_sha85d8580b59e05e
release_version1.55.0-SNAPSHOT~85d85805f61.55.0-SNAPSHOT~b59e05e66d
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17604345351760434535
ci_job_id11774588951177458895
ci_pipeline_id7920639779206397
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-zfyrx7zua-project-304-concurrent-3-86tkjnky 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/LinuxLinux runner-zfyrx7zua-project-304-concurrent-3-86tkjnky 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
moduleAgentAgent
parentNoneNone

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 6 unstable metrics.

Startup time reports for insecure-bank
gantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.014 s) : 0, 1014001
Total [baseline] (8.644 s) : 0, 8643756
Agent [candidate] (1.025 s) : 0, 1024603
Total [candidate] (8.657 s) : 0, 8656961
section iast
Agent [baseline] (1.15 s) : 0, 1150053
Total [baseline] (9.28 s) : 0, 9280055
Agent [candidate] (1.149 s) : 0, 1149025
Total [candidate] (9.261 s) : 0, 9261069
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.014 s-
Agentiast1.15 s136.052 ms (13.4%)
Totaltracing8.644 s-
Totaliast9.28 s636.299 ms (7.4%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.025 s-
Agentiast1.149 s124.422 ms (12.1%)
Totaltracing8.657 s-
Totaliast9.261 s604.108 ms (7.0%)
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.484 ms) : 0, 1484
BytebuddyAgent [baseline] (692.377 ms) : 0, 692377
BytebuddyAgent [candidate] (698.372 ms) : 0, 698372
GlobalTracer [baseline] (240.728 ms) : 0, 240728
GlobalTracer [candidate] (243.351 ms) : 0, 243351
AppSec [baseline] (32.446 ms) : 0, 32446
AppSec [candidate] (32.971 ms) : 0, 32971
Debugger [baseline] (6.404 ms) : 0, 6404
Debugger [candidate] (6.524 ms) : 0, 6524
Remote Config [baseline] (699.106 µs) : 0, 699
Remote Config [candidate] (709.273 µs) : 0, 709
Telemetry [baseline] (9.171 ms) : 0, 9171
Telemetry [candidate] (9.23 ms) : 0, 9230
Flare Poller [baseline] (9.602 ms) : 0, 9602
Flare Poller [candidate] (10.781 ms) : 0, 10781
section iast
crashtracking [baseline] (1.483 ms) : 0, 1483
crashtracking [candidate] (1.485 ms) : 0, 1485
BytebuddyAgent [baseline] (815.378 ms) : 0, 815378
BytebuddyAgent [candidate] (813.8 ms) : 0, 813800
GlobalTracer [baseline] (230.565 ms) : 0, 230565
GlobalTracer [candidate] (231.012 ms) : 0, 231012
AppSec [baseline] (35.137 ms) : 0, 35137
AppSec [candidate] (35.055 ms) : 0, 35055
Debugger [baseline] (6.151 ms) : 0, 6151
Debugger [candidate] (6.097 ms) : 0, 6097
Remote Config [baseline] (612.605 µs) : 0, 613
Remote Config [candidate] (612.332 µs) : 0, 612
Telemetry [baseline] (8.608 ms) : 0, 8608
Telemetry [candidate] (8.606 ms) : 0, 8606
Flare Poller [baseline] (4.251 ms) : 0, 4251
Flare Poller [candidate] (4.282 ms) : 0, 4282
IAST [baseline] (26.387 ms) : 0, 26387
IAST [candidate] (26.586 ms) : 0, 26586
Loading
Startup time reports for petclinic
gantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.028 s) : 0, 1028319
Total [baseline] (10.665 s) : 0, 10665146
Agent [candidate] (1.022 s) : 0, 1022030
Total [candidate] (10.758 s) : 0, 10758350
section appsec
Agent [baseline] (1.201 s) : 0, 1201485
Total [baseline] (10.99 s) : 0, 10989925
Agent [candidate] (1.196 s) : 0, 1195880
Total [candidate] (11.034 s) : 0, 11034255
section iast
Agent [baseline] (1.151 s) : 0, 1150813
Total [baseline] (11.0 s) : 0, 11000149
Agent [candidate] (1.157 s) : 0, 1156529
Total [candidate] (11.069 s) : 0, 11068852
section profiling
Agent [baseline] (1.168 s) : 0, 1167942
Total [baseline] (11.029 s) : 0, 11028752
Agent [candidate] (1.162 s) : 0, 1161897
Total [candidate] (11.002 s) : 0, 11002296
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.028 s-
Agentappsec1.201 s173.166 ms (16.8%)
Agentiast1.151 s122.494 ms (11.9%)
Agentprofiling1.168 s139.622 ms (13.6%)
Totaltracing10.665 s-
Totalappsec10.99 s324.779 ms (3.0%)
Totaliast11.0 s335.003 ms (3.1%)
Totalprofiling11.029 s363.605 ms (3.4%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.022 s-
Agentappsec1.196 s173.85 ms (17.0%)
Agentiast1.157 s134.498 ms (13.2%)
Agentprofiling1.162 s139.866 ms (13.7%)
Totaltracing10.758 s-
Totalappsec11.034 s275.905 ms (2.6%)
Totaliast11.069 s310.502 ms (2.9%)
Totalprofiling11.002 s243.946 ms (2.3%)
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.487 ms) : 0, 1487
crashtracking [candidate] (1.463 ms) : 0, 1463
BytebuddyAgent [baseline] (702.708 ms) : 0, 702708
BytebuddyAgent [candidate] (695.861 ms) : 0, 695861
GlobalTracer [baseline] (243.097 ms) : 0, 243097
GlobalTracer [candidate] (242.62 ms) : 0, 242620
AppSec [baseline] (32.776 ms) : 0, 32776
AppSec [candidate] (32.704 ms) : 0, 32704
Debugger [baseline] (6.475 ms) : 0, 6475
Debugger [candidate] (6.494 ms) : 0, 6494
Remote Config [baseline] (696.694 µs) : 0, 697
Remote Config [candidate] (691.222 µs) : 0, 691
Telemetry [baseline] (9.343 ms) : 0, 9343
Telemetry [candidate] (9.449 ms) : 0, 9449
Flare Poller [baseline] (10.322 ms) : 0, 10322
Flare Poller [candidate] (11.676 ms) : 0, 11676
section appsec
crashtracking [baseline] (1.476 ms) : 0, 1476
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (723.616 ms) : 0, 723616
BytebuddyAgent [candidate] (718.841 ms) : 0, 718841
GlobalTracer [baseline] (235.91 ms) : 0, 235910
GlobalTracer [candidate] (235.602 ms) : 0, 235602
AppSec [baseline] (174.91 ms) : 0, 174910
AppSec [candidate] (174.881 ms) : 0, 174881
Debugger [baseline] (6.181 ms) : 0, 6181
Debugger [candidate] (6.106 ms) : 0, 6106
Remote Config [baseline] (631.047 µs) : 0, 631
Remote Config [candidate] (619.44 µs) : 0, 619
Telemetry [baseline] (8.553 ms) : 0, 8553
Telemetry [candidate] (8.421 ms) : 0, 8421
Flare Poller [baseline] (3.959 ms) : 0, 3959
Flare Poller [candidate] (3.956 ms) : 0, 3956
IAST [baseline] (24.984 ms) : 0, 24984
IAST [candidate] (24.97 ms) : 0, 24970
section iast
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (815.437 ms) : 0, 815437
BytebuddyAgent [candidate] (819.535 ms) : 0, 819535
GlobalTracer [baseline] (231.167 ms) : 0, 231167
GlobalTracer [candidate] (232.083 ms) : 0, 232083
AppSec [baseline] (35.058 ms) : 0, 35058
AppSec [candidate] (35.316 ms) : 0, 35316
Debugger [baseline] (6.137 ms) : 0, 6137
Debugger [candidate] (6.228 ms) : 0, 6228
Remote Config [baseline] (625.423 µs) : 0, 625
Remote Config [candidate] (622.804 µs) : 0, 623
Telemetry [baseline] (8.685 ms) : 0, 8685
Telemetry [candidate] (8.726 ms) : 0, 8726
Flare Poller [baseline] (4.192 ms) : 0, 4192
Flare Poller [candidate] (4.276 ms) : 0, 4276
IAST [baseline] (26.47 ms) : 0, 26470
IAST [candidate] (26.686 ms) : 0, 26686
section profiling
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.434 ms) : 0, 1434
BytebuddyAgent [baseline] (723.58 ms) : 0, 723580
BytebuddyAgent [candidate] (721.288 ms) : 0, 721288
GlobalTracer [baseline] (219.565 ms) : 0, 219565
GlobalTracer [candidate] (217.655 ms) : 0, 217655
AppSec [baseline] (32.678 ms) : 0, 32678
AppSec [candidate] (32.318 ms) : 0, 32318
Debugger [baseline] (7.329 ms) : 0, 7329
Debugger [candidate] (7.278 ms) : 0, 7278
Remote Config [baseline] (873.635 µs) : 0, 874
Remote Config [candidate] (788.163 µs) : 0, 788
Telemetry [baseline] (15.46 ms) : 0, 15460
Telemetry [candidate] (15.317 ms) : 0, 15317
Flare Poller [baseline] (4.153 ms) : 0, 4153
Flare Poller [candidate] (4.182 ms) : 0, 4182
ProfilingAgent [baseline] (109.741 ms) : 0, 109741
ProfilingAgent [candidate] (108.608 ms) : 0, 108608
Profiling [baseline] (110.746 ms) : 0, 110746
Profiling [candidate] (109.462 ms) : 0, 109462
Loading

Load

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterbdu/gen-index-tasks
git_commit_date17603899631760432723
git_commit_sha85d8580b59e05e
release_version1.55.0-SNAPSHOT~85d85805f61.55.0-SNAPSHOT~b59e05e66d
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17604342071760434207
ci_job_id11774588961177458896
ci_pipeline_id7920639779206397
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-zfyrx7zua-project-304-concurrent-0-nfzte528 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/LinuxLinux runner-zfyrx7zua-project-304-concurrent-0-nfzte528 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 1 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.

scenarioΔ mean http_req_durationΔ mean throughputcandidate mean http_req_durationcandidate mean throughputbaseline mean http_req_durationbaseline mean throughput
scenario:load:insecure-bank:profiling:high_loadbetter
[-689.007µs; -380.131µs] or [-7.438%; -4.104%]
unstable
[-38.219op/s; +98.969op/s] or [-7.628%; +19.754%]
8.729ms531.375op/s9.263ms501.000op/s
scenario:load:insecure-bank:iast:high_loadworse
[+240.944µs; +585.508µs] or [+2.545%; +6.184%]
unstable
[-69.579op/s; +59.164op/s] or [-14.637%; +12.446%]
9.882ms470.156op/s9.469ms475.364op/s
scenario:load:petclinic:code_origins:high_loadbetter
[-2.463ms; -1.652ms] or [-5.459%; -3.661%]
unstable
[-3.143op/s; +13.043op/s] or [-3.031%; +12.578%]
43.056ms108.650op/s45.113ms103.700op/s
Request duration reports for petclinic
gantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section baseline
no_agent (36.817 ms) : 36519, 37115
. : milestone, 36817,
appsec (47.662 ms) : 47258, 48066
. : milestone, 47662,
code_origins (45.113 ms) : 44724, 45503
. : milestone, 45113,
iast (45.978 ms) : 45590, 46365
. : milestone, 45978,
profiling (48.555 ms) : 48101, 49009
. : milestone, 48555,
tracing (45.729 ms) : 45342, 46116
. : milestone, 45729,
section candidate
no_agent (36.646 ms) : 36345, 36946
. : milestone, 36646,
appsec (47.887 ms) : 47461, 48313
. : milestone, 47887,
code_origins (43.056 ms) : 42692, 43420
. : milestone, 43056,
iast (44.79 ms) : 44415, 45165
. : milestone, 44790,
profiling (47.475 ms) : 47047, 47903
. : milestone, 47475,
tracing (44.964 ms) : 44601, 45327
. : milestone, 44964,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent36.817 ms [36.519 ms, 37.115 ms]-
appsec47.662 ms [47.258 ms, 48.066 ms]10.845 ms (29.5%)
code_origins45.113 ms [44.724 ms, 45.503 ms]8.296 ms (22.5%)
iast45.978 ms [45.59 ms, 46.365 ms]9.161 ms (24.9%)
profiling48.555 ms [48.101 ms, 49.009 ms]11.738 ms (31.9%)
tracing45.729 ms [45.342 ms, 46.116 ms]8.912 ms (24.2%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent36.646 ms [36.345 ms, 36.946 ms]-
appsec47.887 ms [47.461 ms, 48.313 ms]11.241 ms (30.7%)
code_origins43.056 ms [42.692 ms, 43.42 ms]6.411 ms (17.5%)
iast44.79 ms [44.415 ms, 45.165 ms]8.144 ms (22.2%)
profiling47.475 ms [47.047 ms, 47.903 ms]10.829 ms (29.6%)
tracing44.964 ms [44.601 ms, 45.327 ms]8.318 ms (22.7%)
Request duration reports for insecure-bank
gantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section baseline
no_agent (4.446 ms) : 4390, 4501
. : milestone, 4446,
iast (9.469 ms) : 9314, 9623
. : milestone, 9469,
iast_FULL (14.17 ms) : 13885, 14455
. : milestone, 14170,
iast_GLOBAL (10.55 ms) : 10348, 10752
. : milestone, 10550,
profiling (9.263 ms) : 9116, 9411
. : milestone, 9263,
tracing (7.845 ms) : 7730, 7961
. : milestone, 7845,
section candidate
no_agent (4.476 ms) : 4425, 4527
. : milestone, 4476,
iast (9.882 ms) : 9716, 10048
. : milestone, 9882,
iast_FULL (13.708 ms) : 13441, 13976
. : milestone, 13708,
iast_GLOBAL (10.52 ms) : 10333, 10708
. : milestone, 10520,
profiling (8.729 ms) : 8589, 8868
. : milestone, 8729,
tracing (7.827 ms) : 7716, 7939
. : milestone, 7827,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent4.446 ms [4.39 ms, 4.501 ms]-
iast9.469 ms [9.314 ms, 9.623 ms]5.023 ms (113.0%)
iast_FULL14.17 ms [13.885 ms, 14.455 ms]9.724 ms (218.7%)
iast_GLOBAL10.55 ms [10.348 ms, 10.752 ms]6.104 ms (137.3%)
profiling9.263 ms [9.116 ms, 9.411 ms]4.818 ms (108.4%)
tracing7.845 ms [7.73 ms, 7.961 ms]3.4 ms (76.5%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent4.476 ms [4.425 ms, 4.527 ms]-
iast9.882 ms [9.716 ms, 10.048 ms]5.406 ms (120.8%)
iast_FULL13.708 ms [13.441 ms, 13.976 ms]9.232 ms (206.2%)
iast_GLOBAL10.52 ms [10.333 ms, 10.708 ms]6.044 ms (135.0%)
profiling8.729 ms [8.589 ms, 8.868 ms]4.253 ms (95.0%)
tracing7.827 ms [7.716 ms, 7.939 ms]3.351 ms (74.9%)

Dacapo

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterbdu/gen-index-tasks
git_commit_date17603899631760432723
git_commit_sha85d8580b59e05e
release_version1.55.0-SNAPSHOT~85d85805f61.55.0-SNAPSHOT~b59e05e66d
See matching parameters
BaselineCandidate
applicationbiojavabiojava
ci_job_date17604347181760434718
ci_job_id11774588971177458897
ci_pipeline_id7920639779206397
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-zfyrx7zua-project-304-concurrent-4-zvcxfo92 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/LinuxLinux runner-zfyrx7zua-project-304-concurrent-4-zvcxfo92 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.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (3.722 ms) : 3503, 3941
. : milestone, 3722,
iast (2.204 ms) : 2141, 2267
. : milestone, 2204,
iast_GLOBAL (2.241 ms) : 2178, 2305
. : milestone, 2241,
profiling (2.044 ms) : 1993, 2094
. : milestone, 2044,
tracing (2.012 ms) : 1963, 2061
. : milestone, 2012,
section candidate
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (3.692 ms) : 3475, 3909
. : milestone, 3692,
iast (2.201 ms) : 2137, 2264
. : milestone, 2201,
iast_GLOBAL (2.253 ms) : 2190, 2317
. : milestone, 2253,
profiling (2.046 ms) : 1995, 2097
. : milestone, 2046,
tracing (2.032 ms) : 1982, 2081
. : milestone, 2032,
Loading
  • baseline results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.474 ms [1.462 ms, 1.485 ms]-
appsec3.722 ms [3.503 ms, 3.941 ms]2.248 ms (152.6%)
iast2.204 ms [2.141 ms, 2.267 ms]730.875 µs (49.6%)
iast_GLOBAL2.241 ms [2.178 ms, 2.305 ms]767.862 µs (52.1%)
profiling2.044 ms [1.993 ms, 2.094 ms]570.034 µs (38.7%)
tracing2.012 ms [1.963 ms, 2.061 ms]538.225 µs (36.5%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.474 ms [1.462 ms, 1.485 ms]-
appsec3.692 ms [3.475 ms, 3.909 ms]2.219 ms (150.6%)
iast2.201 ms [2.137 ms, 2.264 ms]726.948 µs (49.3%)
iast_GLOBAL2.253 ms [2.19 ms, 2.317 ms]779.805 µs (52.9%)
profiling2.046 ms [1.995 ms, 2.097 ms]572.699 µs (38.9%)
tracing2.032 ms [1.982 ms, 2.081 ms]558.177 µs (37.9%)
Execution time for biojava
gantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~b59e05e66d, baseline=1.55.0-SNAPSHOT~85d85805f6
dateFormat X
axisFormat %s
section baseline
no_agent (14.853 s) : 14853000, 14853000
. : milestone, 14853000,
appsec (14.921 s) : 14921000, 14921000
. : milestone, 14921000,
iast (18.815 s) : 18815000, 18815000
. : milestone, 18815000,
iast_GLOBAL (18.126 s) : 18126000, 18126000
. : milestone, 18126000,
profiling (15.03 s) : 15030000, 15030000
. : milestone, 15030000,
tracing (14.993 s) : 14993000, 14993000
. : milestone, 14993000,
section candidate
no_agent (15.367 s) : 15367000, 15367000
. : milestone, 15367000,
appsec (15.074 s) : 15074000, 15074000
. : milestone, 15074000,
iast (18.446 s) : 18446000, 18446000
. : milestone, 18446000,
iast_GLOBAL (18.22 s) : 18220000, 18220000
. : milestone, 18220000,
profiling (15.884 s) : 15884000, 15884000
. : milestone, 15884000,
tracing (15.015 s) : 15015000, 15015000
. : milestone, 15015000,
Loading
  • baseline results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent14.853 s [14.853 s, 14.853 s]-
appsec14.921 s [14.921 s, 14.921 s]68.0 ms (0.5%)
iast18.815 s [18.815 s, 18.815 s]3.962 s (26.7%)
iast_GLOBAL18.126 s [18.126 s, 18.126 s]3.273 s (22.0%)
profiling15.03 s [15.03 s, 15.03 s]177.0 ms (1.2%)
tracing14.993 s [14.993 s, 14.993 s]140.0 ms (0.9%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.367 s [15.367 s, 15.367 s]-
appsec15.074 s [15.074 s, 15.074 s]-293.0 ms (-1.9%)
iast18.446 s [18.446 s, 18.446 s]3.079 s (20.0%)
iast_GLOBAL18.22 s [18.22 s, 18.22 s]2.853 s (18.6%)
profiling15.884 s [15.884 s, 15.884 s]517.0 ms (3.4%)
tracing15.015 s [15.015 s, 15.015 s]-352.0 ms (-2.3%)

For logs like
```
[main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content 'datadog.trace.civisibility.writer.ddintake.*' under 'trace', already seen in <root>. Ensure your content is under a distinct directory.
```
For logs like
```
Detected duplicate content under 'META-INF.AL2.0'. Ensure your content is under a distinct directory.
Detected duplicate content under 'META-INF.LGPL2.1'. Ensure your content is under a distinct directory.
```
…nt files
For logs like
```
[main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content under 'datadog.compiler.utils.*'. Ensure your content is under a distinct directory.
[main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content under 'datadog.compiler.annotations.*'. Ensure your content is under a distinct
```
@bric3
bric3force-pushed the bdu/gen-index-tasks branch from a15273d to acea296CompareOctober 13, 2025 16:00
@bric3
bric3force-pushed the bdu/gen-index-tasks branch from acea296 to 5dfca97CompareOctober 13, 2025 16:03
exclude(dependency('org.ow2.asm::'))

// javac plugin client
exclude(dependency('com.datadoghq:dd-javac-plugin-client'))

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

note: Fix repeated CompilerUtils and annotations being duplicated in every sub-agents

@bric3bric3 left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Related to #9595

Comment on lines +27 to +31
// exclude 'jna' this since it's available in the instrumentation jar
dependencies {
exclude(dependency("net.java.dev.jna:jna"))
exclude(dependency("net.java.dev.jna:jna-platform"))
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

note: The previous exclusion forgot other files in META-INF

Comment threaddd-java-agent/build.gradle

@amarzialiamarziali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't have a full overview of this part of the code. However the changes done looks good to me

@bric3

bric3 commented Oct 14, 2025

Copy link
Copy Markdown
ContributorAuthor

@amarziali The issue with the previous code was that, the generation task was writing at the same location as other tasks, since multiple tasks could write at the same location, this break up-to-date checks, and as such the build cache for the impacted tasks. This PR properly segregate the output folder for each participating tasks (the jar extract and the index gen), this is is done by configuring the srcDir of the main sourceSet.

@bric3
bric3 merged commit f8562e4 into masterOct 14, 2025
530 checks passed
@bric3
bric3 deleted the bdu/gen-index-tasks branch October 14, 2025 14:16
@github-actionsgithub-actionsBot added this to the 1.55.0 milestone Oct 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: toolingBuild & Toolingtag: no release notesChanges to exclude from release notestype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bric3@amarziali