Fix Cucumber JUnit 4 instrumentation to support empty scenario names#7470
Merged
nikita-tkachenko-datadog merged 2 commits intomasterfrom Aug 22, 2024
Merged
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 47 metrics, 15 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1047136
Total [baseline] (10.41 s) : 0, 10409686
Agent [candidate] (1.046 s) : 0, 1045712
Total [candidate] (10.275 s) : 0, 10274897
section appsec
Agent [baseline] (1.17 s) : 0, 1170042
Total [baseline] (10.492 s) : 0, 10491986
Agent [candidate] (1.167 s) : 0, 1166822
Total [candidate] (10.49 s) : 0, 10490128
section iast
Agent [baseline] (1.174 s) : 0, 1173564
Total [baseline] (10.861 s) : 0, 10860702
Agent [candidate] (1.175 s) : 0, 1174868
Total [candidate] (10.847 s) : 0, 10846607
section profiling
Agent [baseline] (1.247 s) : 0, 1246698
Total [baseline] (10.583 s) : 0, 10582946
Agent [candidate] (1.246 s) : 0, 1246237
Total [candidate] (10.597 s) : 0, 10597268
gantt
title petclinic - break down per module: candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (668.808 ms) : 0, 668808
BytebuddyAgent [candidate] (666.803 ms) : 0, 666803
GlobalTracer [baseline] (305.747 ms) : 0, 305747
GlobalTracer [candidate] (306.207 ms) : 0, 306207
AppSec [baseline] (51.068 ms) : 0, 51068
AppSec [candidate] (51.119 ms) : 0, 51119
Remote Config [baseline] (657.372 µs) : 0, 657
Remote Config [candidate] (686.342 µs) : 0, 686
Telemetry [baseline] (7.425 ms) : 0, 7425
Telemetry [candidate] (7.474 ms) : 0, 7474
section appsec
BytebuddyAgent [baseline] (679.354 ms) : 0, 679354
BytebuddyAgent [candidate] (676.678 ms) : 0, 676678
GlobalTracer [baseline] (299.788 ms) : 0, 299788
GlobalTracer [candidate] (299.516 ms) : 0, 299516
AppSec [baseline] (157.069 ms) : 0, 157069
AppSec [candidate] (157.458 ms) : 0, 157458
Remote Config [baseline] (610.396 µs) : 0, 610
Remote Config [candidate] (602.729 µs) : 0, 603
Telemetry [baseline] (8.389 ms) : 0, 8389
Telemetry [candidate] (8.995 ms) : 0, 8995
IAST [baseline] (22.693 ms) : 0, 22693
IAST [candidate] (20.199 ms) : 0, 20199
section iast
BytebuddyAgent [baseline] (778.835 ms) : 0, 778835
BytebuddyAgent [candidate] (781.72 ms) : 0, 781720
GlobalTracer [baseline] (296.358 ms) : 0, 296358
GlobalTracer [candidate] (296.156 ms) : 0, 296156
AppSec [baseline] (48.741 ms) : 0, 48741
AppSec [candidate] (52.577 ms) : 0, 52577
Remote Config [baseline] (593.131 µs) : 0, 593
Remote Config [candidate] (570.706 µs) : 0, 571
Telemetry [baseline] (9.451 ms) : 0, 9451
Telemetry [candidate] (7.099 ms) : 0, 7099
IAST [baseline] (26.1 ms) : 0, 26100
IAST [candidate] (23.261 ms) : 0, 23261
section profiling
ProfilingAgent [baseline] (94.416 ms) : 0, 94416
ProfilingAgent [candidate] (94.152 ms) : 0, 94152
BytebuddyAgent [baseline] (664.149 ms) : 0, 664149
BytebuddyAgent [candidate] (664.318 ms) : 0, 664318
GlobalTracer [baseline] (390.121 ms) : 0, 390121
GlobalTracer [candidate] (390.742 ms) : 0, 390742
AppSec [baseline] (52.858 ms) : 0, 52858
AppSec [candidate] (51.727 ms) : 0, 51727
Remote Config [baseline] (680.292 µs) : 0, 680
Remote Config [candidate] (689.157 µs) : 0, 689
Telemetry [baseline] (7.373 ms) : 0, 7373
Telemetry [candidate] (7.372 ms) : 0, 7372
Profiling [baseline] (94.44 ms) : 0, 94440
Profiling [candidate] (94.176 ms) : 0, 94176
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1054009
Total [baseline] (8.5 s) : 0, 8500024
Agent [candidate] (1.046 s) : 0, 1046464
Total [candidate] (8.533 s) : 0, 8532943
section iast
Agent [baseline] (1.18 s) : 0, 1180125
Total [baseline] (9.008 s) : 0, 9008126
Agent [candidate] (1.175 s) : 0, 1174869
Total [candidate] (9.038 s) : 0, 9037657
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.174 s) : 0, 1174474
Total [baseline] (8.944 s) : 0, 8944424
Agent [candidate] (1.178 s) : 0, 1178399
Total [candidate] (9.005 s) : 0, 9005288
section iast_TELEMETRY_OFF
Agent [baseline] (1.166 s) : 0, 1165795
Total [baseline] (8.966 s) : 0, 8965590
Agent [candidate] (1.182 s) : 0, 1182093
Total [candidate] (8.985 s) : 0, 8985040
gantt
title insecure-bank - break down per module: candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.951 ms) : 0, 672951
BytebuddyAgent [candidate] (667.518 ms) : 0, 667518
GlobalTracer [baseline] (307.618 ms) : 0, 307618
GlobalTracer [candidate] (306.063 ms) : 0, 306063
AppSec [baseline] (51.707 ms) : 0, 51707
AppSec [candidate] (51.269 ms) : 0, 51269
Remote Config [baseline] (673.239 µs) : 0, 673
Remote Config [candidate] (683.212 µs) : 0, 683
Telemetry [baseline] (7.532 ms) : 0, 7532
Telemetry [candidate] (7.469 ms) : 0, 7469
section iast
BytebuddyAgent [baseline] (783.923 ms) : 0, 783923
BytebuddyAgent [candidate] (781.448 ms) : 0, 781448
GlobalTracer [baseline] (297.903 ms) : 0, 297903
GlobalTracer [candidate] (296.154 ms) : 0, 296154
AppSec [baseline] (49.908 ms) : 0, 49908
AppSec [candidate] (51.396 ms) : 0, 51396
IAST [baseline] (25.349 ms) : 0, 25349
IAST [candidate] (21.567 ms) : 0, 21567
Remote Config [baseline] (593.598 µs) : 0, 594
Remote Config [candidate] (573.065 µs) : 0, 573
Telemetry [baseline] (8.88 ms) : 0, 8880
Telemetry [candidate] (10.268 ms) : 0, 10268
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (779.431 ms) : 0, 779431
BytebuddyAgent [candidate] (783.779 ms) : 0, 783779
GlobalTracer [baseline] (296.777 ms) : 0, 296777
GlobalTracer [candidate] (297.564 ms) : 0, 297564
AppSec [baseline] (49.77 ms) : 0, 49770
AppSec [candidate] (48.897 ms) : 0, 48897
IAST [baseline] (24.017 ms) : 0, 24017
IAST [candidate] (24.42 ms) : 0, 24420
Remote Config [baseline] (610.231 µs) : 0, 610
Remote Config [candidate] (597.834 µs) : 0, 598
Telemetry [baseline] (10.356 ms) : 0, 10356
Telemetry [candidate] (9.591 ms) : 0, 9591
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (773.767 ms) : 0, 773767
BytebuddyAgent [candidate] (786.91 ms) : 0, 786910
GlobalTracer [baseline] (295.667 ms) : 0, 295667
GlobalTracer [candidate] (299.426 ms) : 0, 299426
AppSec [baseline] (53.203 ms) : 0, 53203
AppSec [candidate] (53.291 ms) : 0, 53291
IAST [baseline] (22.028 ms) : 0, 22028
IAST [candidate] (21.029 ms) : 0, 21029
Remote Config [baseline] (588.547 µs) : 0, 589
Remote Config [candidate] (631.944 µs) : 0, 632
Telemetry [baseline] (7.075 ms) : 0, 7075
Telemetry [candidate] (7.229 ms) : 0, 7229
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section baseline
no_agent (1.344 ms) : 1325, 1364
. : milestone, 1344,
appsec (1.714 ms) : 1690, 1739
. : milestone, 1714,
appsec_no_iast (1.721 ms) : 1696, 1746
. : milestone, 1721,
iast (1.47 ms) : 1448, 1493
. : milestone, 1470,
profiling (1.46 ms) : 1435, 1485
. : milestone, 1460,
tracing (1.465 ms) : 1440, 1490
. : milestone, 1465,
section candidate
no_agent (1.345 ms) : 1326, 1364
. : milestone, 1345,
appsec (1.73 ms) : 1706, 1753
. : milestone, 1730,
appsec_no_iast (1.731 ms) : 1708, 1755
. : milestone, 1731,
iast (1.476 ms) : 1454, 1498
. : milestone, 1476,
profiling (1.492 ms) : 1467, 1517
. : milestone, 1492,
tracing (1.467 ms) : 1443, 1490
. : milestone, 1467,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section baseline
no_agent (370.519 µs) : 350, 391
. : milestone, 371,
iast (481.559 µs) : 459, 504
. : milestone, 482,
iast_FULL (552.283 µs) : 531, 574
. : milestone, 552,
iast_GLOBAL (497.399 µs) : 475, 520
. : milestone, 497,
iast_HARDCODED_SECRET_DISABLED (478.241 µs) : 456, 500
. : milestone, 478,
iast_INACTIVE (439.328 µs) : 419, 460
. : milestone, 439,
iast_TELEMETRY_OFF (474.343 µs) : 453, 496
. : milestone, 474,
tracing (438.306 µs) : 418, 459
. : milestone, 438,
section candidate
no_agent (362.892 µs) : 342, 384
. : milestone, 363,
iast (489.763 µs) : 468, 512
. : milestone, 490,
iast_FULL (548.993 µs) : 526, 572
. : milestone, 549,
iast_GLOBAL (497.791 µs) : 476, 520
. : milestone, 498,
iast_HARDCODED_SECRET_DISABLED (486.883 µs) : 466, 508
. : milestone, 487,
iast_INACTIVE (452.822 µs) : 430, 475
. : milestone, 453,
iast_TELEMETRY_OFF (473.056 µs) : 451, 495
. : milestone, 473,
tracing (438.484 µs) : 418, 459
. : milestone, 438,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section baseline
no_agent (14.97 s) : 14970000, 14970000
. : milestone, 14970000,
appsec (15.016 s) : 15016000, 15016000
. : milestone, 15016000,
iast (18.563 s) : 18563000, 18563000
. : milestone, 18563000,
iast_GLOBAL (18.096 s) : 18096000, 18096000
. : milestone, 18096000,
profiling (15.397 s) : 15397000, 15397000
. : milestone, 15397000,
tracing (15.17 s) : 15170000, 15170000
. : milestone, 15170000,
section candidate
no_agent (15.532 s) : 15532000, 15532000
. : milestone, 15532000,
appsec (15.016 s) : 15016000, 15016000
. : milestone, 15016000,
iast (18.769 s) : 18769000, 18769000
. : milestone, 18769000,
iast_GLOBAL (17.961 s) : 17961000, 17961000
. : milestone, 17961000,
profiling (15.099 s) : 15099000, 15099000
. : milestone, 15099000,
tracing (14.994 s) : 14994000, 14994000
. : milestone, 14994000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~1008e7744a, baseline=1.39.0-SNAPSHOT~fd7f7504b2
dateFormat X
axisFormat %s
section baseline
no_agent (1.459 ms) : 1447, 1470
. : milestone, 1459,
appsec (2.223 ms) : 2188, 2259
. : milestone, 2223,
iast (1.967 ms) : 1925, 2010
. : milestone, 1967,
iast_GLOBAL (2.006 ms) : 1963, 2049
. : milestone, 2006,
profiling (1.862 ms) : 1828, 1896
. : milestone, 1862,
tracing (1.831 ms) : 1798, 1864
. : milestone, 1831,
section candidate
no_agent (1.455 ms) : 1444, 1467
. : milestone, 1455,
appsec (2.212 ms) : 2177, 2246
. : milestone, 2212,
iast (1.968 ms) : 1926, 2010
. : milestone, 1968,
iast_GLOBAL (2.018 ms) : 1975, 2061
. : milestone, 2018,
profiling (1.862 ms) : 1828, 1896
. : milestone, 1862,
tracing (1.835 ms) : 1803, 1868
. : milestone, 1835,
|
romainkomorn-exdatadog
approved these changes
Aug 22, 2024
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
Fixes Cucumber JUnit 4 instrumentation to correctly work with scenarios that have no name.
Additional Notes
It is possible to declare a Cucumber scenario that has an empty name (this only works for JUnit4-backed Cucumber):
If the feature contains multiple scenarios that do not have names, Cucumber will assign synthetic names for them (
#1,#2, etc).However, if there is only one such scenario, its name will remain empty.
This causes problems in the backend, because scenario name maps to test name, and the latter is needed to calculate test fingerprint.
The solution is to update the tracing logic to generate synthetic names in case Cucumber does not do it.
The logic will try to calculate the line where scenario is declared and use that as the name (
LINE:123) and if that fails an hard-coded string (EMPTY_NAME) is used.Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: SDTEST-700