-
Notifications
You must be signed in to change notification settings - Fork 293
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
Switch some unused Mocks to Stubs to avoid recording actions #6372
Merged
Conversation
This file contains 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
bantonsson
force-pushed
the
ban/mock-is-not-stub
branch
from
December 15, 2023 12:55
5dfeac3
to
c991b2f
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 5 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.26.0-SNAPSHOT~014f0bc440, baseline=1.26.0-SNAPSHOT~7a1a4cac29
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1044707
Total [baseline] (8.724 s) : 0, 8724440
Agent [candidate] (1.048 s) : 0, 1047563
Total [candidate] (8.723 s) : 0, 8722864
section iast
Agent [baseline] (1.162 s) : 0, 1161580
Total [baseline] (9.245 s) : 0, 9245263
Agent [candidate] (1.173 s) : 0, 1172810
Total [candidate] (9.276 s) : 0, 9275627
section iast_TELEMETRY_OFF
Agent [baseline] (1.157 s) : 0, 1157233
Total [baseline] (9.269 s) : 0, 9269254
Agent [candidate] (1.161 s) : 0, 1160775
Total [candidate] (9.239 s) : 0, 9238781
gantt
title insecure-bank - break down per module: candidate=1.26.0-SNAPSHOT~014f0bc440, baseline=1.26.0-SNAPSHOT~7a1a4cac29
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (646.271 ms) : 0, 646271
BytebuddyAgent [candidate] (646.978 ms) : 0, 646978
GlobalTracer [baseline] (305.463 ms) : 0, 305463
GlobalTracer [candidate] (307.142 ms) : 0, 307142
AppSec [baseline] (50.772 ms) : 0, 50772
AppSec [candidate] (51.394 ms) : 0, 51394
Remote Config [baseline] (681.708 µs) : 0, 682
Remote Config [candidate] (675.997 µs) : 0, 676
Telemetry [baseline] (7.301 ms) : 0, 7301
Telemetry [candidate] (7.233 ms) : 0, 7233
section iast
BytebuddyAgent [baseline] (765.734 ms) : 0, 765734
BytebuddyAgent [candidate] (773.899 ms) : 0, 773899
GlobalTracer [baseline] (284.121 ms) : 0, 284121
GlobalTracer [candidate] (286.851 ms) : 0, 286851
AppSec [baseline] (49.011 ms) : 0, 49011
AppSec [candidate] (49.047 ms) : 0, 49047
IAST [baseline] (20.672 ms) : 0, 20672
IAST [candidate] (20.628 ms) : 0, 20628
Remote Config [baseline] (618.182 µs) : 0, 618
Remote Config [candidate] (619.998 µs) : 0, 620
Telemetry [baseline] (7.202 ms) : 0, 7202
Telemetry [candidate] (7.179 ms) : 0, 7179
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (760.432 ms) : 0, 760432
BytebuddyAgent [candidate] (761.987 ms) : 0, 761987
GlobalTracer [baseline] (285.245 ms) : 0, 285245
GlobalTracer [candidate] (285.884 ms) : 0, 285884
AppSec [baseline] (49.188 ms) : 0, 49188
AppSec [candidate] (49.692 ms) : 0, 49692
IAST [baseline] (20.874 ms) : 0, 20874
IAST [candidate] (21.624 ms) : 0, 21624
Remote Config [baseline] (626.488 µs) : 0, 626
Remote Config [candidate] (630.795 µs) : 0, 631
Telemetry [baseline] (6.556 ms) : 0, 6556
Telemetry [candidate] (6.65 ms) : 0, 6650
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.26.0-SNAPSHOT~014f0bc440, baseline=1.26.0-SNAPSHOT~7a1a4cac29
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1047359
Total [baseline] (9.302 s) : 0, 9301739
Agent [candidate] (1.049 s) : 0, 1049287
Total [candidate] (9.378 s) : 0, 9378027
section appsec
Agent [baseline] (1.143 s) : 0, 1143147
Total [baseline] (9.421 s) : 0, 9420842
Agent [candidate] (1.147 s) : 0, 1146812
Total [candidate] (9.465 s) : 0, 9465457
section iast
Agent [baseline] (1.165 s) : 0, 1165013
Total [baseline] (9.551 s) : 0, 9551327
Agent [candidate] (1.168 s) : 0, 1167915
Total [candidate] (9.547 s) : 0, 9546930
section profiling
Agent [baseline] (1.251 s) : 0, 1251187
Total [baseline] (9.681 s) : 0, 9680546
Agent [candidate] (1.25 s) : 0, 1249634
Total [candidate] (9.703 s) : 0, 9703181
gantt
title petclinic - break down per module: candidate=1.26.0-SNAPSHOT~014f0bc440, baseline=1.26.0-SNAPSHOT~7a1a4cac29
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (647.326 ms) : 0, 647326
BytebuddyAgent [candidate] (648.564 ms) : 0, 648564
GlobalTracer [baseline] (306.597 ms) : 0, 306597
GlobalTracer [candidate] (307.434 ms) : 0, 307434
AppSec [baseline] (51.409 ms) : 0, 51409
AppSec [candidate] (51.185 ms) : 0, 51185
Remote Config [baseline] (666.313 µs) : 0, 666
Remote Config [candidate] (667.591 µs) : 0, 668
Telemetry [baseline] (7.141 ms) : 0, 7141
Telemetry [candidate] (7.2 ms) : 0, 7200
section appsec
BytebuddyAgent [baseline] (645.732 ms) : 0, 645732
BytebuddyAgent [candidate] (648.164 ms) : 0, 648164
GlobalTracer [baseline] (306.451 ms) : 0, 306451
GlobalTracer [candidate] (307.554 ms) : 0, 307554
AppSec [baseline] (149.293 ms) : 0, 149293
AppSec [candidate] (149.373 ms) : 0, 149373
Remote Config [baseline] (645.252 µs) : 0, 645
Remote Config [candidate] (640.157 µs) : 0, 640
Telemetry [baseline] (6.818 ms) : 0, 6818
Telemetry [candidate] (6.845 ms) : 0, 6845
section iast
BytebuddyAgent [baseline] (768.07 ms) : 0, 768070
BytebuddyAgent [candidate] (770.256 ms) : 0, 770256
GlobalTracer [baseline] (284.306 ms) : 0, 284306
GlobalTracer [candidate] (285.617 ms) : 0, 285617
AppSec [baseline] (48.891 ms) : 0, 48891
AppSec [candidate] (49.198 ms) : 0, 49198
IAST [baseline] (22.258 ms) : 0, 22258
IAST [candidate] (21.346 ms) : 0, 21346
Remote Config [baseline] (608.154 µs) : 0, 608
Remote Config [candidate] (630.473 µs) : 0, 630
Telemetry [baseline] (6.463 ms) : 0, 6463
Telemetry [candidate] (6.507 ms) : 0, 6507
section profiling
BytebuddyAgent [baseline] (661.034 ms) : 0, 661034
BytebuddyAgent [candidate] (661.873 ms) : 0, 661873
GlobalTracer [baseline] (380.067 ms) : 0, 380067
GlobalTracer [candidate] (378.408 ms) : 0, 378408
AppSec [baseline] (51.761 ms) : 0, 51761
AppSec [candidate] (51.437 ms) : 0, 51437
Remote Config [baseline] (672.496 µs) : 0, 672
Remote Config [candidate] (673.054 µs) : 0, 673
Telemetry [baseline] (7.56 ms) : 0, 7560
Telemetry [candidate] (7.5 ms) : 0, 7500
ProfilingAgent [baseline] (95.763 ms) : 0, 95763
ProfilingAgent [candidate] (95.238 ms) : 0, 95238
Profiling [baseline] (95.788 ms) : 0, 95788
Profiling [candidate] (95.264 ms) : 0, 95264
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 8 metrics, 14 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~014f0bc440, baseline=1.26.0-SNAPSHOT~7a1a4cac29
dateFormat X
axisFormat %s
section baseline
no_agent (363.35 µs) : 343, 383
. : milestone, 363,
iast (472.956 µs) : 452, 494
. : milestone, 473,
iast_FULL (533.909 µs) : 514, 554
. : milestone, 534,
iast_INACTIVE (441.668 µs) : 420, 463
. : milestone, 442,
iast_TELEMETRY_OFF (464.598 µs) : 444, 485
. : milestone, 465,
tracing (444.357 µs) : 423, 465
. : milestone, 444,
section candidate
no_agent (365.087 µs) : 344, 386
. : milestone, 365,
iast (466.913 µs) : 447, 487
. : milestone, 467,
iast_FULL (531.985 µs) : 512, 552
. : milestone, 532,
iast_INACTIVE (459.977 µs) : 439, 481
. : milestone, 460,
iast_TELEMETRY_OFF (461.987 µs) : 441, 483
. : milestone, 462,
tracing (442.184 µs) : 421, 463
. : milestone, 442,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~014f0bc440, baseline=1.26.0-SNAPSHOT~7a1a4cac29
dateFormat X
axisFormat %s
section baseline
no_agent (1.351 ms) : 1332, 1370
. : milestone, 1351,
appsec (1.752 ms) : 1727, 1776
. : milestone, 1752,
iast (1.54 ms) : 1516, 1564
. : milestone, 1540,
profiling (1.531 ms) : 1506, 1557
. : milestone, 1531,
tracing (1.476 ms) : 1452, 1501
. : milestone, 1476,
section candidate
no_agent (1.349 ms) : 1330, 1368
. : milestone, 1349,
appsec (1.752 ms) : 1725, 1778
. : milestone, 1752,
iast (1.495 ms) : 1471, 1520
. : milestone, 1495,
profiling (1.514 ms) : 1489, 1539
. : milestone, 1514,
tracing (1.491 ms) : 1466, 1516
. : milestone, 1491,
|
bantonsson
force-pushed
the
ban/mock-is-not-stub
branch
from
December 15, 2023 16:28
c991b2f
to
6ffa19d
Compare
bantonsson
force-pushed
the
ban/mock-is-not-stub
branch
from
December 15, 2023 16:32
6ffa19d
to
014f0bc
Compare
PerfectSlayer
approved these changes
Dec 18, 2023
PerfectSlayer
added
comp: testing
Testing
tag: no release notes
Changes to exclude from release notes
labels
Dec 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Changes some
Mock
instances toStub
instances when the interactions are not validated.Motivation
Had an OOM failure locally when running
:dd-trace-core:test
, and the heap dump showedorg.spockframework.mock.runtime.InteractionScope
holding on to 190 MB inDDAgentWriterCombinedTest
.Additional Notes
Changed all applicable
Mock
calls ofCoreTracer
andPendingTrace
in all tests, since those where the culprits inDDAgentWriterCombinedTest
.