Skip to content

Migrate dd-trace-core groovy files to java part 2#11062

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits intomasterfrom
jpbempel/g2j-DDSpec
Apr 10, 2026
Merged

Migrate dd-trace-core groovy files to java part 2#11062
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits intomasterfrom
jpbempel/g2j-DDSpec

Conversation

@jpbempel
Copy link
Copy Markdown
Member

@jpbempel jpbempel commented Apr 8, 2026

What Does This Do

migrate DDSpecification and DDCoreSpecification that are used by most of the test in this module.
we are keeping the groovy version to be able to incrementally migrate tests.
a first small test (DDSpanLinkTest )is migrated to prove the viability of the strategy.

Motivation

this is part of the effort to migrate groovy tests to Java/JUnit
part1: #11053

Additional Notes

Key design decisions for DDJavaSpecification:

  • @TestInstance(Lifecycle.PER_CLASS) — allows non-static @BeforeAll/@AfterAll methods,
    mirrors Spock's per-class lifecycle where setupSpec/cleanupSpec run once per test class
  • installConfigTransformer() in the static block — handles the ByteBuddy transformation
    (equivalent to ConfigTransformSpockExtension) inline, making Config.INSTANCE
    public/static/volatile before makeConfigInstanceModifiable() runs
  • TestEnvironmentVariables inner class — Java port of ControllableEnvironmentVariables (which
    is Groovy and compiles after Java, so can't be referenced from Java source)
  • configModificationFailed is static package-private so ConfigInstrumentationFailedListener
    (inner class) can access it
  • JUnit 5 lifecycle: @BeforeAll setupSpec(), @AfterAll cleanupSpec(), @BeforeEach setup(),
    @AfterEach cleanup() — same semantics as Spock
  • All config utility methods (injectSysConfig, injectEnvConfig, rebuildConfig, etc.) are
    present with Java overload pattern replacing Groovy's default parameters

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@jpbempel jpbempel force-pushed the jpbempel/g2j-DDSpec branch 2 times, most recently from 35225f3 to 7e1ec4c Compare April 8, 2026 07:44
Copy link
Copy Markdown
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Dropping few comments from a partial early review

Comment on lines +53 to +57
static {
allowContextTesting();
installConfigTransformer();
makeConfigInstanceModifiable();
}
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.

❔ question: ‏Can this go to a @BeforeAll method?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment on lines +43 to +44
private ListWriter writer = new ListWriter();
private CoreTracer tracer = tracerBuilder().writer(writer).build();
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.

🎯 suggestion: ‏Moving initialization into a @BeforeEach method?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done


private static final int SPAN_LINK_TAG_MAX_LENGTH = 25_000;
private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
// W3C Trace Context standard header names (W3CHttpCodec is package-private)
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.

❔ question: ‏Should we add an test helper to access them rather than duplicating?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yep I have already a bridge for accessing the method factory

"sampled | true | '01' | '1' ",
"not sampled | false | '00' | '-1' "
})
@ParameterizedTest(name = "create span link from extracted context [{index}]")
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.

🎯 suggestion: ‏Better use scenario than index for readability.
EDIT: That should be the default behavior if we drop the @ParameterizedTest as it does not add value compared to the test method name.

Suggested change
@ParameterizedTest(name = "create span link from extracted context [{index}]")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment on lines +95 to +99
JSON_MAPPER.readValue(
spanLinksTag,
JSON_MAPPER
.getTypeFactory()
.constructCollectionType(List.class, TestSpanLinkJson.class));
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.

🎯 suggestion: ‏This feels it should go to the TestSpanlinkJson class. It's duplicated among test cases too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added for now just a static method to deserialize

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 8, 2026

Benchmarks

