Migrate dd-trace-core groovy files to java part 4 #11146
Migrate dd-trace-core groovy files to java part 4 #11146
Conversation
we migrate 3 tests: - CoreSpanBuilderTest - CoreTracerTest - DDSpanContextPropagationTagsTest
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 11 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055448
Total [baseline] (11.08 s) : 0, 11079503
Agent [candidate] (1.058 s) : 0, 1057681
Total [candidate] (11.1 s) : 0, 11100300
section appsec
Agent [baseline] (1.248 s) : 0, 1248325
Total [baseline] (11.248 s) : 0, 11248005
Agent [candidate] (1.261 s) : 0, 1260793
Total [candidate] (11.227 s) : 0, 11226521
section iast
Agent [baseline] (1.227 s) : 0, 1226672
Total [baseline] (11.343 s) : 0, 11343145
Agent [candidate] (1.223 s) : 0, 1223313
Total [candidate] (11.31 s) : 0, 11310438
section profiling
Agent [baseline] (1.193 s) : 0, 1193277
Total [baseline] (11.082 s) : 0, 11082452
Agent [candidate] (1.183 s) : 0, 1183499
Total [candidate] (11.216 s) : 0, 11215873
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (631.467 ms) : 0, 631467
BytebuddyAgent [candidate] (632.434 ms) : 0, 632434
AgentMeter [baseline] (29.388 ms) : 0, 29388
AgentMeter [candidate] (29.554 ms) : 0, 29554
GlobalTracer [baseline] (248.695 ms) : 0, 248695
GlobalTracer [candidate] (248.329 ms) : 0, 248329
AppSec [baseline] (32.267 ms) : 0, 32267
AppSec [candidate] (32.291 ms) : 0, 32291
Debugger [baseline] (60.029 ms) : 0, 60029
Debugger [candidate] (59.897 ms) : 0, 59897
Remote Config [baseline] (600.045 µs) : 0, 600
Remote Config [candidate] (586.953 µs) : 0, 587
Telemetry [baseline] (8.084 ms) : 0, 8084
Telemetry [candidate] (8.081 ms) : 0, 8081
Flare Poller [baseline] (7.475 ms) : 0, 7475
Flare Poller [candidate] (9.058 ms) : 0, 9058
section appsec
crashtracking [baseline] (1.245 ms) : 0, 1245
crashtracking [candidate] (1.221 ms) : 0, 1221
BytebuddyAgent [baseline] (661.859 ms) : 0, 661859
BytebuddyAgent [candidate] (664.839 ms) : 0, 664839
AgentMeter [baseline] (12.165 ms) : 0, 12165
AgentMeter [candidate] (12.284 ms) : 0, 12284
GlobalTracer [baseline] (248.745 ms) : 0, 248745
GlobalTracer [candidate] (253.157 ms) : 0, 253157
AppSec [baseline] (184.616 ms) : 0, 184616
AppSec [candidate] (187.96 ms) : 0, 187960
Debugger [baseline] (66.08 ms) : 0, 66080
Debugger [candidate] (66.897 ms) : 0, 66897
Remote Config [baseline] (609.926 µs) : 0, 610
Remote Config [candidate] (624.014 µs) : 0, 624
Telemetry [baseline] (8.374 ms) : 0, 8374
Telemetry [candidate] (8.555 ms) : 0, 8555
Flare Poller [baseline] (3.535 ms) : 0, 3535
Flare Poller [candidate] (3.62 ms) : 0, 3620
IAST [baseline] (24.612 ms) : 0, 24612
IAST [candidate] (25.004 ms) : 0, 25004
section iast
crashtracking [baseline] (1.221 ms) : 0, 1221
crashtracking [candidate] (1.23 ms) : 0, 1230
BytebuddyAgent [baseline] (802.996 ms) : 0, 802996
BytebuddyAgent [candidate] (800.26 ms) : 0, 800260
AgentMeter [baseline] (11.433 ms) : 0, 11433
AgentMeter [candidate] (11.363 ms) : 0, 11363
GlobalTracer [baseline] (239.638 ms) : 0, 239638
GlobalTracer [candidate] (238.545 ms) : 0, 238545
AppSec [baseline] (31.775 ms) : 0, 31775
AppSec [candidate] (31.982 ms) : 0, 31982
Debugger [baseline] (62.153 ms) : 0, 62153
Debugger [candidate] (59.938 ms) : 0, 59938
Remote Config [baseline] (557.9 µs) : 0, 558
Remote Config [candidate] (540.217 µs) : 0, 540
Telemetry [baseline] (11.414 ms) : 0, 11414
Telemetry [candidate] (13.099 ms) : 0, 13099
Flare Poller [baseline] (3.475 ms) : 0, 3475
Flare Poller [candidate] (3.509 ms) : 0, 3509
IAST [baseline] (25.822 ms) : 0, 25822
IAST [candidate] (26.557 ms) : 0, 26557
section profiling
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (696.759 ms) : 0, 696759
BytebuddyAgent [candidate] (690.655 ms) : 0, 690655
AgentMeter [baseline] (9.158 ms) : 0, 9158
AgentMeter [candidate] (9.072 ms) : 0, 9072
GlobalTracer [baseline] (208.237 ms) : 0, 208237
GlobalTracer [candidate] (207.17 ms) : 0, 207170
AppSec [baseline] (33.076 ms) : 0, 33076
AppSec [candidate] (32.678 ms) : 0, 32678
Debugger [baseline] (66.176 ms) : 0, 66176
Debugger [candidate] (65.192 ms) : 0, 65192
Remote Config [baseline] (589.751 µs) : 0, 590
Remote Config [candidate] (558.977 µs) : 0, 559
Telemetry [baseline] (7.93 ms) : 0, 7930
Telemetry [candidate] (7.782 ms) : 0, 7782
Flare Poller [baseline] (3.627 ms) : 0, 3627
Flare Poller [candidate] (3.525 ms) : 0, 3525
ProfilingAgent [baseline] (94.572 ms) : 0, 94572
ProfilingAgent [candidate] (94.317 ms) : 0, 94317
Profiling [baseline] (95.161 ms) : 0, 95161
Profiling [candidate] (94.891 ms) : 0, 94891
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056929
Total [baseline] (8.86 s) : 0, 8860112
Agent [candidate] (1.056 s) : 0, 1055870
Total [candidate] (8.847 s) : 0, 8846727
section iast
Agent [baseline] (1.231 s) : 0, 1231390
Total [baseline] (9.551 s) : 0, 9551415
Agent [candidate] (1.232 s) : 0, 1231654
Total [candidate] (9.607 s) : 0, 9606988
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.249 ms) : 0, 1249
crashtracking [candidate] (1.233 ms) : 0, 1233
BytebuddyAgent [baseline] (632.552 ms) : 0, 632552
BytebuddyAgent [candidate] (632.384 ms) : 0, 632384
AgentMeter [baseline] (29.339 ms) : 0, 29339
AgentMeter [candidate] (29.434 ms) : 0, 29434
GlobalTracer [baseline] (248.555 ms) : 0, 248555
GlobalTracer [candidate] (249.077 ms) : 0, 249077
AppSec [baseline] (32.322 ms) : 0, 32322
AppSec [candidate] (32.363 ms) : 0, 32363
Debugger [baseline] (58.918 ms) : 0, 58918
Debugger [candidate] (59.115 ms) : 0, 59115
Remote Config [baseline] (593.983 µs) : 0, 594
Remote Config [candidate] (591.784 µs) : 0, 592
Telemetry [baseline] (8.062 ms) : 0, 8062
Telemetry [candidate] (7.994 ms) : 0, 7994
Flare Poller [baseline] (9.074 ms) : 0, 9074
Flare Poller [candidate] (7.495 ms) : 0, 7495
section iast
crashtracking [baseline] (1.234 ms) : 0, 1234
crashtracking [candidate] (1.244 ms) : 0, 1244
BytebuddyAgent [baseline] (806.697 ms) : 0, 806697
BytebuddyAgent [candidate] (805.918 ms) : 0, 805918
AgentMeter [baseline] (11.609 ms) : 0, 11609
AgentMeter [candidate] (11.651 ms) : 0, 11651
GlobalTracer [baseline] (240.515 ms) : 0, 240515
GlobalTracer [candidate] (240.896 ms) : 0, 240896
AppSec [baseline] (32.008 ms) : 0, 32008
AppSec [candidate] (30.879 ms) : 0, 30879
Debugger [baseline] (59.985 ms) : 0, 59985
Debugger [candidate] (62.395 ms) : 0, 62395
Remote Config [baseline] (542.402 µs) : 0, 542
Remote Config [candidate] (531.652 µs) : 0, 532
Telemetry [baseline] (12.669 ms) : 0, 12669
Telemetry [candidate] (12.221 ms) : 0, 12221
Flare Poller [baseline] (3.508 ms) : 0, 3508
Flare Poller [candidate] (3.462 ms) : 0, 3462
IAST [baseline] (26.018 ms) : 0, 26018
IAST [candidate] (25.951 ms) : 0, 25951
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 2 performance regressions! Performance is the same for 14 metrics, 17 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section baseline
no_agent (1.255 ms) : 1243, 1268
. : milestone, 1255,
iast (3.437 ms) : 3389, 3486
. : milestone, 3437,
iast_FULL (6.022 ms) : 5961, 6083
. : milestone, 6022,
iast_GLOBAL (3.738 ms) : 3675, 3800
. : milestone, 3738,
profiling (2.227 ms) : 2206, 2247
. : milestone, 2227,
tracing (1.882 ms) : 1867, 1897
. : milestone, 1882,
section candidate
no_agent (1.236 ms) : 1224, 1248
. : milestone, 1236,
iast (3.22 ms) : 3178, 3263
. : milestone, 3220,
iast_FULL (6.133 ms) : 6070, 6196
. : milestone, 6133,
iast_GLOBAL (3.711 ms) : 3650, 3773
. : milestone, 3711,
profiling (2.151 ms) : 2131, 2170
. : milestone, 2151,
tracing (1.913 ms) : 1897, 1929
. : milestone, 1913,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section baseline
no_agent (18.071 ms) : 17885, 18258
. : milestone, 18071,
appsec (18.752 ms) : 18567, 18937
. : milestone, 18752,
code_origins (18.328 ms) : 18146, 18509
. : milestone, 18328,
iast (17.689 ms) : 17516, 17862
. : milestone, 17689,
profiling (18.495 ms) : 18312, 18679
. : milestone, 18495,
tracing (17.582 ms) : 17408, 17755
. : milestone, 17582,
section candidate
no_agent (18.255 ms) : 18068, 18443
. : milestone, 18255,
appsec (18.699 ms) : 18508, 18890
. : milestone, 18699,
code_origins (17.716 ms) : 17541, 17892
. : milestone, 17716,
iast (19.246 ms) : 19054, 19438
. : milestone, 19246,
profiling (18.555 ms) : 18370, 18740
. : milestone, 18555,
tracing (17.737 ms) : 17563, 17910
. : milestone, 17737,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section baseline
no_agent (1.489 ms) : 1478, 1501
. : milestone, 1489,
appsec (3.884 ms) : 3661, 4108
. : milestone, 3884,
iast (2.283 ms) : 2214, 2353
. : milestone, 2283,
iast_GLOBAL (2.33 ms) : 2260, 2400
. : milestone, 2330,
profiling (2.097 ms) : 2042, 2152
. : milestone, 2097,
tracing (2.092 ms) : 2038, 2146
. : milestone, 2092,
section candidate
no_agent (1.494 ms) : 1483, 1506
. : milestone, 1494,
appsec (3.854 ms) : 3632, 4077
. : milestone, 3854,
iast (2.278 ms) : 2209, 2348
. : milestone, 2278,
iast_GLOBAL (2.325 ms) : 2255, 2395
. : milestone, 2325,
profiling (2.103 ms) : 2048, 2157
. : milestone, 2103,
tracing (2.091 ms) : 2037, 2144
. : milestone, 2091,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~3ec47ca86e, baseline=1.62.0-SNAPSHOT~42f154d2f6
dateFormat X
axisFormat %s
section baseline
no_agent (14.965 s) : 14965000, 14965000
. : milestone, 14965000,
appsec (14.898 s) : 14898000, 14898000
. : milestone, 14898000,
iast (18.466 s) : 18466000, 18466000
. : milestone, 18466000,
iast_GLOBAL (18.179 s) : 18179000, 18179000
. : milestone, 18179000,
profiling (14.965 s) : 14965000, 14965000
. : milestone, 14965000,
tracing (14.779 s) : 14779000, 14779000
. : milestone, 14779000,
section candidate
no_agent (15.697 s) : 15697000, 15697000
. : milestone, 15697000,
appsec (14.849 s) : 14849000, 14849000
. : milestone, 14849000,
iast (18.348 s) : 18348000, 18348000
. : milestone, 18348000,
iast_GLOBAL (18.071 s) : 18071000, 18071000
. : milestone, 18071000,
profiling (15.02 s) : 15020000, 15020000
. : milestone, 15020000,
tracing (14.967 s) : 14967000, 14967000
. : milestone, 14967000,
|
we save the original instance before replaced by mock to restore it Some tests rely on having. the original, and depending on the order the class my keep the mocks instead resulting in errors
fcfc49d to
9bce9c0
Compare
AlexeyKuznetsov-DD
left a comment
There was a problem hiding this comment.
LGTM, left minor comments about style
| static Stream<Arguments> updateSpanPropagationTagsArguments() { | ||
| return Stream.of( | ||
| arguments( | ||
| "UNSET->USER_KEEP", | ||
| UNSET, | ||
| "_dd.p.usr=123", |
There was a problem hiding this comment.
This one unfortunately cannot be converted to TableTest, because UNSET is just a integer constant (and not enum)
and it will require to have a literal integer which is not very explicit
There was a problem hiding this comment.
There was a problem hiding this comment.
I can try but here the deal:
we have multiple constants like PrioritySampling and SamplingMechanism both are int and both are used in this test.
PrioritySampling is defined in dd-trace-api, so it would make sense to share across module in a dedicated type converter. But If I define one converter per constant type, TableTest complains that it cannot determine which converter to use to get the actual int.
So I need to create only one converter for int with all the different kinds of constant in one big type converter.
or create one dedicated for the test class (converter cannot be per test, only or the whole class)
WDYT?
There was a problem hiding this comment.
I do not have strong opinion here, but we are in state when we can experiment with various approaches and see how it goes. In this test I would start with local function so far and once we will notice other places we can move to some common place (if possible).
What Does This Do
we migrate 3 tests:
Motivation
this is part of the effort to migrate groovy tests to Java/JUnit
part1: #11053
part2: #11062
part3: #11085
Additional Notes
fix some still existing groovy tests regarding ServieNameCollector singleton. see commit
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.