Skip to content

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

Open
jpbempel wants to merge 3 commits intomasterfrom
jpbempel/g2j-DDSpec
Open

Migrate dd-trace-core groovy files to java part 2#11062
jpbempel wants to merge 3 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 1775589541 1775649363
git_commit_sha aa7c70f 9e0bebb
release_version 1.61.0-SNAPSHOT~aa7c70f2e7 1.61.0-SNAPSHOT~9e0bebb6dd
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1775651524 1775651524
ci_job_id 1576846406 1576846406
ci_pipeline_id 106622672 106622672
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-xbsqc0p0 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-xbsqc0p0 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, 13 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058156
Total [baseline] (8.836 s) : 0, 8836468
Agent [candidate] (1.064 s) : 0, 1064493
Total [candidate] (8.851 s) : 0, 8850688
section iast
Agent [baseline] (1.24 s) : 0, 1240456
Total [baseline] (9.583 s) : 0, 9582630
Agent [candidate] (1.234 s) : 0, 1234165
Total [candidate] (9.6 s) : 0, 9599659
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.058 s -
Agent iast 1.24 s 182.3 ms (17.2%)
Total tracing 8.836 s -
Total iast 9.583 s 746.162 ms (8.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent iast 1.234 s 169.672 ms (15.9%)
Total tracing 8.851 s -
Total iast 9.6 s 748.971 ms (8.5%)
gantt
    title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.236 ms) : 0, 1236
