-
Notifications
You must be signed in to change notification settings - Fork 311
Fix FootprintForkedTest
that was also measuring Spock mock
#9298
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
Conversation
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
Removing the 'features' mock makes the test more predicatable.
b74dccb
to
172771d
Compare
long baseline = footprint(aggregator) | ||
SECONDS | ||
) | ||
// Removing the 'features' as it's a mock, and mocks are heavyweight, e.g. around 22MiB |
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.
nitpick: features
is now a stub, not a mock (stubs can still be heavyweight)
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.
That is true, indeed I found that a stub is pretty heavy with all the Spock plus Groovy "magic". I believe this is not what the test wants to measure, so kept it excluded from the footprint.
I found that using a Stub reduces the test memory footprint.
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.
sure, was just thinking the comment should read:
// Removing 'features' as it's a stub, and stubs/mocks are heavyweight, e.g. around 22MiB
but not a big deal
Code coverage: total 56.93%, patch 100.00% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: 172771d | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 12 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1054432
Total [baseline] (8.605 s) : 0, 8604709
Agent [candidate] (1.046 s) : 0, 1046051
Total [candidate] (8.66 s) : 0, 8660412
section iast
Agent [baseline] (1.177 s) : 0, 1177315
Total [baseline] (9.281 s) : 0, 9280914
Agent [candidate] (1.174 s) : 0, 1174124
Total [candidate] (9.309 s) : 0, 9309271
gantt
title insecure-bank - break down per module: candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.424 ms) : 0, 1424
BytebuddyAgent [baseline] (738.016 ms) : 0, 738016
BytebuddyAgent [candidate] (732.331 ms) : 0, 732331
GlobalTracer [baseline] (243.685 ms) : 0, 243685
GlobalTracer [candidate] (242.949 ms) : 0, 242949
AppSec [baseline] (30.197 ms) : 0, 30197
AppSec [candidate] (30.305 ms) : 0, 30305
Debugger [baseline] (6.053 ms) : 0, 6053
Debugger [candidate] (6.039 ms) : 0, 6039
Remote Config [baseline] (654.099 µs) : 0, 654
Remote Config [candidate] (643.361 µs) : 0, 643
Telemetry [baseline] (13.254 ms) : 0, 13254
Telemetry [candidate] (11.318 ms) : 0, 11318
section iast
crashtracking [baseline] (1.45 ms) : 0, 1450
crashtracking [candidate] (1.422 ms) : 0, 1422
BytebuddyAgent [baseline] (850.965 ms) : 0, 850965
BytebuddyAgent [candidate] (847.759 ms) : 0, 847759
GlobalTracer [baseline] (231.246 ms) : 0, 231246
GlobalTracer [candidate] (231.656 ms) : 0, 231656
IAST [baseline] (29.795 ms) : 0, 29795
IAST [candidate] (29.095 ms) : 0, 29095
AppSec [baseline] (26.525 ms) : 0, 26525
AppSec [candidate] (27.931 ms) : 0, 27931
Debugger [baseline] (6.744 ms) : 0, 6744
Debugger [candidate] (6.656 ms) : 0, 6656
Remote Config [baseline] (610.301 µs) : 0, 610
Remote Config [candidate] (573.431 µs) : 0, 573
Telemetry [baseline] (9.005 ms) : 0, 9005
Telemetry [candidate] (8.045 ms) : 0, 8045
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.039 s) : 0, 1039370
Total [baseline] (10.673 s) : 0, 10673440
Agent [candidate] (1.043 s) : 0, 1043461
Total [candidate] (10.692 s) : 0, 10691607
section appsec
Agent [baseline] (1.217 s) : 0, 1217107
Total [baseline] (10.757 s) : 0, 10756968
Agent [candidate] (1.221 s) : 0, 1220807
Total [candidate] (10.768 s) : 0, 10768297
section iast
Agent [baseline] (1.177 s) : 0, 1176812
Total [baseline] (10.915 s) : 0, 10915042
Agent [candidate] (1.174 s) : 0, 1174095
Total [candidate] (10.894 s) : 0, 10893977
section profiling
Agent [baseline] (1.193 s) : 0, 1192607
Total [baseline] (10.91 s) : 0, 10910056
Agent [candidate] (1.191 s) : 0, 1191311
Total [candidate] (10.831 s) : 0, 10830872
gantt
title petclinic - break down per module: candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.437 ms) : 0, 1437
crashtracking [candidate] (1.43 ms) : 0, 1430
BytebuddyAgent [baseline] (729.08 ms) : 0, 729080
BytebuddyAgent [candidate] (730.502 ms) : 0, 730502
GlobalTracer [baseline] (240.972 ms) : 0, 240972
GlobalTracer [candidate] (241.304 ms) : 0, 241304
AppSec [baseline] (29.794 ms) : 0, 29794
AppSec [candidate] (29.933 ms) : 0, 29933
Debugger [baseline] (6.014 ms) : 0, 6014
Debugger [candidate] (6.019 ms) : 0, 6019
Remote Config [baseline] (640.732 µs) : 0, 641
Remote Config [candidate] (643.624 µs) : 0, 644
Telemetry [baseline] (10.507 ms) : 0, 10507
Telemetry [candidate] (12.621 ms) : 0, 12621
section appsec
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.434 ms) : 0, 1434
BytebuddyAgent [baseline] (751.598 ms) : 0, 751598
BytebuddyAgent [candidate] (753.34 ms) : 0, 753340
GlobalTracer [baseline] (234.539 ms) : 0, 234539
GlobalTracer [candidate] (235.234 ms) : 0, 235234
IAST [baseline] (23.415 ms) : 0, 23415
IAST [candidate] (23.629 ms) : 0, 23629
AppSec [baseline] (166.92 ms) : 0, 166920
AppSec [candidate] (169.908 ms) : 0, 169908
Debugger [baseline] (8.55 ms) : 0, 8550
Debugger [candidate] (6.499 ms) : 0, 6499
Remote Config [baseline] (611.516 µs) : 0, 612
Remote Config [candidate] (614.14 µs) : 0, 614
Telemetry [baseline] (8.983 ms) : 0, 8983
Telemetry [candidate] (9.053 ms) : 0, 9053
section iast
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.43 ms) : 0, 1430
BytebuddyAgent [baseline] (849.766 ms) : 0, 849766
BytebuddyAgent [candidate] (847.92 ms) : 0, 847920
GlobalTracer [baseline] (231.973 ms) : 0, 231973
GlobalTracer [candidate] (231.437 ms) : 0, 231437
IAST [baseline] (30.969 ms) : 0, 30969
IAST [candidate] (29.166 ms) : 0, 29166
AppSec [baseline] (27.099 ms) : 0, 27099
AppSec [candidate] (27.761 ms) : 0, 27761
Debugger [baseline] (5.838 ms) : 0, 5838
Debugger [candidate] (6.571 ms) : 0, 6571
Remote Config [baseline] (587.67 µs) : 0, 588
Remote Config [candidate] (596.235 µs) : 0, 596
Telemetry [baseline] (8.184 ms) : 0, 8184
Telemetry [candidate] (8.131 ms) : 0, 8131
section profiling
crashtracking [baseline] (1.405 ms) : 0, 1405
crashtracking [candidate] (1.394 ms) : 0, 1394
BytebuddyAgent [baseline] (759.948 ms) : 0, 759948
BytebuddyAgent [candidate] (758.73 ms) : 0, 758730
GlobalTracer [baseline] (221.075 ms) : 0, 221075
GlobalTracer [candidate] (220.8 ms) : 0, 220800
AppSec [baseline] (29.751 ms) : 0, 29751
AppSec [candidate] (29.94 ms) : 0, 29940
Debugger [baseline] (6.245 ms) : 0, 6245
Debugger [candidate] (6.341 ms) : 0, 6341
Remote Config [baseline] (670.056 µs) : 0, 670
Remote Config [candidate] (656.246 µs) : 0, 656
Telemetry [baseline] (15.86 ms) : 0, 15860
Telemetry [candidate] (15.972 ms) : 0, 15972
ProfilingAgent [baseline] (108.407 ms) : 0, 108407
ProfilingAgent [candidate] (108.162 ms) : 0, 108162
Profiling [baseline] (109.063 ms) : 0, 109063
Profiling [candidate] (108.826 ms) : 0, 108826
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section baseline
no_agent (4.435 ms) : 4378, 4492
. : milestone, 4435,
iast (9.317 ms) : 9164, 9470
. : milestone, 9317,
iast_FULL (14.025 ms) : 13746, 14305
. : milestone, 14025,
iast_GLOBAL (10.212 ms) : 10032, 10391
. : milestone, 10212,
profiling (8.714 ms) : 8571, 8857
. : milestone, 8714,
tracing (7.29 ms) : 7185, 7395
. : milestone, 7290,
section candidate
no_agent (4.314 ms) : 4261, 4367
. : milestone, 4314,
iast (9.388 ms) : 9236, 9540
. : milestone, 9388,
iast_FULL (13.78 ms) : 13505, 14054
. : milestone, 13780,
iast_GLOBAL (10.389 ms) : 10205, 10573
. : milestone, 10389,
profiling (8.755 ms) : 8621, 8889
. : milestone, 8755,
tracing (7.729 ms) : 7617, 7840
. : milestone, 7729,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section baseline
no_agent (36.741 ms) : 36445, 37037
. : milestone, 36741,
appsec (47.644 ms) : 47226, 48062
. : milestone, 47644,
code_origins (44.134 ms) : 43762, 44506
. : milestone, 44134,
iast (43.969 ms) : 43596, 44343
. : milestone, 43969,
profiling (48.95 ms) : 48497, 49404
. : milestone, 48950,
tracing (41.769 ms) : 41423, 42115
. : milestone, 41769,
section candidate
no_agent (36.861 ms) : 36568, 37153
. : milestone, 36861,
appsec (47.062 ms) : 46652, 47473
. : milestone, 47062,
code_origins (44.663 ms) : 44279, 45047
. : milestone, 44663,
iast (41.948 ms) : 41577, 42319
. : milestone, 41948,
profiling (46.904 ms) : 46445, 47363
. : milestone, 46904,
tracing (42.589 ms) : 42209, 42968
. : milestone, 42589,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section baseline
no_agent (1.484 ms) : 1472, 1495
. : milestone, 1484,
appsec (3.658 ms) : 3441, 3874
. : milestone, 3658,
iast (2.208 ms) : 2145, 2270
. : milestone, 2208,
iast_GLOBAL (2.251 ms) : 2188, 2314
. : milestone, 2251,
profiling (2.063 ms) : 2011, 2114
. : milestone, 2063,
tracing (2.023 ms) : 1974, 2071
. : milestone, 2023,
section candidate
no_agent (1.478 ms) : 1466, 1490
. : milestone, 1478,
appsec (3.67 ms) : 3453, 3888
. : milestone, 3670,
iast (2.193 ms) : 2130, 2255
. : milestone, 2193,
iast_GLOBAL (2.252 ms) : 2189, 2315
. : milestone, 2252,
profiling (2.478 ms) : 2312, 2644
. : milestone, 2478,
tracing (2.023 ms) : 1974, 2072
. : milestone, 2023,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~172771d40a, baseline=1.51.1-SNAPSHOT~1c2d0498a0
dateFormat X
axisFormat %s
section baseline
no_agent (15.381 s) : 15381000, 15381000
. : milestone, 15381000,
appsec (14.93 s) : 14930000, 14930000
. : milestone, 14930000,
iast (18.762 s) : 18762000, 18762000
. : milestone, 18762000,
iast_GLOBAL (18.212 s) : 18212000, 18212000
. : milestone, 18212000,
profiling (15.757 s) : 15757000, 15757000
. : milestone, 15757000,
tracing (15.136 s) : 15136000, 15136000
. : milestone, 15136000,
section candidate
no_agent (15.302 s) : 15302000, 15302000
. : milestone, 15302000,
appsec (14.974 s) : 14974000, 14974000
. : milestone, 14974000,
iast (18.898 s) : 18898000, 18898000
. : milestone, 18898000,
iast_GLOBAL (18.058 s) : 18058000, 18058000
. : milestone, 18058000,
profiling (15.745 s) : 15745000, 15745000
. : milestone, 15745000,
tracing (14.968 s) : 14968000, 14968000
. : milestone, 14968000,
|
What Does This Do
Removes the 'features' mock that made the test a bit unpredictable.
This is a cherry pick from
Motivation
The memory footprint of
aggregator
was including thefeatures
Spock mock which included its stubs and its recorded invocations. This single mock could amount to ~22 MiB.Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]