Optimize Lambda proxy class matching on filtering#10905
Open
Optimize Lambda proxy class matching on filtering#10905
Conversation
When trying to match classes to exclude third-party ones we are excluding also lambda proxy classes that are shown with JVM option -XX:+ShowHiddenFrames RegEx are used to identify them correctly but this is expensive. we are using a fast path by searching for 'Lambda' first before applying RegEx matching.
Contributor
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 8 metrics, 7 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (328.03 µs) : 267, 389
. : milestone, 328,
basic (277.047 µs) : 271, 284
. : milestone, 277,
loop (8.961 ms) : 8957, 8966
. : milestone, 8961,
section candidate
noprobe (324.107 µs) : 280, 368
. : milestone, 324,
basic (279.276 µs) : 272, 287
. : milestone, 279,
loop (8.953 ms) : 8949, 8957
. : milestone, 8953,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055357
Total [baseline] (8.837 s) : 0, 8836753
Agent [candidate] (1.066 s) : 0, 1065699
Total [candidate] (8.838 s) : 0, 8837633
section iast
Agent [baseline] (1.227 s) : 0, 1227101
Total [baseline] (9.551 s) : 0, 9551265
Agent [candidate] (1.242 s) : 0, 1242481
Total [candidate] (9.622 s) : 0, 9622142
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (628.042 ms) : 0, 628042
BytebuddyAgent [candidate] (634.388 ms) : 0, 634388
AgentMeter [baseline] (28.974 ms) : 0, 28974
AgentMeter [candidate] (29.191 ms) : 0, 29191
GlobalTracer [baseline] (256.642 ms) : 0, 256642
GlobalTracer [candidate] (258.054 ms) : 0, 258054
AppSec [baseline] (31.633 ms) : 0, 31633
AppSec [candidate] (31.802 ms) : 0, 31802
Debugger [baseline] (59.294 ms) : 0, 59294
Debugger [candidate] (59.855 ms) : 0, 59855
Remote Config [baseline] (587.844 µs) : 0, 588
Remote Config [candidate] (583.539 µs) : 0, 584
Telemetry [baseline] (8.708 ms) : 0, 8708
Telemetry [candidate] (9.173 ms) : 0, 9173
Flare Poller [baseline] (4.289 ms) : 0, 4289
Flare Poller [candidate] (5.152 ms) : 0, 5152
section iast
crashtracking [baseline] (1.179 ms) : 0, 1179
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (796.187 ms) : 0, 796187
BytebuddyAgent [candidate] (806.084 ms) : 0, 806084
AgentMeter [baseline] (11.339 ms) : 0, 11339
AgentMeter [candidate] (11.652 ms) : 0, 11652
GlobalTracer [baseline] (247.346 ms) : 0, 247346
GlobalTracer [candidate] (250.61 ms) : 0, 250610
IAST [baseline] (25.32 ms) : 0, 25320
IAST [candidate] (25.689 ms) : 0, 25689
AppSec [baseline] (26.472 ms) : 0, 26472
AppSec [candidate] (27.957 ms) : 0, 27957
Debugger [baseline] (70.079 ms) : 0, 70079
Debugger [candidate] (66.891 ms) : 0, 66891
Remote Config [baseline] (533.455 µs) : 0, 533
Remote Config [candidate] (533.516 µs) : 0, 534
Telemetry [baseline] (9.224 ms) : 0, 9224
Telemetry [candidate] (11.378 ms) : 0, 11378
Flare Poller [baseline] (3.377 ms) : 0, 3377
Flare Poller [candidate] (4.057 ms) : 0, 4057
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055951
Total [baseline] (10.265 s) : 0, 10264891
Agent [candidate] (1.068 s) : 0, 1068369
Total [candidate] (11.23 s) : 0, 11229864
section appsec
Agent [baseline] (1.252 s) : 0, 1251785
Total [baseline] (11.216 s) : 0, 11215553
Agent [candidate] (1.267 s) : 0, 1266536
Total [candidate] (11.351 s) : 0, 11350793
section iast
Agent [baseline] (1.252 s) : 0, 1252030
Total [baseline] (11.337 s) : 0, 11337210
Agent [candidate] (1.24 s) : 0, 1240019
Total [candidate] (11.382 s) : 0, 11381905
section profiling
Agent [baseline] (1.189 s) : 0, 1189015
Total [baseline] (11.078 s) : 0, 11077954
Agent [candidate] (1.189 s) : 0, 1188918
Total [candidate] (10.99 s) : 0, 10989822
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.18 ms) : 0, 1180
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (627.01 ms) : 0, 627010
BytebuddyAgent [candidate] (634.601 ms) : 0, 634601
AgentMeter [baseline] (29.038 ms) : 0, 29038
AgentMeter [candidate] (29.405 ms) : 0, 29405
GlobalTracer [baseline] (256.166 ms) : 0, 256166
GlobalTracer [candidate] (260.658 ms) : 0, 260658
AppSec [baseline] (31.529 ms) : 0, 31529
AppSec [candidate] (32.315 ms) : 0, 32315
Debugger [baseline] (60.215 ms) : 0, 60215
Debugger [candidate] (61.45 ms) : 0, 61450
Remote Config [baseline] (588.001 µs) : 0, 588
Remote Config [candidate] (606.829 µs) : 0, 607
Telemetry [baseline] (7.968 ms) : 0, 7968
Telemetry [candidate] (8.134 ms) : 0, 8134
Flare Poller [baseline] (6.401 ms) : 0, 6401
Flare Poller [candidate] (3.62 ms) : 0, 3620
section appsec
crashtracking [baseline] (1.205 ms) : 0, 1205
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (661.955 ms) : 0, 661955
BytebuddyAgent [candidate] (669.784 ms) : 0, 669784
AgentMeter [baseline] (12.031 ms) : 0, 12031
AgentMeter [candidate] (12.187 ms) : 0, 12187
GlobalTracer [baseline] (258.977 ms) : 0, 258977
GlobalTracer [candidate] (262.21 ms) : 0, 262210
AppSec [baseline] (178.17 ms) : 0, 178170
AppSec [candidate] (179.764 ms) : 0, 179764
Debugger [baseline] (65.981 ms) : 0, 65981
Debugger [candidate] (66.95 ms) : 0, 66950
Remote Config [baseline] (633.583 µs) : 0, 634
Remote Config [candidate] (642.229 µs) : 0, 642
Telemetry [baseline] (8.362 ms) : 0, 8362
Telemetry [candidate] (8.566 ms) : 0, 8566
Flare Poller [baseline] (3.628 ms) : 0, 3628
Flare Poller [candidate] (3.749 ms) : 0, 3749
IAST [baseline] (24.305 ms) : 0, 24305
IAST [candidate] (24.731 ms) : 0, 24731
section iast
crashtracking [baseline] (1.228 ms) : 0, 1228
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (812.507 ms) : 0, 812507
BytebuddyAgent [candidate] (805.559 ms) : 0, 805559
AgentMeter [baseline] (11.574 ms) : 0, 11574
AgentMeter [candidate] (11.479 ms) : 0, 11479
GlobalTracer [baseline] (251.359 ms) : 0, 251359
GlobalTracer [candidate] (249.086 ms) : 0, 249086
AppSec [baseline] (27.222 ms) : 0, 27222
AppSec [candidate] (26.629 ms) : 0, 26629
Debugger [baseline] (72.262 ms) : 0, 72262
Debugger [candidate] (70.971 ms) : 0, 70971
Remote Config [baseline] (552.268 µs) : 0, 552
Remote Config [candidate] (534.558 µs) : 0, 535
Telemetry [baseline] (9.263 ms) : 0, 9263
Telemetry [candidate] (9.441 ms) : 0, 9441
Flare Poller [baseline] (3.445 ms) : 0, 3445
Flare Poller [candidate] (3.355 ms) : 0, 3355
IAST [baseline] (25.887 ms) : 0, 25887
IAST [candidate] (25.384 ms) : 0, 25384
section profiling
ProfilingAgent [baseline] (94.389 ms) : 0, 94389
ProfilingAgent [candidate] (94.56 ms) : 0, 94560
crashtracking [baseline] (1.161 ms) : 0, 1161
crashtracking [candidate] (1.166 ms) : 0, 1166
BytebuddyAgent [baseline] (686.521 ms) : 0, 686521
BytebuddyAgent [candidate] (685.965 ms) : 0, 685965
AgentMeter [baseline] (8.624 ms) : 0, 8624
AgentMeter [candidate] (8.614 ms) : 0, 8614
GlobalTracer [baseline] (216.97 ms) : 0, 216970
GlobalTracer [candidate] (217.001 ms) : 0, 217001
AppSec [baseline] (32.37 ms) : 0, 32370
AppSec [candidate] (32.41 ms) : 0, 32410
Debugger [baseline] (66.086 ms) : 0, 66086
Debugger [candidate] (65.41 ms) : 0, 65410
Remote Config [baseline] (559.983 µs) : 0, 560
Remote Config [candidate] (574.673 µs) : 0, 575
Telemetry [baseline] (7.778 ms) : 0, 7778
Telemetry [candidate] (8.544 ms) : 0, 8544
Flare Poller [baseline] (3.474 ms) : 0, 3474
Flare Poller [candidate] (3.554 ms) : 0, 3554
Profiling [baseline] (94.953 ms) : 0, 94953
Profiling [candidate] (95.122 ms) : 0, 95122
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 16 metrics, 17 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section baseline
no_agent (1.203 ms) : 1191, 1215
. : milestone, 1203,
iast (3.154 ms) : 3113, 3195
. : milestone, 3154,
iast_FULL (5.822 ms) : 5763, 5880
. : milestone, 5822,
iast_GLOBAL (3.448 ms) : 3398, 3498
. : milestone, 3448,
profiling (2.015 ms) : 1998, 2033
. : milestone, 2015,
tracing (1.826 ms) : 1810, 1841
. : milestone, 1826,
section candidate
no_agent (1.196 ms) : 1184, 1207
. : milestone, 1196,
iast (3.148 ms) : 3106, 3191
. : milestone, 3148,
iast_FULL (5.923 ms) : 5862, 5983
. : milestone, 5923,
iast_GLOBAL (3.645 ms) : 3584, 3706
. : milestone, 3645,
profiling (2.052 ms) : 2033, 2070
. : milestone, 2052,
tracing (1.817 ms) : 1801, 1833
. : milestone, 1817,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section baseline
no_agent (18.188 ms) : 18000, 18375
. : milestone, 18188,
appsec (19.004 ms) : 18810, 19199
. : milestone, 19004,
code_origins (17.725 ms) : 17547, 17903
. : milestone, 17725,
iast (18.022 ms) : 17843, 18201
. : milestone, 18022,
profiling (18.876 ms) : 18681, 19071
. : milestone, 18876,
tracing (17.726 ms) : 17552, 17900
. : milestone, 17726,
section candidate
no_agent (18.098 ms) : 17906, 18289
. : milestone, 18098,
appsec (18.636 ms) : 18445, 18827
. : milestone, 18636,
code_origins (17.771 ms) : 17592, 17950
. : milestone, 17771,
iast (17.855 ms) : 17676, 18034
. : milestone, 17855,
profiling (19.746 ms) : 19543, 19949
. : milestone, 19746,
tracing (18.059 ms) : 17879, 18239
. : milestone, 18059,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section baseline
no_agent (14.579 s) : 14579000, 14579000
. : milestone, 14579000,
appsec (14.141 s) : 14141000, 14141000
. : milestone, 14141000,
iast (17.196 s) : 17196000, 17196000
. : milestone, 17196000,
iast_GLOBAL (17.125 s) : 17125000, 17125000
. : milestone, 17125000,
profiling (14.84 s) : 14840000, 14840000
. : milestone, 14840000,
tracing (14.443 s) : 14443000, 14443000
. : milestone, 14443000,
section candidate
no_agent (14.505 s) : 14505000, 14505000
. : milestone, 14505000,
appsec (14.225 s) : 14225000, 14225000
. : milestone, 14225000,
iast (17.577 s) : 17577000, 17577000
. : milestone, 17577000,
iast_GLOBAL (17.211 s) : 17211000, 17211000
. : milestone, 17211000,
profiling (14.39 s) : 14390000, 14390000
. : milestone, 14390000,
tracing (14.755 s) : 14755000, 14755000
. : milestone, 14755000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~3debd0241d, baseline=1.61.0-SNAPSHOT~018d1ea157
dateFormat X
axisFormat %s
section baseline
no_agent (1.484 ms) : 1473, 1496
. : milestone, 1484,
appsec (4.219 ms) : 3966, 4472
. : milestone, 4219,
iast (2.666 ms) : 2556, 2777
. : milestone, 2666,
iast_GLOBAL (2.708 ms) : 2598, 2819
. : milestone, 2708,
profiling (2.476 ms) : 2383, 2570
. : milestone, 2476,
tracing (2.411 ms) : 2323, 2500
. : milestone, 2411,
section candidate
no_agent (1.485 ms) : 1473, 1497
. : milestone, 1485,
appsec (2.863 ms) : 2774, 2953
. : milestone, 2863,
iast (2.668 ms) : 2558, 2778
. : milestone, 2668,
iast_GLOBAL (2.71 ms) : 2600, 2821
. : milestone, 2710,
profiling (2.439 ms) : 2349, 2530
. : milestone, 2439,
tracing (2.413 ms) : 2324, 2501
. : milestone, 2413,
|
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
When trying to match classes to exclude third-party ones we are excluding also lambda proxy classes that are shown with JVM option
-XX:+ShowHiddenFramesRegEx are used to identify them correctly but this is expensive. we are using a fast path by searching for 'Lambda' first before applying RegEx matching.
Motivation
Additional Notes
MicroBenchmark shows the difference between the 2 aproaches in case of classname not matching lambda proxies (((% of the time)
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.