crashtracking [candidate] (1.249 ms) : 0, 1249
BytebuddyAgent [baseline] (633.215 ms) : 0, 633215
BytebuddyAgent [candidate] (638.307 ms) : 0, 638307
AgentMeter [baseline] (29.614 ms) : 0, 29614
AgentMeter [candidate] (29.682 ms) : 0, 29682
GlobalTracer [baseline] (249.696 ms) : 0, 249696
GlobalTracer [candidate] (250.204 ms) : 0, 250204
AppSec [baseline] (32.269 ms) : 0, 32269
AppSec [candidate] (32.114 ms) : 0, 32114
Debugger [baseline] (59.681 ms) : 0, 59681
Debugger [candidate] (59.5 ms) : 0, 59500
Remote Config [baseline] (609.192 µs) : 0, 609
Remote Config [candidate] (596.196 µs) : 0, 596
Telemetry [baseline] (8.179 ms) : 0, 8179
Telemetry [candidate] (8.188 ms) : 0, 8188
Flare Poller [baseline] (7.34 ms) : 0, 7340
Flare Poller [candidate] (8.249 ms) : 0, 8249
section iast
crashtracking [baseline] (1.261 ms) : 0, 1261
crashtracking [candidate] (1.242 ms) : 0, 1242
BytebuddyAgent [baseline] (812.932 ms) : 0, 812932
BytebuddyAgent [candidate] (808.821 ms) : 0, 808821
AgentMeter [baseline] (11.777 ms) : 0, 11777
AgentMeter [candidate] (11.583 ms) : 0, 11583
GlobalTracer [baseline] (242.042 ms) : 0, 242042
GlobalTracer [candidate] (241.314 ms) : 0, 241314
AppSec [baseline] (33.143 ms) : 0, 33143
AppSec [candidate] (30.455 ms) : 0, 30455
Debugger [baseline] (58.681 ms) : 0, 58681
Debugger [candidate] (62.144 ms) : 0, 62144
Remote Config [baseline] (540.913 µs) : 0, 541
Remote Config [candidate] (528.439 µs) : 0, 528
Telemetry [baseline] (13.118 ms) : 0, 13118
Telemetry [candidate] (12.284 ms) : 0, 12284
Flare Poller [baseline] (3.538 ms) : 0, 3538
Flare Poller [candidate] (3.52 ms) : 0, 3520
IAST [baseline] (26.956 ms) : 0, 26956
IAST [candidate] (25.856 ms) : 0, 25856
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056784
Total [baseline] (11.022 s) : 0, 11021643
Agent [candidate] (1.054 s) : 0, 1054154
Total [candidate] (11.151 s) : 0, 11151003
section appsec
Agent [baseline] (1.256 s) : 0, 1255816
Total [baseline] (11.084 s) : 0, 11083549
Agent [candidate] (1.249 s) : 0, 1248502
Total [candidate] (11.139 s) : 0, 11138689
section iast
Agent [baseline] (1.224 s) : 0, 1224437
Total [baseline] (11.306 s) : 0, 11305910
Agent [candidate] (1.221 s) : 0, 1221336
Total [candidate] (11.291 s) : 0, 11290881
section profiling
Agent [baseline] (1.184 s) : 0, 1183743
Total [baseline] (11.103 s) : 0, 11102734
Agent [candidate] (1.189 s) : 0, 1188751
Total [candidate] (11.04 s) : 0, 11039725
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent appsec 1.256 s 199.031 ms (18.8%)
Agent iast 1.224 s 167.653 ms (15.9%)
Agent profiling 1.184 s 126.959 ms (12.0%)
Total tracing 11.022 s -
Total appsec 11.084 s 61.906 ms (0.6%)
Total iast 11.306 s 284.267 ms (2.6%)
Total profiling 11.103 s 81.091 ms (0.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.054 s -
Agent appsec 1.249 s 194.348 ms (18.4%)
Agent iast 1.221 s 167.182 ms (15.9%)
Agent profiling 1.189 s 134.597 ms (12.8%)
Total tracing 11.151 s -
Total appsec 11.139 s -12.314 ms (-0.1%)
Total iast 11.291 s 139.878 ms (1.3%)
Total profiling 11.04 s -111.278 ms (-1.0%)
gantt
    title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.234 ms) : 0, 1234
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (633.922 ms) : 0, 633922
BytebuddyAgent [candidate] (631.942 ms) : 0, 631942
AgentMeter [baseline] (29.475 ms) : 0, 29475
AgentMeter [candidate] (29.214 ms) : 0, 29214
GlobalTracer [baseline] (249.791 ms) : 0, 249791
GlobalTracer [candidate] (248.485 ms) : 0, 248485
AppSec [baseline] (32.145 ms) : 0, 32145
AppSec [candidate] (31.968 ms) : 0, 31968
Debugger [baseline] (60.153 ms) : 0, 60153
Debugger [candidate] (59.937 ms) : 0, 59937
Remote Config [baseline] (603.815 µs) : 0, 604
Remote Config [candidate] (588.705 µs) : 0, 589
Telemetry [baseline] (8.068 ms) : 0, 8068
Telemetry [candidate] (8.047 ms) : 0, 8047
Flare Poller [baseline] (5.156 ms) : 0, 5156
Flare Poller [candidate] (6.631 ms) : 0, 6631
section appsec
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.236 ms) : 0, 1236
BytebuddyAgent [baseline] (666.274 ms) : 0, 666274
BytebuddyAgent [candidate] (661.06 ms) : 0, 661060
AgentMeter [baseline] (12.043 ms) : 0, 12043
AgentMeter [candidate] (12.069 ms) : 0, 12069
GlobalTracer [baseline] (250.198 ms) : 0, 250198
GlobalTracer [candidate] (249.387 ms) : 0, 249387
IAST [baseline] (24.645 ms) : 0, 24645
IAST [candidate] (24.604 ms) : 0, 24604
AppSec [baseline] (185.406 ms) : 0, 185406
AppSec [candidate] (184.837 ms) : 0, 184837
Debugger [baseline] (66.719 ms) : 0, 66719
Debugger [candidate] (66.143 ms) : 0, 66143
Remote Config [baseline] (601.805 µs) : 0, 602
Remote Config [candidate] (624.526 µs) : 0, 625
Telemetry [baseline] (8.603 ms) : 0, 8603
Telemetry [candidate] (8.558 ms) : 0, 8558
Flare Poller [baseline] (3.584 ms) : 0, 3584
Flare Poller [candidate] (3.559 ms) : 0, 3559
section iast
crashtracking [baseline] (1.233 ms) : 0, 1233
crashtracking [candidate] (1.211 ms) : 0, 1211
BytebuddyAgent [baseline] (801.235 ms) : 0, 801235
BytebuddyAgent [candidate] (798.83 ms) : 0, 798830
AgentMeter [baseline] (11.353 ms) : 0, 11353
AgentMeter [candidate] (11.385 ms) : 0, 11385
GlobalTracer [baseline] (239.176 ms) : 0, 239176
GlobalTracer [candidate] (238.617 ms) : 0, 238617
IAST [baseline] (25.808 ms) : 0, 25808
IAST [candidate] (25.683 ms) : 0, 25683
AppSec [baseline] (29.434 ms) : 0, 29434
AppSec [candidate] (34.431 ms) : 0, 34431
Debugger [baseline] (63.543 ms) : 0, 63543
Debugger [candidate] (58.006 ms) : 0, 58006
Remote Config [baseline] (2.343 ms) : 0, 2343
Remote Config [candidate] (1.158 ms) : 0, 1158
Telemetry [baseline] (10.669 ms) : 0, 10669
Telemetry [candidate] (12.446 ms) : 0, 12446
Flare Poller [baseline] (3.452 ms) : 0, 3452
Flare Poller [candidate] (3.425 ms) : 0, 3425
section profiling
crashtracking [baseline] (1.177 ms) : 0, 1177
crashtracking [candidate] (1.177 ms) : 0, 1177
BytebuddyAgent [baseline] (690.831 ms) : 0, 690831
BytebuddyAgent [candidate] (693.19 ms) : 0, 693190
AgentMeter [baseline] (9.212 ms) : 0, 9212
AgentMeter [candidate] (9.161 ms) : 0, 9161
GlobalTracer [baseline] (206.827 ms) : 0, 206827
GlobalTracer [candidate] (208.632 ms) : 0, 208632
AppSec [baseline] (32.473 ms) : 0, 32473
AppSec [candidate] (32.816 ms) : 0, 32816
Debugger [baseline] (65.616 ms) : 0, 65616
Debugger [candidate] (66.331 ms) : 0, 66331
Remote Config [baseline] (570.754 µs) : 0, 571
Remote Config [candidate] (580.35 µs) : 0, 580
Telemetry [baseline] (7.856 ms) : 0, 7856
Telemetry [candidate] (7.795 ms) : 0, 7795
Flare Poller [baseline] (3.569 ms) : 0, 3569
Flare Poller [candidate] (3.549 ms) : 0, 3549
ProfilingAgent [baseline] (94.211 ms) : 0, 94211
ProfilingAgent [candidate] (94.112 ms) : 0, 94112
Profiling [baseline] (94.786 ms) : 0, 94786
Profiling [candidate] (94.686 ms) : 0, 94686
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/g2j-DDSpec
git_commit_date 1775589541 1775649363
git_commit_sha aa7c70f 9e0bebb
release_version 1.61.0-SNAPSHOT~aa7c70f2e7 1.61.0-SNAPSHOT~9e0bebb6dd
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1775652004 1775652004
ci_job_id 1576846409 1576846409
ci_pipeline_id 106622672 106622672
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-mx5fugko 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-mx5fugko 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 3 performance regressions! Performance is the same for 14 metrics, 17 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_FULL:high_load worse
[+153.297µs; +377.287µs] or [+2.932%; +7.215%]
unsure
[+73.579µs; +788.875µs] or [+0.585%; +6.268%]
unstable
[-113.882op/s; +43.195op/s] or [-14.499%; +5.499%]
5.494ms 13.018ms 750.094op/s 5.229ms 12.586ms 785.438op/s
scenario:load:petclinic:appsec:high_load worse
[+1.065ms; +2.232ms] or [+5.819%; +12.197%]
worse
[+1.406ms; +3.601ms] or [+4.757%; +12.185%]
unstable
[-45.860op/s; +8.673op/s] or [-18.340%; +3.468%]
19.951ms 32.056ms 231.469op/s 18.302ms 29.553ms 250.062op/s
scenario:load:petclinic:iast:high_load better
[-1.812ms; -0.938ms] or [-9.573%; -4.956%]
better
[-2.750ms; -1.400ms] or [-8.962%; -4.562%]
unstable
[-12.369op/s; +34.060op/s] or [-4.949%; +13.628%]
17.549ms 28.606ms 260.781op/s 18.924ms 30.681ms 249.935op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.243 ms) : 1231, 1255
.   : milestone, 1243,
iast (3.315 ms) : 3266, 3364
.   : milestone, 3315,
iast_FULL (5.886 ms) : 5827, 5946
.   : milestone, 5886,
iast_GLOBAL (3.758 ms) : 3695, 3822
.   : milestone, 3758,
profiling (2.184 ms) : 2165, 2203
.   : milestone, 2184,
tracing (1.91 ms) : 1892, 1928
.   : milestone, 1910,
section candidate
no_agent (1.25 ms) : 1237, 1262
.   : milestone, 1250,
iast (3.379 ms) : 3333, 3425
.   : milestone, 3379,
iast_FULL (6.167 ms) : 6104, 6231
.   : milestone, 6167,
iast_GLOBAL (3.7 ms) : 3639, 3762
.   : milestone, 3700,
profiling (2.362 ms) : 2339, 2385
.   : milestone, 2362,
tracing (1.943 ms) : 1926, 1961
.   : milestone, 1943,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.243 ms [1.231 ms, 1.255 ms] -
iast 3.315 ms [3.266 ms, 3.364 ms] 2.072 ms (166.7%)
iast_FULL 5.886 ms [5.827 ms, 5.946 ms] 4.643 ms (373.5%)
iast_GLOBAL 3.758 ms [3.695 ms, 3.822 ms] 2.515 ms (202.4%)
profiling 2.184 ms [2.165 ms, 2.203 ms] 940.632 µs (75.7%)
tracing 1.91 ms [1.892 ms, 1.928 ms] 666.609 µs (53.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.25 ms [1.237 ms, 1.262 ms] -
iast 3.379 ms [3.333 ms, 3.425 ms] 2.129 ms (170.4%)
iast_FULL 6.167 ms [6.104 ms, 6.231 ms] 4.917 ms (393.4%)
iast_GLOBAL 3.7 ms [3.639 ms, 3.762 ms] 2.45 ms (196.1%)
profiling 2.362 ms [2.339 ms, 2.385 ms] 1.112 ms (89.0%)
tracing 1.943 ms [1.926 ms, 1.961 ms] 693.538 µs (55.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.271 ms) : 18083, 18460
.   : milestone, 18271,
appsec (18.664 ms) : 18478, 18851
.   : milestone, 18664,
code_origins (18.091 ms) : 17911, 18272
.   : milestone, 18091,
iast (19.275 ms) : 19079, 19471
.   : milestone, 19275,
profiling (18.604 ms) : 18416, 18792
.   : milestone, 18604,
tracing (17.883 ms) : 17704, 18061
.   : milestone, 17883,
section candidate
no_agent (19.779 ms) : 19579, 19978
.   : milestone, 19779,
appsec (20.171 ms) : 19961, 20381
.   : milestone, 20171,
code_origins (17.853 ms) : 17678, 18029
.   : milestone, 17853,
iast (17.888 ms) : 17710, 18066
.   : milestone, 17888,
profiling (18.618 ms) : 18433, 18803
.   : milestone, 18618,
tracing (17.823 ms) : 17648, 17999
.   : milestone, 17823,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.271 ms [18.083 ms, 18.46 ms] -
appsec 18.664 ms [18.478 ms, 18.851 ms] 392.897 µs (2.2%)
code_origins 18.091 ms [17.911 ms, 18.272 ms] -179.998 µs (-1.0%)
iast 19.275 ms [19.079 ms, 19.471 ms] 1.004 ms (5.5%)
profiling 18.604 ms [18.416 ms, 18.792 ms] 332.513 µs (1.8%)
tracing 17.883 ms [17.704 ms, 18.061 ms] -388.564 µs (-2.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.779 ms [19.579 ms, 19.978 ms] -
appsec 20.171 ms [19.961 ms, 20.381 ms] 392.428 µs (2.0%)
code_origins 17.853 ms [17.678 ms, 18.029 ms] -1.925 ms (-9.7%)
iast 17.888 ms [17.71 ms, 18.066 ms] -1.891 ms (-9.6%)
profiling 18.618 ms [18.433 ms, 18.803 ms] -1.161 ms (-5.9%)
tracing 17.823 ms [17.648 ms, 17.999 ms] -1.955 ms (-9.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/g2j-DDSpec
git_commit_date 1775589541 1775649363
git_commit_sha aa7c70f 9e0bebb
release_version 1.61.0-SNAPSHOT~aa7c70f2e7 1.61.0-SNAPSHOT~9e0bebb6dd
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1775651765 1775651765
ci_job_id 1576846412 1576846412
ci_pipeline_id 106622672 106622672
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-bka95ef0 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-bka95ef0 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.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.747 s) : 14747000, 14747000
.   : milestone, 14747000,
appsec (15.041 s) : 15041000, 15041000
.   : milestone, 15041000,
iast (18.47 s) : 18470000, 18470000
.   : milestone, 18470000,
iast_GLOBAL (17.992 s) : 17992000, 17992000
.   : milestone, 17992000,
profiling (14.998 s) : 14998000, 14998000
.   : milestone, 14998000,
tracing (15.018 s) : 15018000, 15018000
.   : milestone, 15018000,
section candidate
no_agent (14.847 s) : 14847000, 14847000
.   : milestone, 14847000,
appsec (14.621 s) : 14621000, 14621000
.   : milestone, 14621000,
iast (18.318 s) : 18318000, 18318000
.   : milestone, 18318000,
iast_GLOBAL (18.278 s) : 18278000, 18278000
.   : milestone, 18278000,
profiling (14.719 s) : 14719000, 14719000
.   : milestone, 14719000,
tracing (14.959 s) : 14959000, 14959000
.   : milestone, 14959000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.747 s [14.747 s, 14.747 s] -
appsec 15.041 s [15.041 s, 15.041 s] 294.0 ms (2.0%)
iast 18.47 s [18.47 s, 18.47 s] 3.723 s (25.2%)
iast_GLOBAL 17.992 s [17.992 s, 17.992 s] 3.245 s (22.0%)
profiling 14.998 s [14.998 s, 14.998 s] 251.0 ms (1.7%)
tracing 15.018 s [15.018 s, 15.018 s] 271.0 ms (1.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.847 s [14.847 s, 14.847 s] -
appsec 14.621 s [14.621 s, 14.621 s] -226.0 ms (-1.5%)
iast 18.318 s [18.318 s, 18.318 s] 3.471 s (23.4%)
iast_GLOBAL 18.278 s [18.278 s, 18.278 s] 3.431 s (23.1%)
profiling 14.719 s [14.719 s, 14.719 s] -128.0 ms (-0.9%)
tracing 14.959 s [14.959 s, 14.959 s] 112.0 ms (0.8%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~9e0bebb6dd, baseline=1.61.0-SNAPSHOT~aa7c70f2e7
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.498 ms) : 1487, 1510
.   : milestone, 1498,
appsec (3.868 ms) : 3643, 4094
.   : milestone, 3868,
iast (2.288 ms) : 2219, 2358
.   : milestone, 2288,
iast_GLOBAL (2.329 ms) : 2259, 2399
.   : milestone, 2329,
profiling (2.102 ms) : 2047, 2157
.   : milestone, 2102,
tracing (2.096 ms) : 2043, 2150
.   : milestone, 2096,
section candidate
no_agent (1.497 ms) : 1485, 1508
.   : milestone, 1497,
appsec (3.845 ms) : 3622, 4067
.   : milestone, 3845,
iast (2.288 ms) : 2219, 2358
.   : milestone, 2288,
iast_GLOBAL (2.338 ms) : 2268, 2408
.   : milestone, 2338,
profiling (2.109 ms) : 2055, 2164
.   : milestone, 2109,
tracing (2.104 ms) : 2051, 2158
.   : milestone, 2104,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.498 ms [1.487 ms, 1.51 ms] -
appsec 3.868 ms [3.643 ms, 4.094 ms] 2.37 ms (158.1%)
iast 2.288 ms [2.219 ms, 2.358 ms] 789.992 µs (52.7%)
iast_GLOBAL 2.329 ms [2.259 ms, 2.399 ms] 830.47 µs (55.4%)
profiling 2.102 ms [2.047 ms, 2.157 ms] 603.744 µs (40.3%)
tracing 2.096 ms [2.043 ms, 2.15 ms] 597.947 µs (39.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.497 ms [1.485 ms, 1.508 ms] -
appsec 3.845 ms [3.622 ms, 4.067 ms] 2.348 ms (156.9%)
iast 2.288 ms [2.219 ms, 2.358 ms] 791.832 µs (52.9%)
iast_GLOBAL 2.338 ms [2.268 ms, 2.408 ms] 841.254 µs (56.2%)
profiling 2.109 ms [2.055 ms, 2.164 ms] 612.822 µs (40.9%)
tracing 2.104 ms [2.051 ms, 2.158 ms] 607.75 µs (40.6%)

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
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