Migrate dd-trace-core groovy files to java part 3#11085
Migrate dd-trace-core groovy files to java part 3#11085
Conversation
we migrate 3 small tests: - BlackholeSpanTest - LongRunningTracesTrackerTest - TraceCorrelationTest using new SpanConfigExtension for injecting config
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
| expired = 0; | ||
| } | ||
|
|
||
| // @VisibleForTesting |
There was a problem hiding this comment.
I'm wondering if we should import the real anno?
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1066199
Total [baseline] (8.861 s) : 0, 8861030
Agent [candidate] (1.06 s) : 0, 1060173
Total [candidate] (8.888 s) : 0, 8888426
section iast
Agent [baseline] (1.234 s) : 0, 1234155
Total [baseline] (9.584 s) : 0, 9584391
Agent [candidate] (1.227 s) : 0, 1226606
Total [candidate] (9.59 s) : 0, 9590300
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.25 ms) : 0, 1250
crashtracking [candidate] (1.229 ms) : 0, 1229
BytebuddyAgent [baseline] (637.272 ms) : 0, 637272
BytebuddyAgent [candidate] (633.4 ms) : 0, 633400
AgentMeter [baseline] (29.673 ms) : 0, 29673
AgentMeter [candidate] (29.473 ms) : 0, 29473
GlobalTracer [baseline] (250.267 ms) : 0, 250267
GlobalTracer [candidate] (249.718 ms) : 0, 249718
AppSec [baseline] (32.63 ms) : 0, 32630
AppSec [candidate] (32.159 ms) : 0, 32159
Debugger [baseline] (60.102 ms) : 0, 60102
Debugger [candidate] (59.406 ms) : 0, 59406
Remote Config [baseline] (606.759 µs) : 0, 607
Remote Config [candidate] (593.412 µs) : 0, 593
Telemetry [baseline] (8.229 ms) : 0, 8229
Telemetry [candidate] (8.118 ms) : 0, 8118
Flare Poller [baseline] (9.794 ms) : 0, 9794
Flare Poller [candidate] (9.848 ms) : 0, 9848
section iast
crashtracking [baseline] (1.245 ms) : 0, 1245
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (807.323 ms) : 0, 807323
BytebuddyAgent [candidate] (801.098 ms) : 0, 801098
AgentMeter [baseline] (11.607 ms) : 0, 11607
AgentMeter [candidate] (11.441 ms) : 0, 11441
GlobalTracer [baseline] (242.367 ms) : 0, 242367
GlobalTracer [candidate] (240.737 ms) : 0, 240737
AppSec [baseline] (30.372 ms) : 0, 30372
AppSec [candidate] (33.16 ms) : 0, 33160
Debugger [baseline] (59.739 ms) : 0, 59739
Debugger [candidate] (58.893 ms) : 0, 58893
Remote Config [baseline] (528.355 µs) : 0, 528
Remote Config [candidate] (1.112 ms) : 0, 1112
Telemetry [baseline] (14.197 ms) : 0, 14197
Telemetry [candidate] (13.14 ms) : 0, 13140
Flare Poller [baseline] (3.457 ms) : 0, 3457
Flare Poller [candidate] (3.556 ms) : 0, 3556
IAST [baseline] (26.901 ms) : 0, 26901
IAST [candidate] (25.993 ms) : 0, 25993
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.061 s) : 0, 1061108
Total [baseline] (11.096 s) : 0, 11096335
Agent [candidate] (1.058 s) : 0, 1057832
Total [candidate] (11.031 s) : 0, 11030960
section appsec
Agent [baseline] (1.25 s) : 0, 1249915
Total [baseline] (11.194 s) : 0, 11194402
Agent [candidate] (1.258 s) : 0, 1257659
Total [candidate] (11.171 s) : 0, 11170688
section iast
Agent [baseline] (1.231 s) : 0, 1231390
Total [baseline] (11.363 s) : 0, 11362714
Agent [candidate] (1.229 s) : 0, 1229242
Total [candidate] (11.42 s) : 0, 11419937
section profiling
Agent [baseline] (1.187 s) : 0, 1187377
Total [baseline] (11.1 s) : 0, 11099872
Agent [candidate] (1.185 s) : 0, 1184650
Total [candidate] (11.079 s) : 0, 11078775
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.236 ms) : 0, 1236
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (634.196 ms) : 0, 634196
BytebuddyAgent [candidate] (633.676 ms) : 0, 633676
AgentMeter [baseline] (29.429 ms) : 0, 29429
AgentMeter [candidate] (29.491 ms) : 0, 29491
GlobalTracer [baseline] (249.777 ms) : 0, 249777
GlobalTracer [candidate] (249.031 ms) : 0, 249031
AppSec [baseline] (32.186 ms) : 0, 32186
AppSec [candidate] (32.043 ms) : 0, 32043
Debugger [baseline] (60.212 ms) : 0, 60212
Debugger [candidate] (59.962 ms) : 0, 59962
Remote Config [baseline] (600.296 µs) : 0, 600
Remote Config [candidate] (592.537 µs) : 0, 593
Telemetry [baseline] (8.106 ms) : 0, 8106
Telemetry [candidate] (8.121 ms) : 0, 8121
Flare Poller [baseline] (9.126 ms) : 0, 9126
Flare Poller [candidate] (7.489 ms) : 0, 7489
section appsec
crashtracking [baseline] (1.219 ms) : 0, 1219
crashtracking [candidate] (1.235 ms) : 0, 1235
BytebuddyAgent [baseline] (662.496 ms) : 0, 662496
BytebuddyAgent [candidate] (666.932 ms) : 0, 666932
AgentMeter [baseline] (12.172 ms) : 0, 12172
AgentMeter [candidate] (12.179 ms) : 0, 12179
GlobalTracer [baseline] (249.71 ms) : 0, 249710
GlobalTracer [candidate] (251.308 ms) : 0, 251308
AppSec [baseline] (184.792 ms) : 0, 184792
AppSec [candidate] (185.545 ms) : 0, 185545
Debugger [baseline] (65.597 ms) : 0, 65597
Debugger [candidate] (66.385 ms) : 0, 66385
Remote Config [baseline] (605.862 µs) : 0, 606
Remote Config [candidate] (611.977 µs) : 0, 612
Telemetry [baseline] (8.588 ms) : 0, 8588
Telemetry [candidate] (8.628 ms) : 0, 8628
Flare Poller [baseline] (3.549 ms) : 0, 3549
Flare Poller [candidate] (3.527 ms) : 0, 3527
IAST [baseline] (24.68 ms) : 0, 24680
IAST [candidate] (24.785 ms) : 0, 24785
section iast
crashtracking [baseline] (1.24 ms) : 0, 1240
crashtracking [candidate] (1.223 ms) : 0, 1223
BytebuddyAgent [baseline] (806.841 ms) : 0, 806841
BytebuddyAgent [candidate] (802.592 ms) : 0, 802592
AgentMeter [baseline] (11.512 ms) : 0, 11512
AgentMeter [candidate] (11.434 ms) : 0, 11434
GlobalTracer [baseline] (240.699 ms) : 0, 240699
GlobalTracer [candidate] (240.822 ms) : 0, 240822
AppSec [baseline] (33.251 ms) : 0, 33251
AppSec [candidate] (30.58 ms) : 0, 30580
Debugger [baseline] (58.126 ms) : 0, 58126
Debugger [candidate] (61.304 ms) : 0, 61304
Remote Config [baseline] (526.264 µs) : 0, 526
Remote Config [candidate] (1.116 ms) : 0, 1116
Telemetry [baseline] (13.557 ms) : 0, 13557
Telemetry [candidate] (14.098 ms) : 0, 14098
Flare Poller [baseline] (3.421 ms) : 0, 3421
Flare Poller [candidate] (3.548 ms) : 0, 3548
IAST [baseline] (25.961 ms) : 0, 25961
IAST [candidate] (26.11 ms) : 0, 26110
section profiling
crashtracking [baseline] (1.181 ms) : 0, 1181
crashtracking [candidate] (1.19 ms) : 0, 1190
BytebuddyAgent [baseline] (693.58 ms) : 0, 693580
BytebuddyAgent [candidate] (691.851 ms) : 0, 691851
AgentMeter [baseline] (9.09 ms) : 0, 9090
AgentMeter [candidate] (9.115 ms) : 0, 9115
GlobalTracer [baseline] (207.655 ms) : 0, 207655
GlobalTracer [candidate] (207.275 ms) : 0, 207275
AppSec [baseline] (32.557 ms) : 0, 32557
AppSec [candidate] (32.414 ms) : 0, 32414
Debugger [baseline] (65.817 ms) : 0, 65817
Debugger [candidate] (65.532 ms) : 0, 65532
Remote Config [baseline] (578.732 µs) : 0, 579
Remote Config [candidate] (562.811 µs) : 0, 563
Telemetry [baseline] (7.84 ms) : 0, 7840
Telemetry [candidate] (7.789 ms) : 0, 7789
Flare Poller [baseline] (3.527 ms) : 0, 3527
Flare Poller [candidate] (3.593 ms) : 0, 3593
ProfilingAgent [baseline] (94.103 ms) : 0, 94103
ProfilingAgent [candidate] (93.883 ms) : 0, 93883
Profiling [baseline] (94.668 ms) : 0, 94668
Profiling [candidate] (94.454 ms) : 0, 94454
LoadParameters
See matching parameters
SummaryFound 4 performance improvements and 2 performance regressions! Performance is the same for 15 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (17.975 ms) : 17795, 18155
. : milestone, 17975,
appsec (19.686 ms) : 19486, 19886
. : milestone, 19686,
code_origins (17.875 ms) : 17702, 18048
. : milestone, 17875,
iast (17.874 ms) : 17697, 18051
. : milestone, 17874,
profiling (19.176 ms) : 18983, 19369
. : milestone, 19176,
tracing (17.938 ms) : 17763, 18113
. : milestone, 17938,
section candidate
no_agent (18.056 ms) : 17878, 18234
. : milestone, 18056,
appsec (18.416 ms) : 18232, 18599
. : milestone, 18416,
code_origins (18.847 ms) : 18659, 19035
. : milestone, 18847,
iast (17.754 ms) : 17581, 17928
. : milestone, 17754,
profiling (18.286 ms) : 18102, 18470
. : milestone, 18286,
tracing (17.657 ms) : 17486, 17828
. : milestone, 17657,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (1.241 ms) : 1229, 1252
. : milestone, 1241,
iast (3.319 ms) : 3273, 3365
. : milestone, 3319,
iast_FULL (5.929 ms) : 5870, 5988
. : milestone, 5929,
iast_GLOBAL (3.658 ms) : 3602, 3713
. : milestone, 3658,
profiling (2.271 ms) : 2248, 2295
. : milestone, 2271,
tracing (2.096 ms) : 2078, 2115
. : milestone, 2096,
section candidate
no_agent (1.264 ms) : 1252, 1276
. : milestone, 1264,
iast (3.365 ms) : 3319, 3410
. : milestone, 3365,
iast_FULL (6.076 ms) : 6014, 6138
. : milestone, 6076,
iast_GLOBAL (3.636 ms) : 3576, 3697
. : milestone, 3636,
profiling (2.15 ms) : 2131, 2168
. : milestone, 2150,
tracing (1.901 ms) : 1885, 1917
. : milestone, 1901,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (15.474 s) : 15474000, 15474000
. : milestone, 15474000,
appsec (14.98 s) : 14980000, 14980000
. : milestone, 14980000,
iast (18.031 s) : 18031000, 18031000
. : milestone, 18031000,
iast_GLOBAL (18.025 s) : 18025000, 18025000
. : milestone, 18025000,
profiling (15.356 s) : 15356000, 15356000
. : milestone, 15356000,
tracing (15.047 s) : 15047000, 15047000
. : milestone, 15047000,
section candidate
no_agent (15.201 s) : 15201000, 15201000
. : milestone, 15201000,
appsec (14.966 s) : 14966000, 14966000
. : milestone, 14966000,
iast (18.556 s) : 18556000, 18556000
. : milestone, 18556000,
iast_GLOBAL (17.929 s) : 17929000, 17929000
. : milestone, 17929000,
profiling (14.744 s) : 14744000, 14744000
. : milestone, 14744000,
tracing (15.066 s) : 15066000, 15066000
. : milestone, 15066000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~9083f79f07, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (1.489 ms) : 1478, 1501
. : milestone, 1489,
appsec (3.838 ms) : 3615, 4062
. : milestone, 3838,
iast (2.276 ms) : 2207, 2345
. : milestone, 2276,
iast_GLOBAL (2.322 ms) : 2253, 2391
. : milestone, 2322,
profiling (2.107 ms) : 2052, 2162
. : milestone, 2107,
tracing (2.084 ms) : 2030, 2138
. : milestone, 2084,
section candidate
no_agent (1.49 ms) : 1479, 1502
. : milestone, 1490,
appsec (3.859 ms) : 3637, 4081
. : milestone, 3859,
iast (2.274 ms) : 2205, 2343
. : milestone, 2274,
iast_GLOBAL (2.321 ms) : 2251, 2391
. : milestone, 2321,
profiling (2.098 ms) : 2043, 2153
. : milestone, 2098,
tracing (2.082 ms) : 2029, 2135
. : milestone, 2082,
|
bric3
left a comment
There was a problem hiding this comment.
I believe the configuration code is misusing WithConfigExtension.
| "128 bit traceid logging disabled | false " | ||
| }) | ||
| void shouldMuteTracing(String moreBits) throws Exception { | ||
| WithConfigExtension.injectSysConfig("trace.128.bit.traceid.logging.enabled", moreBits); |
There was a problem hiding this comment.
issue: Shouldn't it have used WithConfig annotation, from #11076
Also, the skill should probably updated to use prefer WithConfig over WithConfigExtension.injectSysConfig
There was a problem hiding this comment.
Can you have an annotation based on parameter value of the method? I doubt it
| WithConfigExtension.injectSysConfig("trace.experimental.long-running.enabled", "true"); | ||
| WithConfigExtension.injectSysConfig( | ||
| "trace.experimental.long-running.initial.flush.interval", "10"); | ||
| WithConfigExtension.injectSysConfig("trace.experimental.long-running.flush.interval", "20"); |
There was a problem hiding this comment.
right those can be replaced with annotations
There was a problem hiding this comment.
but is it working on @BeforeEach setup method?

What Does This Do
we migrate 3 small tests:
Motivation
this is part of the effort to migrate groovy tests to Java/JUnit
part1: #11053
part2: #11062
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels 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.