Improve instrumentation JUnit testing #11096
Open
PerfectSlayer wants to merge 4 commits intobbujon/groovy-to-java-configfrom
Open
Improve instrumentation JUnit testing #11096PerfectSlayer wants to merge 4 commits intobbujon/groovy-to-java-configfrom
PerfectSlayer wants to merge 4 commits intobbujon/groovy-to-java-configfrom
Conversation
Fix tracer initialization from per method to per class to match Spock setupSpec() / cleanUpSpec()
This was referenced Apr 13, 2026
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1067860
Total [baseline] (8.856 s) : 0, 8855880
Agent [candidate] (1.056 s) : 0, 1055949
Total [candidate] (8.85 s) : 0, 8850239
section iast
Agent [baseline] (1.222 s) : 0, 1222300
Total [baseline] (9.535 s) : 0, 9534713
Agent [candidate] (1.239 s) : 0, 1238614
Total [candidate] (9.563 s) : 0, 9562751
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.251 ms) : 0, 1251
crashtracking [candidate] (1.235 ms) : 0, 1235
BytebuddyAgent [baseline] (638.411 ms) : 0, 638411
BytebuddyAgent [candidate] (632.643 ms) : 0, 632643
AgentMeter [baseline] (29.78 ms) : 0, 29780
AgentMeter [candidate] (29.5 ms) : 0, 29500
GlobalTracer [baseline] (251.137 ms) : 0, 251137
GlobalTracer [candidate] (249.258 ms) : 0, 249258
AppSec [baseline] (32.389 ms) : 0, 32389
AppSec [candidate] (32.01 ms) : 0, 32010
Debugger [baseline] (59.778 ms) : 0, 59778
Debugger [candidate] (59.117 ms) : 0, 59117
Remote Config [baseline] (605.292 µs) : 0, 605
Remote Config [candidate] (610.655 µs) : 0, 611
Telemetry [baseline] (8.202 ms) : 0, 8202
Telemetry [candidate] (8.019 ms) : 0, 8019
Flare Poller [baseline] (9.773 ms) : 0, 9773
Flare Poller [candidate] (7.327 ms) : 0, 7327
section iast
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.249 ms) : 0, 1249
BytebuddyAgent [baseline] (800.163 ms) : 0, 800163
BytebuddyAgent [candidate] (811.194 ms) : 0, 811194
AgentMeter [baseline] (11.417 ms) : 0, 11417
AgentMeter [candidate] (11.682 ms) : 0, 11682
GlobalTracer [baseline] (238.77 ms) : 0, 238770
GlobalTracer [candidate] (242.448 ms) : 0, 242448
IAST [baseline] (25.875 ms) : 0, 25875
IAST [candidate] (26.205 ms) : 0, 26205
AppSec [baseline] (33.425 ms) : 0, 33425
AppSec [candidate] (33.794 ms) : 0, 33794
Debugger [baseline] (57.599 ms) : 0, 57599
Debugger [candidate] (57.175 ms) : 0, 57175
Remote Config [baseline] (556.292 µs) : 0, 556
Remote Config [candidate] (531.064 µs) : 0, 531
Telemetry [baseline] (13.032 ms) : 0, 13032
Telemetry [candidate] (13.94 ms) : 0, 13940
Flare Poller [baseline] (3.648 ms) : 0, 3648
Flare Poller [candidate] (3.512 ms) : 0, 3512
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055470
Total [baseline] (11.04 s) : 0, 11040341
Agent [candidate] (1.057 s) : 0, 1056527
Total [candidate] (11.162 s) : 0, 11161972
section appsec
Agent [baseline] (1.256 s) : 0, 1256356
Total [baseline] (11.053 s) : 0, 11053340
Agent [candidate] (1.251 s) : 0, 1251190
Total [candidate] (11.098 s) : 0, 11098281
section iast
Agent [baseline] (1.242 s) : 0, 1242418
Total [baseline] (11.245 s) : 0, 11244737
Agent [candidate] (1.228 s) : 0, 1227675
Total [candidate] (11.331 s) : 0, 11331388
section profiling
Agent [baseline] (1.199 s) : 0, 1198559
Total [baseline] (11.195 s) : 0, 11194929
Agent [candidate] (1.185 s) : 0, 1185371
Total [candidate] (11.128 s) : 0, 11127807
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.233 ms) : 0, 1233
crashtracking [candidate] (1.229 ms) : 0, 1229
BytebuddyAgent [baseline] (631.906 ms) : 0, 631906
BytebuddyAgent [candidate] (633.269 ms) : 0, 633269
AgentMeter [baseline] (29.443 ms) : 0, 29443
AgentMeter [candidate] (29.46 ms) : 0, 29460
GlobalTracer [baseline] (248.343 ms) : 0, 248343
GlobalTracer [candidate] (249.349 ms) : 0, 249349
AppSec [baseline] (32.025 ms) : 0, 32025
AppSec [candidate] (31.937 ms) : 0, 31937
Debugger [baseline] (60.053 ms) : 0, 60053
Debugger [candidate] (59.736 ms) : 0, 59736
Remote Config [baseline] (600.379 µs) : 0, 600
Remote Config [candidate] (595.569 µs) : 0, 596
Telemetry [baseline] (8.118 ms) : 0, 8118
Telemetry [candidate] (8.098 ms) : 0, 8098
Flare Poller [baseline] (7.615 ms) : 0, 7615
Flare Poller [candidate] (6.696 ms) : 0, 6696
section appsec
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.217 ms) : 0, 1217
BytebuddyAgent [baseline] (665.792 ms) : 0, 665792
BytebuddyAgent [candidate] (663.906 ms) : 0, 663906
AgentMeter [baseline] (12.165 ms) : 0, 12165
AgentMeter [candidate] (12.111 ms) : 0, 12111
GlobalTracer [baseline] (250.842 ms) : 0, 250842
GlobalTracer [candidate] (249.914 ms) : 0, 249914
IAST [baseline] (24.749 ms) : 0, 24749
IAST [candidate] (24.524 ms) : 0, 24524
AppSec [baseline] (185.932 ms) : 0, 185932
AppSec [candidate] (184.651 ms) : 0, 184651
Debugger [baseline] (66.229 ms) : 0, 66229
Debugger [candidate] (65.772 ms) : 0, 65772
Remote Config [baseline] (608.898 µs) : 0, 609
Remote Config [candidate] (603.964 µs) : 0, 604
Telemetry [baseline] (8.639 ms) : 0, 8639
Telemetry [candidate] (8.423 ms) : 0, 8423
Flare Poller [baseline] (3.545 ms) : 0, 3545
Flare Poller [candidate] (3.521 ms) : 0, 3521
section iast
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.229 ms) : 0, 1229
BytebuddyAgent [baseline] (816.585 ms) : 0, 816585
BytebuddyAgent [candidate] (803.487 ms) : 0, 803487
AgentMeter [baseline] (11.8 ms) : 0, 11800
AgentMeter [candidate] (11.394 ms) : 0, 11394
GlobalTracer [baseline] (240.765 ms) : 0, 240765
GlobalTracer [candidate] (240.185 ms) : 0, 240185
IAST [baseline] (26.014 ms) : 0, 26014
IAST [candidate] (25.832 ms) : 0, 25832
AppSec [baseline] (31.954 ms) : 0, 31954
AppSec [candidate] (31.711 ms) : 0, 31711
Debugger [baseline] (62.324 ms) : 0, 62324
Debugger [candidate] (60.333 ms) : 0, 60333
Remote Config [baseline] (532.543 µs) : 0, 533
Remote Config [candidate] (536.056 µs) : 0, 536
Telemetry [baseline] (10.924 ms) : 0, 10924
Telemetry [candidate] (13.148 ms) : 0, 13148
Flare Poller [baseline] (3.619 ms) : 0, 3619
Flare Poller [candidate] (3.459 ms) : 0, 3459
section profiling
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (696.971 ms) : 0, 696971
BytebuddyAgent [candidate] (691.234 ms) : 0, 691234
AgentMeter [baseline] (9.229 ms) : 0, 9229
AgentMeter [candidate] (9.209 ms) : 0, 9209
GlobalTracer [baseline] (210.575 ms) : 0, 210575
GlobalTracer [candidate] (207.506 ms) : 0, 207506
AppSec [baseline] (33.197 ms) : 0, 33197
AppSec [candidate] (32.678 ms) : 0, 32678
Debugger [baseline] (66.987 ms) : 0, 66987
Debugger [candidate] (65.63 ms) : 0, 65630
Remote Config [baseline] (583.046 µs) : 0, 583
Remote Config [candidate] (564.048 µs) : 0, 564
Telemetry [baseline] (8.096 ms) : 0, 8096
Telemetry [candidate] (7.846 ms) : 0, 7846
Flare Poller [baseline] (3.661 ms) : 0, 3661
Flare Poller [candidate] (3.605 ms) : 0, 3605
ProfilingAgent [baseline] (96.173 ms) : 0, 96173
ProfilingAgent [candidate] (94.543 ms) : 0, 94543
Profiling [baseline] (96.766 ms) : 0, 96766
Profiling [candidate] (95.115 ms) : 0, 95115
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 16 metrics, 19 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (19.683 ms) : 19481, 19885
. : milestone, 19683,
appsec (20.098 ms) : 19895, 20300
. : milestone, 20098,
code_origins (18.102 ms) : 17926, 18278
. : milestone, 18102,
iast (18.008 ms) : 17830, 18185
. : milestone, 18008,
profiling (18.207 ms) : 18024, 18390
. : milestone, 18207,
tracing (18.137 ms) : 17959, 18315
. : milestone, 18137,
section candidate
no_agent (19.435 ms) : 19237, 19633
. : milestone, 19435,
appsec (18.927 ms) : 18734, 19120
. : milestone, 18927,
code_origins (18.037 ms) : 17856, 18217
. : milestone, 18037,
iast (18.162 ms) : 17981, 18343
. : milestone, 18162,
profiling (18.503 ms) : 18320, 18687
. : milestone, 18503,
tracing (18.006 ms) : 17829, 18183
. : milestone, 18006,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (1.233 ms) : 1222, 1245
. : milestone, 1233,
iast (3.285 ms) : 3244, 3327
. : milestone, 3285,
iast_FULL (6.185 ms) : 6121, 6248
. : milestone, 6185,
iast_GLOBAL (3.646 ms) : 3582, 3709
. : milestone, 3646,
profiling (2.25 ms) : 2229, 2272
. : milestone, 2250,
tracing (1.992 ms) : 1974, 2009
. : milestone, 1992,
section candidate
no_agent (1.319 ms) : 1303, 1334
. : milestone, 1319,
iast (3.256 ms) : 3216, 3297
. : milestone, 3256,
iast_FULL (6.042 ms) : 5981, 6104
. : milestone, 6042,
iast_GLOBAL (3.716 ms) : 3655, 3777
. : milestone, 3716,
profiling (2.245 ms) : 2224, 2267
. : milestone, 2245,
tracing (1.91 ms) : 1893, 1926
. : milestone, 1910,
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~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (14.856 s) : 14856000, 14856000
. : milestone, 14856000,
appsec (15.04 s) : 15040000, 15040000
. : milestone, 15040000,
iast (18.481 s) : 18481000, 18481000
. : milestone, 18481000,
iast_GLOBAL (18.205 s) : 18205000, 18205000
. : milestone, 18205000,
profiling (14.746 s) : 14746000, 14746000
. : milestone, 14746000,
tracing (14.842 s) : 14842000, 14842000
. : milestone, 14842000,
section candidate
no_agent (15.682 s) : 15682000, 15682000
. : milestone, 15682000,
appsec (14.79 s) : 14790000, 14790000
. : milestone, 14790000,
iast (17.968 s) : 17968000, 17968000
. : milestone, 17968000,
iast_GLOBAL (17.857 s) : 17857000, 17857000
. : milestone, 17857000,
profiling (15.423 s) : 15423000, 15423000
. : milestone, 15423000,
tracing (15.221 s) : 15221000, 15221000
. : milestone, 15221000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~1d931de63f, baseline=1.62.0-SNAPSHOT~5ab378f780
dateFormat X
axisFormat %s
section baseline
no_agent (1.485 ms) : 1473, 1497
. : milestone, 1485,
appsec (3.825 ms) : 3601, 4048
. : milestone, 3825,
iast (2.273 ms) : 2204, 2342
. : milestone, 2273,
iast_GLOBAL (2.309 ms) : 2239, 2378
. : milestone, 2309,
profiling (2.09 ms) : 2035, 2144
. : milestone, 2090,
tracing (2.076 ms) : 2022, 2130
. : milestone, 2076,
section candidate
no_agent (1.493 ms) : 1481, 1504
. : milestone, 1493,
appsec (3.822 ms) : 3600, 4045
. : milestone, 3822,
iast (2.27 ms) : 2201, 2339
. : milestone, 2270,
iast_GLOBAL (2.315 ms) : 2246, 2385
. : milestone, 2315,
profiling (2.102 ms) : 2047, 2157
. : milestone, 2102,
tracing (2.076 ms) : 2022, 2130
. : milestone, 2076,
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
This PR fixes base instrumentation tests class to initialize the tracer from per method to per class to match Spock setupSpec() / cleanUpSpec().
It introduces a
InstrumentationTestConfigto help with configuring the tests.As the tracer is now initialized in a static
@BeforeEach, the instrumentation test config must be done in a static initializer block like:Not ideal but it could have been worse. Not many tests should changed the default configuration any way.
Additionally, it improves error reports, add missing default tags to tag assert, and fix case when span link matchers are missing.
Motivation
This is the current behavior from the Spock specification and the per method was killing test execution performance.
Additional Notes
This PR is part of some bigger improvements in stacked PRs:
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.