-
Notifications
You must be signed in to change notification settings - Fork 312
Refactored AssertJ
, Hamcrest
and Google.Truth
to Junit5.Assertions
.
#9556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067465
Total [baseline] (8.697 s) : 0, 8696910
Agent [candidate] (1.063 s) : 0, 1063061
Total [candidate] (8.599 s) : 0, 8598744
section iast
Agent [baseline] (1.189 s) : 0, 1189159
Total [baseline] (9.279 s) : 0, 9278674
Agent [candidate] (1.2 s) : 0, 1199696
Total [candidate] (9.342 s) : 0, 9342115
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.469 ms) : 0, 1469
crashtracking [candidate] (1.474 ms) : 0, 1474
BytebuddyAgent [baseline] (737.419 ms) : 0, 737419
BytebuddyAgent [candidate] (734.55 ms) : 0, 734550
GlobalTracer [baseline] (253.777 ms) : 0, 253777
GlobalTracer [candidate] (252.952 ms) : 0, 252952
AppSec [baseline] (30.881 ms) : 0, 30881
AppSec [candidate] (30.515 ms) : 0, 30515
Debugger [baseline] (6.444 ms) : 0, 6444
Debugger [candidate] (6.414 ms) : 0, 6414
Remote Config [baseline] (706.324 µs) : 0, 706
Remote Config [candidate] (690.727 µs) : 0, 691
Telemetry [baseline] (15.652 ms) : 0, 15652
Telemetry [candidate] (15.538 ms) : 0, 15538
section iast
crashtracking [baseline] (1.45 ms) : 0, 1450
crashtracking [candidate] (1.498 ms) : 0, 1498
BytebuddyAgent [baseline] (852.033 ms) : 0, 852033
BytebuddyAgent [candidate] (859.46 ms) : 0, 859460
GlobalTracer [baseline] (245.508 ms) : 0, 245508
GlobalTracer [candidate] (246.068 ms) : 0, 246068
AppSec [baseline] (24.367 ms) : 0, 24367
AppSec [candidate] (28.207 ms) : 0, 28207
Debugger [baseline] (6.016 ms) : 0, 6016
Debugger [candidate] (6.063 ms) : 0, 6063
Remote Config [baseline] (582.359 µs) : 0, 582
Remote Config [candidate] (605.792 µs) : 0, 606
Telemetry [baseline] (8.031 ms) : 0, 8031
Telemetry [candidate] (8.274 ms) : 0, 8274
IAST [baseline] (30.231 ms) : 0, 30231
IAST [candidate] (28.497 ms) : 0, 28497
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.065 s) : 0, 1065299
Total [baseline] (10.789 s) : 0, 10788526
Agent [candidate] (1.071 s) : 0, 1071496
Total [candidate] (10.754 s) : 0, 10754148
section appsec
Agent [baseline] (1.249 s) : 0, 1249472
Total [baseline] (11.069 s) : 0, 11068572
Agent [candidate] (1.242 s) : 0, 1242485
Total [candidate] (11.031 s) : 0, 11030771
section iast
Agent [baseline] (1.209 s) : 0, 1208821
Total [baseline] (11.154 s) : 0, 11154482
Agent [candidate] (1.195 s) : 0, 1194530
Total [candidate] (11.034 s) : 0, 11034350
section profiling
Agent [baseline] (1.214 s) : 0, 1214444
Total [baseline] (10.957 s) : 0, 10956920
Agent [candidate] (1.212 s) : 0, 1212039
Total [candidate] (10.883 s) : 0, 10882777
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (734.937 ms) : 0, 734937
BytebuddyAgent [candidate] (739.906 ms) : 0, 739906
GlobalTracer [baseline] (253.571 ms) : 0, 253571
GlobalTracer [candidate] (254.374 ms) : 0, 254374
AppSec [baseline] (30.787 ms) : 0, 30787
AppSec [candidate] (30.971 ms) : 0, 30971
Debugger [baseline] (6.452 ms) : 0, 6452
Debugger [candidate] (6.477 ms) : 0, 6477
Remote Config [baseline] (695.313 µs) : 0, 695
Remote Config [candidate] (694.707 µs) : 0, 695
Telemetry [baseline] (16.328 ms) : 0, 16328
Telemetry [candidate] (16.41 ms) : 0, 16410
section appsec
crashtracking [baseline] (1.486 ms) : 0, 1486
crashtracking [candidate] (1.475 ms) : 0, 1475
BytebuddyAgent [baseline] (766.58 ms) : 0, 766580
BytebuddyAgent [candidate] (761.853 ms) : 0, 761853
GlobalTracer [baseline] (248.627 ms) : 0, 248627
GlobalTracer [candidate] (247.317 ms) : 0, 247317
IAST [baseline] (24.108 ms) : 0, 24108
IAST [candidate] (23.963 ms) : 0, 23963
AppSec [baseline] (172.076 ms) : 0, 172076
AppSec [candidate] (171.44 ms) : 0, 171440
Debugger [baseline] (6.066 ms) : 0, 6066
Debugger [candidate] (6.065 ms) : 0, 6065
Remote Config [baseline] (637.376 µs) : 0, 637
Remote Config [candidate] (619.166 µs) : 0, 619
Telemetry [baseline] (8.601 ms) : 0, 8601
Telemetry [candidate] (8.456 ms) : 0, 8456
section iast
crashtracking [baseline] (1.482 ms) : 0, 1482
crashtracking [candidate] (1.448 ms) : 0, 1448
BytebuddyAgent [baseline] (866.916 ms) : 0, 866916
BytebuddyAgent [candidate] (854.478 ms) : 0, 854478
GlobalTracer [baseline] (247.033 ms) : 0, 247033
GlobalTracer [candidate] (247.718 ms) : 0, 247718
IAST [baseline] (30.824 ms) : 0, 30824
IAST [candidate] (28.326 ms) : 0, 28326
AppSec [baseline] (26.41 ms) : 0, 26410
AppSec [candidate] (26.622 ms) : 0, 26622
Debugger [baseline] (6.144 ms) : 0, 6144
Debugger [candidate] (6.132 ms) : 0, 6132
Remote Config [baseline] (603.199 µs) : 0, 603
Remote Config [candidate] (614.039 µs) : 0, 614
Telemetry [baseline] (8.257 ms) : 0, 8257
Telemetry [candidate] (8.198 ms) : 0, 8198
section profiling
crashtracking [baseline] (1.446 ms) : 0, 1446
crashtracking [candidate] (1.435 ms) : 0, 1435
BytebuddyAgent [baseline] (764.278 ms) : 0, 764278
BytebuddyAgent [candidate] (763.317 ms) : 0, 763317
GlobalTracer [baseline] (233.659 ms) : 0, 233659
GlobalTracer [candidate] (232.796 ms) : 0, 232796
AppSec [baseline] (30.669 ms) : 0, 30669
AppSec [candidate] (30.524 ms) : 0, 30524
Debugger [baseline] (12.99 ms) : 0, 12990
Debugger [candidate] (12.816 ms) : 0, 12816
Remote Config [baseline] (1.548 ms) : 0, 1548
Remote Config [candidate] (1.485 ms) : 0, 1485
Telemetry [baseline] (9.436 ms) : 0, 9436
Telemetry [candidate] (9.314 ms) : 0, 9314
ProfilingAgent [baseline] (109.177 ms) : 0, 109177
ProfilingAgent [candidate] (109.117 ms) : 0, 109117
Profiling [baseline] (109.815 ms) : 0, 109815
Profiling [candidate] (109.769 ms) : 0, 109769
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 3 performance regressions! Performance is the same for 7 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section baseline
no_agent (4.401 ms) : 4345, 4456
. : milestone, 4401,
iast (9.406 ms) : 9249, 9562
. : milestone, 9406,
iast_FULL (14.336 ms) : 14053, 14619
. : milestone, 14336,
iast_GLOBAL (10.881 ms) : 10684, 11078
. : milestone, 10881,
profiling (8.913 ms) : 8774, 9051
. : milestone, 8913,
tracing (7.709 ms) : 7600, 7817
. : milestone, 7709,
section candidate
no_agent (4.499 ms) : 4448, 4551
. : milestone, 4499,
iast (9.341 ms) : 9189, 9492
. : milestone, 9341,
iast_FULL (14.537 ms) : 14247, 14827
. : milestone, 14537,
iast_GLOBAL (10.553 ms) : 10368, 10738
. : milestone, 10553,
profiling (8.987 ms) : 8837, 9138
. : milestone, 8987,
tracing (8.122 ms) : 8004, 8241
. : milestone, 8122,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section baseline
no_agent (37.072 ms) : 36763, 37380
. : milestone, 37072,
appsec (48.15 ms) : 47726, 48574
. : milestone, 48150,
code_origins (46.448 ms) : 46035, 46862
. : milestone, 46448,
iast (44.225 ms) : 43840, 44611
. : milestone, 44225,
profiling (47.542 ms) : 47083, 48001
. : milestone, 47542,
tracing (43.741 ms) : 43362, 44120
. : milestone, 43741,
section candidate
no_agent (37.436 ms) : 37134, 37738
. : milestone, 37436,
appsec (48.398 ms) : 47967, 48830
. : milestone, 48398,
code_origins (43.8 ms) : 43420, 44179
. : milestone, 43800,
iast (45.944 ms) : 45557, 46332
. : milestone, 45944,
profiling (49.009 ms) : 48558, 49461
. : milestone, 49009,
tracing (42.057 ms) : 41695, 42419
. : milestone, 42057,
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.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section baseline
no_agent (14.783 s) : 14783000, 14783000
. : milestone, 14783000,
appsec (14.916 s) : 14916000, 14916000
. : milestone, 14916000,
iast (18.58 s) : 18580000, 18580000
. : milestone, 18580000,
iast_GLOBAL (18.181 s) : 18181000, 18181000
. : milestone, 18181000,
profiling (15.425 s) : 15425000, 15425000
. : milestone, 15425000,
tracing (14.959 s) : 14959000, 14959000
. : milestone, 14959000,
section candidate
no_agent (15.007 s) : 15007000, 15007000
. : milestone, 15007000,
appsec (14.762 s) : 14762000, 14762000
. : milestone, 14762000,
iast (18.407 s) : 18407000, 18407000
. : milestone, 18407000,
iast_GLOBAL (17.875 s) : 17875000, 17875000
. : milestone, 17875000,
profiling (15.514 s) : 15514000, 15514000
. : milestone, 15514000,
tracing (14.845 s) : 14845000, 14845000
. : milestone, 14845000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~3551d2500e, baseline=1.54.0-SNAPSHOT~1052f4935d
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (3.702 ms) : 3486, 3918
. : milestone, 3702,
iast (2.195 ms) : 2133, 2258
. : milestone, 2195,
iast_GLOBAL (2.238 ms) : 2175, 2301
. : milestone, 2238,
profiling (2.044 ms) : 1994, 2095
. : milestone, 2044,
tracing (2.027 ms) : 1978, 2077
. : milestone, 2027,
section candidate
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (3.705 ms) : 3487, 3922
. : milestone, 3705,
iast (2.194 ms) : 2132, 2257
. : milestone, 2194,
iast_GLOBAL (2.25 ms) : 2186, 2314
. : milestone, 2250,
profiling (2.048 ms) : 1997, 2099
. : milestone, 2048,
tracing (2.027 ms) : 1978, 2076
. : milestone, 2027,
|
🎯 Code Coverage 🔗 Commit SHA: 3551d25 | Docs | Was this helpful? Give us feedback! |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting changes! Thanks for cleaning up the code base 🤝
(commenting only as it's still a draft)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an opinion, but I don't see the value to remove AssertJ assertions. This library is generally better equiped than Junit (Jupiter) assertions, and it very readable.
I cannot speak for google truth, but this seems a bit redundant wih AssertJ.
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Outdated
Show resolved
Hide resolved
utils/test-utils/src/main/java/datadog/trace/test/util/AssertionsUtils.java
Show resolved
Hide resolved
Yep, just added to PR description my motivation and |
Probably yes, maybe I will get rid only of |
My 2cts would be to convert the Junit one to assertj. While that's no small task, I believe there are some automated tools for that. |
AssertJ
and Google.Truth
to Junit5.Assertions
.AssertJ
, Hamcrest
and Google.Truth
to Junit5.Assertions
.
...ntation/maven-3.2.1/src/test/groovy/datadog/trace/instrumentation/maven3/MavenUtilsTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for cleaning this up!
telemetry/src/test/java/datadog/telemetry/dependency/DependencyServiceTests.java
Show resolved
Hide resolved
...ntation/maven-3.2.1/src/test/groovy/datadog/trace/instrumentation/maven3/MavenUtilsTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
What Does This Do
Refactors test assertions from
AssertJ
,Hamcrest
andGoogle.Truth
toJUnit5.Assertions
.Motivation
Nearly all tests already use
JUnit5
orSpock
assertions.Only a handful of classes relied on
AssertJ
,Hamcrest
andGoogle.Truth
.Consolidating on fewer assertion libraries simplifies the codebase and reduces maintenance overhead.
For context:
JUnit5
assertions are used in 5,000+ places, while others combined appear in fewer than 150-200.Pros & Cons
Pros
JUnit5
is required regardless.JUnit5
.Cons
JUnit5
assertions are less feature-rich thanAssertJ
.Additional Notes
AssertJ
remains as a runtime-only dependency forkafka-clients-0.11
tests, where it is still required.