⚠️ Warning: Baseline build not found for merge-base commit. Comparing against the latest commit on master instead.

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/g2j-DDSpec
git_commit_date 1775744045 1775755895
git_commit_sha b266e2d 15c43a8
release_version 1.62.0-SNAPSHOT~b266e2d0c2 1.62.0-SNAPSHOT~15c43a8621
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1775757702 1775757702
ci_job_id 1582583026 1582583026
ci_pipeline_id 106927176 106927176
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-kwf2mym6 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-kwf2mym6 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 59 metrics, 12 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1066717
Total [baseline] (11.144 s) : 0, 11144260
Agent [candidate] (1.057 s) : 0, 1057412
Total [candidate] (11.03 s) : 0, 11030290
section appsec
Agent [baseline] (1.252 s) : 0, 1252028
Total [baseline] (11.23 s) : 0, 11230095
Agent [candidate] (1.258 s) : 0, 1257543
Total [candidate] (11.21 s) : 0, 11210421
section iast
Agent [baseline] (1.224 s) : 0, 1223664
Total [baseline] (11.263 s) : 0, 11263463
Agent [candidate] (1.223 s) : 0, 1223332
Total [candidate] (11.177 s) : 0, 11177247
section profiling
Agent [baseline] (1.194 s) : 0, 1194431
Total [baseline] (11.131 s) : 0, 11131496
Agent [candidate] (1.186 s) : 0, 1186006
Total [candidate] (11.058 s) : 0, 11057836
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.067 s -
Agent appsec 1.252 s 185.311 ms (17.4%)
Agent iast 1.224 s 156.947 ms (14.7%)
Agent profiling 1.194 s 127.714 ms (12.0%)
Total tracing 11.144 s -
Total appsec 11.23 s 85.835 ms (0.8%)
Total iast 11.263 s 119.203 ms (1.1%)
Total profiling 11.131 s -12.764 ms (-0.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent appsec 1.258 s 200.13 ms (18.9%)
Agent iast 1.223 s 165.919 ms (15.7%)
Agent profiling 1.186 s 128.594 ms (12.2%)
Total tracing 11.03 s -
Total appsec 11.21 s 180.131 ms (1.6%)
Total iast 11.177 s 146.957 ms (1.3%)
Total profiling 11.058 s 27.547 ms (0.2%)
gantt
    title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (639.267 ms) : 0, 639267
BytebuddyAgent [candidate] (633.538 ms) : 0, 633538
AgentMeter [baseline] (29.712 ms) : 0, 29712
AgentMeter [candidate] (29.323 ms) : 0, 29323
GlobalTracer [baseline] (250.805 ms) : 0, 250805
GlobalTracer [candidate] (249.207 ms) : 0, 249207
AppSec [baseline] (32.256 ms) : 0, 32256
AppSec [candidate] (31.975 ms) : 0, 31975
Debugger [baseline] (60.144 ms) : 0, 60144
Debugger [candidate] (59.828 ms) : 0, 59828
Remote Config [baseline] (595.824 µs) : 0, 596
Remote Config [candidate] (638.902 µs) : 0, 639
Telemetry [baseline] (8.08 ms) : 0, 8080
Telemetry [candidate] (8.125 ms) : 0, 8125
Flare Poller [baseline] (8.278 ms) : 0, 8278
Flare Poller [candidate] (7.376 ms) : 0, 7376
section appsec
crashtracking [baseline] (1.237 ms) : 0, 1237
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (664.582 ms) : 0, 664582
BytebuddyAgent [candidate] (667.67 ms) : 0, 667670
AgentMeter [baseline] (12.053 ms) : 0, 12053
AgentMeter [candidate] (12.103 ms) : 0, 12103
GlobalTracer [baseline] (249.713 ms) : 0, 249713
GlobalTracer [candidate] (250.727 ms) : 0, 250727
AppSec [baseline] (184.49 ms) : 0, 184490
AppSec [candidate] (185.396 ms) : 0, 185396
Debugger [baseline] (66.167 ms) : 0, 66167
Debugger [candidate] (66.357 ms) : 0, 66357
Remote Config [baseline] (599.135 µs) : 0, 599
Remote Config [candidate] (609.945 µs) : 0, 610
Telemetry [baseline] (8.599 ms) : 0, 8599
Telemetry [candidate] (8.757 ms) : 0, 8757
Flare Poller [baseline] (3.579 ms) : 0, 3579
Flare Poller [candidate] (3.611 ms) : 0, 3611
IAST [baseline] (24.587 ms) : 0, 24587
IAST [candidate] (24.722 ms) : 0, 24722
section iast
crashtracking [baseline] (1.227 ms) : 0, 1227
crashtracking [candidate] (1.216 ms) : 0, 1216
BytebuddyAgent [baseline] (801.431 ms) : 0, 801431
BytebuddyAgent [candidate] (800.617 ms) : 0, 800617
AgentMeter [baseline] (11.323 ms) : 0, 11323
AgentMeter [candidate] (11.378 ms) : 0, 11378
GlobalTracer [baseline] (239.489 ms) : 0, 239489
GlobalTracer [candidate] (239.699 ms) : 0, 239699
AppSec [baseline] (32.308 ms) : 0, 32308
AppSec [candidate] (32.431 ms) : 0, 32431
Debugger [baseline] (59.179 ms) : 0, 59179
Debugger [candidate] (61.671 ms) : 0, 61671
Remote Config [baseline] (560.42 µs) : 0, 560
Remote Config [candidate] (1.119 ms) : 0, 1119
Telemetry [baseline] (12.267 ms) : 0, 12267
Telemetry [candidate] (9.983 ms) : 0, 9983
Flare Poller [baseline] (3.442 ms) : 0, 3442
Flare Poller [candidate] (3.447 ms) : 0, 3447
IAST [baseline] (26.41 ms) : 0, 26410
IAST [candidate] (25.698 ms) : 0, 25698
section profiling
crashtracking [baseline] (1.191 ms) : 0, 1191
crashtracking [candidate] (1.19 ms) : 0, 1190
BytebuddyAgent [baseline] (698.121 ms) : 0, 698121
BytebuddyAgent [candidate] (692.728 ms) : 0, 692728
AgentMeter [baseline] (9.154 ms) : 0, 9154
AgentMeter [candidate] (9.145 ms) : 0, 9145
GlobalTracer [baseline] (208.247 ms) : 0, 208247
GlobalTracer [candidate] (206.946 ms) : 0, 206946
AppSec [baseline] (32.726 ms) : 0, 32726
AppSec [candidate] (32.457 ms) : 0, 32457
Debugger [baseline] (66.403 ms) : 0, 66403
Debugger [candidate] (65.51 ms) : 0, 65510
Remote Config [baseline] (576.747 µs) : 0, 577
Remote Config [candidate] (567.502 µs) : 0, 568
Telemetry [baseline] (7.922 ms) : 0, 7922
Telemetry [candidate] (7.833 ms) : 0, 7833
Flare Poller [baseline] (3.59 ms) : 0, 3590
Flare Poller [candidate] (3.617 ms) : 0, 3617
ProfilingAgent [baseline] (94.807 ms) : 0, 94807
ProfilingAgent [candidate] (94.403 ms) : 0, 94403
Profiling [baseline] (95.389 ms) : 0, 95389
Profiling [candidate] (94.98 ms) : 0, 94980
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055992
Total [baseline] (8.843 s) : 0, 8843086
Agent [candidate] (1.065 s) : 0, 1064935
Total [candidate] (8.858 s) : 0, 8857693
section iast
Agent [baseline] (1.228 s) : 0, 1227821
Total [baseline] (9.576 s) : 0, 9576130
Agent [candidate] (1.224 s) : 0, 1224197
Total [candidate] (9.572 s) : 0, 9571700
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.228 s 171.829 ms (16.3%)
Total tracing 8.843 s -
Total iast 9.576 s 733.044 ms (8.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.065 s -
Agent iast 1.224 s 159.262 ms (15.0%)
Total tracing 8.858 s -
Total iast 9.572 s 714.007 ms (8.1%)
gantt
    title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.246 ms) : 0, 1246
BytebuddyAgent [baseline] (631.734 ms) : 0, 631734
BytebuddyAgent [candidate] (638.438 ms) : 0, 638438
AgentMeter [baseline] (29.421 ms) : 0, 29421
AgentMeter [candidate] (29.614 ms) : 0, 29614
GlobalTracer [baseline] (248.035 ms) : 0, 248035
GlobalTracer [candidate] (250.7 ms) : 0, 250700
AppSec [baseline] (31.919 ms) : 0, 31919
AppSec [candidate] (32.211 ms) : 0, 32211
Debugger [baseline] (59.079 ms) : 0, 59079
Debugger [candidate] (59.558 ms) : 0, 59558
Remote Config [baseline] (602.151 µs) : 0, 602
Remote Config [candidate] (601.927 µs) : 0, 602
Telemetry [baseline] (8.05 ms) : 0, 8050
Telemetry [candidate] (8.207 ms) : 0, 8207
Flare Poller [baseline] (9.814 ms) : 0, 9814
Flare Poller [candidate] (8.049 ms) : 0, 8049
section iast
crashtracking [baseline] (1.226 ms) : 0, 1226
crashtracking [candidate] (1.228 ms) : 0, 1228
BytebuddyAgent [baseline] (805.244 ms) : 0, 805244
BytebuddyAgent [candidate] (802.002 ms) : 0, 802002
AgentMeter [baseline] (11.395 ms) : 0, 11395
AgentMeter [candidate] (11.345 ms) : 0, 11345
GlobalTracer [baseline] (239.308 ms) : 0, 239308
GlobalTracer [candidate] (239.115 ms) : 0, 239115
AppSec [baseline] (32.654 ms) : 0, 32654
AppSec [candidate] (30.317 ms) : 0, 30317
Debugger [baseline] (60.89 ms) : 0, 60890
Debugger [candidate] (62.535 ms) : 0, 62535
Remote Config [baseline] (537.925 µs) : 0, 538
Remote Config [candidate] (1.703 ms) : 0, 1703
Telemetry [baseline] (10.954 ms) : 0, 10954
Telemetry [candidate] (10.55 ms) : 0, 10550
Flare Poller [baseline] (3.495 ms) : 0, 3495
Flare Poller [candidate] (3.452 ms) : 0, 3452
IAST [baseline] (25.723 ms) : 0, 25723
IAST [candidate] (25.819 ms) : 0, 25819
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/g2j-DDSpec
git_commit_date 1775744045 1775755895
git_commit_sha b266e2d 15c43a8
release_version 1.62.0-SNAPSHOT~b266e2d0c2 1.62.0-SNAPSHOT~15c43a8621
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1775758317 1775758317
ci_job_id 1582583029 1582583029
ci_pipeline_id 106927176 106927176
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-s9skbeyy 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-s9skbeyy 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 2 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:high_load worse
[+149.329µs; +250.543µs] or [+6.055%; +10.159%]
unsure
[+70.051µs; +492.730µs] or [+0.954%; +6.714%]
unstable
[-216.854op/s; +53.166op/s] or [-15.107%; +3.704%]
2.666ms 7.620ms 1353.656op/s 2.466ms 7.339ms 1435.500op/s
scenario:load:insecure-bank:no_agent:high_load worse
[+23.802µs; +56.153µs] or [+2.373%; +5.598%]
unstable
[-172.999µs; +592.133µs] or [-6.083%; +20.821%]
unstable
[-532.305op/s; +233.805op/s] or [-14.799%; +6.500%]
1.043ms 3.053ms 3447.656op/s 1.003ms 2.844ms 3596.906op/s
scenario:load:petclinic:appsec:high_load better
[-1500.639µs; -464.560µs] or [-7.773%; -2.406%]
unsure
[-2.706ms; -0.458ms] or [-8.715%; -1.475%]
unstable
[-15.781op/s; +35.844op/s] or [-6.616%; +15.027%]
18.322ms 29.473ms 248.562op/s 19.305ms 31.055ms 238.531op/s
scenario:load:petclinic:no_agent:high_load better
[-2.352ms; -0.555ms] or [-12.205%; -2.882%]
unstable
[-4.253ms; -0.590ms] or [-13.330%; -1.849%]
unstable
[-10.834op/s; +45.084op/s] or [-4.556%; +18.958%]
17.814ms 29.483ms 254.938op/s 19.268ms 31.905ms 237.812op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.631 ms) : 19424, 19838
.   : milestone, 19631,
appsec (19.567 ms) : 19366, 19768
.   : milestone, 19567,
code_origins (17.574 ms) : 17398, 17749
.   : milestone, 17574,
iast (17.93 ms) : 17754, 18107
.   : milestone, 17930,
profiling (18.007 ms) : 17831, 18183
.   : milestone, 18007,
tracing (17.783 ms) : 17608, 17957
.   : milestone, 17783,
section candidate
no_agent (18.306 ms) : 18119, 18493
.   : milestone, 18306,
appsec (18.778 ms) : 18588, 18969
.   : milestone, 18778,
code_origins (17.762 ms) : 17583, 17941
.   : milestone, 17762,
iast (17.955 ms) : 17776, 18135
.   : milestone, 17955,
profiling (18.385 ms) : 18205, 18565
.   : milestone, 18385,
tracing (18.029 ms) : 17852, 18206
.   : milestone, 18029,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.631 ms [19.424 ms, 19.838 ms] -
appsec 19.567 ms [19.366 ms, 19.768 ms] -64.447 µs (-0.3%)
code_origins 17.574 ms [17.398 ms, 17.749 ms] -2.058 ms (-10.5%)
iast 17.93 ms [17.754 ms, 18.107 ms] -1.701 ms (-8.7%)
profiling 18.007 ms [17.831 ms, 18.183 ms] -1.624 ms (-8.3%)
tracing 17.783 ms [17.608 ms, 17.957 ms] -1.849 ms (-9.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.306 ms [18.119 ms, 18.493 ms] -
appsec 18.778 ms [18.588 ms, 18.969 ms] 472.206 µs (2.6%)
code_origins 17.762 ms [17.583 ms, 17.941 ms] -544.132 µs (-3.0%)
iast 17.955 ms [17.776 ms, 18.135 ms] -350.625 µs (-1.9%)
profiling 18.385 ms [18.205 ms, 18.565 ms] 78.505 µs (0.4%)
tracing 18.029 ms [17.852 ms, 18.206 ms] -277.228 µs (-1.5%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.226 ms) : 1214, 1239
.   : milestone, 1226,
iast (3.185 ms) : 3144, 3226
.   : milestone, 3185,
iast_FULL (6.003 ms) : 5944, 6063
.   : milestone, 6003,
iast_GLOBAL (3.675 ms) : 3617, 3733
.   : milestone, 3675,
profiling (2.288 ms) : 2265, 2312
.   : milestone, 2288,
tracing (1.956 ms) : 1939, 1973
.   : milestone, 1956,
section candidate
no_agent (1.283 ms) : 1270, 1295
.   : milestone, 1283,
iast (3.383 ms) : 3337, 3429
.   : milestone, 3383,
iast_FULL (6.175 ms) : 6110, 6240
.   : milestone, 6175,
iast_GLOBAL (3.725 ms) : 3664, 3787
.   : milestone, 3725,
profiling (2.365 ms) : 2339, 2390
.   : milestone, 2365,
tracing (1.871 ms) : 1855, 1887
.   : milestone, 1871,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.226 ms [1.214 ms, 1.239 ms] -
iast 3.185 ms [3.144 ms, 3.226 ms] 1.959 ms (159.7%)
iast_FULL 6.003 ms [5.944 ms, 6.063 ms] 4.777 ms (389.5%)
iast_GLOBAL 3.675 ms [3.617 ms, 3.733 ms] 2.449 ms (199.7%)
profiling 2.288 ms [2.265 ms, 2.312 ms] 1.062 ms (86.6%)
tracing 1.956 ms [1.939 ms, 1.973 ms] 729.591 µs (59.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.283 ms [1.27 ms, 1.295 ms] -
iast 3.383 ms [3.337 ms, 3.429 ms] 2.1 ms (163.7%)
iast_FULL 6.175 ms [6.11 ms, 6.24 ms] 4.892 ms (381.3%)
iast_GLOBAL 3.725 ms [3.664 ms, 3.787 ms] 2.442 ms (190.4%)
profiling 2.365 ms [2.339 ms, 2.39 ms] 1.082 ms (84.3%)
tracing 1.871 ms [1.855 ms, 1.887 ms] 588.18 µs (45.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/g2j-DDSpec
git_commit_date 1775744045 1775755895
git_commit_sha b266e2d 15c43a8
release_version 1.62.0-SNAPSHOT~b266e2d0c2 1.62.0-SNAPSHOT~15c43a8621
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1775757887 1775757887
ci_job_id 1582583031 1582583031
ci_pipeline_id 106927176 106927176
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-1-jm1x7mlq 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-1-jm1x7mlq 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 biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.7 s) : 15700000, 15700000
.   : milestone, 15700000,
appsec (14.899 s) : 14899000, 14899000
.   : milestone, 14899000,
iast (18.467 s) : 18467000, 18467000
.   : milestone, 18467000,
iast_GLOBAL (18.196 s) : 18196000, 18196000
.   : milestone, 18196000,
profiling (14.997 s) : 14997000, 14997000
.   : milestone, 14997000,
tracing (15.076 s) : 15076000, 15076000
.   : milestone, 15076000,
section candidate
no_agent (15.265 s) : 15265000, 15265000
.   : milestone, 15265000,
appsec (14.713 s) : 14713000, 14713000
.   : milestone, 14713000,
iast (18.45 s) : 18450000, 18450000
.   : milestone, 18450000,
iast_GLOBAL (18.183 s) : 18183000, 18183000
.   : milestone, 18183000,
profiling (14.739 s) : 14739000, 14739000
.   : milestone, 14739000,
tracing (14.677 s) : 14677000, 14677000
.   : milestone, 14677000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.7 s [15.7 s, 15.7 s] -
appsec 14.899 s [14.899 s, 14.899 s] -801.0 ms (-5.1%)
iast 18.467 s [18.467 s, 18.467 s] 2.767 s (17.6%)
iast_GLOBAL 18.196 s [18.196 s, 18.196 s] 2.496 s (15.9%)
profiling 14.997 s [14.997 s, 14.997 s] -703.0 ms (-4.5%)
tracing 15.076 s [15.076 s, 15.076 s] -624.0 ms (-4.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.265 s [15.265 s, 15.265 s] -
appsec 14.713 s [14.713 s, 14.713 s] -552.0 ms (-3.6%)
iast 18.45 s [18.45 s, 18.45 s] 3.185 s (20.9%)
iast_GLOBAL 18.183 s [18.183 s, 18.183 s] 2.918 s (19.1%)
profiling 14.739 s [14.739 s, 14.739 s] -526.0 ms (-3.4%)
tracing 14.677 s [14.677 s, 14.677 s] -588.0 ms (-3.9%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~15c43a8621, baseline=1.62.0-SNAPSHOT~b266e2d0c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.487 ms) : 1475, 1499
.   : milestone, 1487,
appsec (3.829 ms) : 3605, 4052
.   : milestone, 3829,
iast (2.282 ms) : 2212, 2351
.   : milestone, 2282,
iast_GLOBAL (2.322 ms) : 2252, 2392
.   : milestone, 2322,
profiling (2.104 ms) : 2048, 2159
.   : milestone, 2104,
tracing (2.09 ms) : 2035, 2144
.   : milestone, 2090,
section candidate
no_agent (1.49 ms) : 1478, 1501
.   : milestone, 1490,
appsec (3.832 ms) : 3610, 4054
.   : milestone, 3832,
iast (2.281 ms) : 2211, 2351
.   : milestone, 2281,
iast_GLOBAL (2.326 ms) : 2256, 2397
.   : milestone, 2326,
profiling (2.113 ms) : 2057, 2168
.   : milestone, 2113,
tracing (2.083 ms) : 2029, 2137
.   : milestone, 2083,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.487 ms [1.475 ms, 1.499 ms] -
appsec 3.829 ms [3.605 ms, 4.052 ms] 2.342 ms (157.5%)
iast 2.282 ms [2.212 ms, 2.351 ms] 794.786 µs (53.5%)
iast_GLOBAL 2.322 ms [2.252 ms, 2.392 ms] 834.943 µs (56.2%)
profiling 2.104 ms [2.048 ms, 2.159 ms] 616.915 µs (41.5%)
tracing 2.09 ms [2.035 ms, 2.144 ms] 602.594 µs (40.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.49 ms [1.478 ms, 1.501 ms] -
appsec 3.832 ms [3.61 ms, 4.054 ms] 2.342 ms (157.2%)
iast 2.281 ms [2.211 ms, 2.351 ms] 791.676 µs (53.1%)
iast_GLOBAL 2.326 ms [2.256 ms, 2.397 ms] 836.573 µs (56.2%)
profiling 2.113 ms [2.057 ms, 2.168 ms] 622.842 µs (41.8%)
tracing 2.083 ms [2.029 ms, 2.137 ms] 593.121 µs (39.8%)

Copy link
Copy Markdown
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Keep adding comments.
About the span link test case, I can help to rework it once you're ready to review as I have the context.

"link after start only | false | true ",
"links before and after | true | true "
})
@ParameterizedTest(name = "add span link at any time [{index}]")
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.

🎯 suggestion: ‏Same suggestion about index vs scenario

Suggested change
@ParameterizedTest(name = "add span link at any time [{index}]")

@ParameterizedTest(name = "add span link at any time [{index}]")
void addSpanLinkAtAnyTime(boolean beforeStart, boolean afterStart) throws Exception {
AgentTracer.SpanBuilder builder = tracer.buildSpan("test", "operation");
List<SpanLink> links = new java.util.ArrayList<>();
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.

🎯 suggestion: ‏Use import

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

.getTypeFactory()
.constructCollectionType(List.class, TestSpanLinkJson.class));

assertEquals((beforeStart ? 1 : 0) + (afterStart ? 1 : 0), decodedSpanLinks.size());
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.

🎯 suggestion:

Suggested change
assertEquals((beforeStart ? 1 : 0) + (afterStart ? 1 : 0), decodedSpanLinks.size());
int expectedLinkCount = (beforeStart ? 1 : 0) + (afterStart ? 1 : 0);
assertEquals(expectedLinkCount, decodedSpanLinks.size());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Map<String, String> attributes = new HashMap<>();
attributes.put("link-index", Integer.toString(index));

return new DDSpanLink(
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.

❔ question: ‏Should we have an implementation of SpanLink for tests that will open the constructor? Or hide it behind a static helper/constructor. But DDSpanLink don't seem right here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

up to you here. you can do some refactoring afterward.
to me, does feel right. I don't see any issue.

}
}

static class TestSpanLinkJson {
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.

🎯 suggestion:SpanLinkAsTag would better express the concern and the reason of the JSON encoding.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

protected boolean assertThreadsEachCleanup = true;
private boolean ignoreThreadCleanup;

static void allowContextTesting() {
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.

💭 thought: ‏This will be a duplicate of the already merge feature here: https://github.com/DataDog/dd-trace-java/pull/11009/changes#diff-64b7ed73da5a4f2c4e2f4c285b90359f2f1be89b41dc4053377a0ac1eebe169f
We need to refactor it later.

jpbempel added 3 commits April 8, 2026 11:49
migrate DDSpecification and DDCoreSpecification that are used by most
of the test in this module.
we are keeping the groovy version to be able to incrementally migrate
tests.
a first small test (DDSpanLinkTest )is migrated to prove the viability
of the strategy.
@jpbempel jpbempel force-pushed the jpbempel/g2j-DDSpec branch from 4e01627 to 9e0bebb Compare April 8, 2026 11:59
@jpbempel jpbempel marked this pull request as ready for review April 8, 2026 14:15
@jpbempel jpbempel requested a review from a team as a code owner April 8, 2026 14:15
@jpbempel jpbempel requested a review from mcculls April 8, 2026 14:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@jpbempel jpbempel added comp: testing Testing tag: no release notes Changes to exclude from release notes labels Apr 8, 2026
remove PER_CLASS mode
setupSpec -> beforeAll
Copy link
Copy Markdown
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

👏 praise: ‏Great progress here! Thanks for keep tackling the migration challenge 🙏

@jpbempel jpbempel added this pull request to the merge queue Apr 10, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts bot commented Apr 10, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Apr 10, 2026

View all feedbacks in Devflow UI.

2026-04-10 06:14:53 UTC ℹ️ Start processing command /merge


2026-04-10 06:14:56 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-04-10 07:19:33 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 6564199 into master Apr 10, 2026
745 of 747 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the jpbempel/g2j-DDSpec branch April 10, 2026 07:19
@github-actions github-actions bot added this to the 1.62.0 milestone Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: no release notes Changes to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants