Avoid several per request string allocations in spring-webmvc instrumenters#11363
Draft
amarziali wants to merge 1 commit into
Draft
Avoid several per request string allocations in spring-webmvc instrumenters#11363amarziali wants to merge 1 commit into
amarziali wants to merge 1 commit into
Conversation
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 petclinicgantt
title petclinic - global startup overhead: candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.075 s) : 0, 1074648
Total [baseline] (10.923 s) : 0, 10922813
Agent [candidate] (1.082 s) : 0, 1082179
Total [candidate] (11.071 s) : 0, 11070606
section appsec
Agent [baseline] (1.271 s) : 0, 1270503
Total [baseline] (11.058 s) : 0, 11057950
Agent [candidate] (1.27 s) : 0, 1269674
Total [candidate] (11.088 s) : 0, 11088166
section iast
Agent [baseline] (1.257 s) : 0, 1256962
Total [baseline] (11.128 s) : 0, 11128215
Agent [candidate] (1.252 s) : 0, 1251725
Total [candidate] (11.122 s) : 0, 11121832
section profiling
Agent [baseline] (1.31 s) : 0, 1309870
Total [baseline] (11.105 s) : 0, 11105390
Agent [candidate] (1.316 s) : 0, 1316402
Total [candidate] (11.09 s) : 0, 11089978
gantt
title petclinic - break down per module: candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.254 ms) : 0, 1254
crashtracking [candidate] (1.252 ms) : 0, 1252
BytebuddyAgent [baseline] (642.039 ms) : 0, 642039
BytebuddyAgent [candidate] (645.79 ms) : 0, 645790
AgentMeter [baseline] (30.082 ms) : 0, 30082
AgentMeter [candidate] (30.384 ms) : 0, 30384
GlobalTracer [baseline] (249.084 ms) : 0, 249084
GlobalTracer [candidate] (251.865 ms) : 0, 251865
AppSec [baseline] (32.895 ms) : 0, 32895
AppSec [candidate] (33.34 ms) : 0, 33340
Debugger [baseline] (61.723 ms) : 0, 61723
Debugger [candidate] (63.252 ms) : 0, 63252
Remote Config [baseline] (604.721 µs) : 0, 605
Remote Config [candidate] (606.504 µs) : 0, 607
Telemetry [baseline] (9.309 ms) : 0, 9309
Telemetry [candidate] (9.357 ms) : 0, 9357
Flare Poller [baseline] (10.657 ms) : 0, 10657
Flare Poller [candidate] (9.231 ms) : 0, 9231
section appsec
crashtracking [baseline] (1.228 ms) : 0, 1228
crashtracking [candidate] (1.227 ms) : 0, 1227
BytebuddyAgent [baseline] (678.392 ms) : 0, 678392
BytebuddyAgent [candidate] (679.269 ms) : 0, 679269
AgentMeter [baseline] (12.104 ms) : 0, 12104
AgentMeter [candidate] (12.084 ms) : 0, 12084
GlobalTracer [baseline] (248.49 ms) : 0, 248490
GlobalTracer [candidate] (248.14 ms) : 0, 248140
IAST [baseline] (24.803 ms) : 0, 24803
IAST [candidate] (24.715 ms) : 0, 24715
AppSec [baseline] (185.606 ms) : 0, 185606
AppSec [candidate] (184.817 ms) : 0, 184817
Debugger [baseline] (65.576 ms) : 0, 65576
Debugger [candidate] (65.133 ms) : 0, 65133
Remote Config [baseline] (612.469 µs) : 0, 612
Remote Config [candidate] (604.256 µs) : 0, 604
Telemetry [baseline] (7.748 ms) : 0, 7748
Telemetry [candidate] (7.697 ms) : 0, 7697
Flare Poller [baseline] (9.143 ms) : 0, 9143
Flare Poller [candidate] (9.072 ms) : 0, 9072
section iast
crashtracking [baseline] (1.229 ms) : 0, 1229
crashtracking [candidate] (1.224 ms) : 0, 1224
BytebuddyAgent [baseline] (832.332 ms) : 0, 832332
BytebuddyAgent [candidate] (828.171 ms) : 0, 828171
AgentMeter [baseline] (11.503 ms) : 0, 11503
AgentMeter [candidate] (11.478 ms) : 0, 11478
GlobalTracer [baseline] (237.788 ms) : 0, 237788
GlobalTracer [candidate] (236.974 ms) : 0, 236974
IAST [baseline] (26.746 ms) : 0, 26746
IAST [candidate] (26.607 ms) : 0, 26607
AppSec [baseline] (33.303 ms) : 0, 33303
AppSec [candidate] (32.553 ms) : 0, 32553
Debugger [baseline] (65.2 ms) : 0, 65200
Debugger [candidate] (65.937 ms) : 0, 65937
Remote Config [baseline] (528.065 µs) : 0, 528
Remote Config [candidate] (538.252 µs) : 0, 538
Telemetry [baseline] (8.091 ms) : 0, 8091
Telemetry [candidate] (8.076 ms) : 0, 8076
Flare Poller [baseline] (3.373 ms) : 0, 3373
Flare Poller [candidate] (3.35 ms) : 0, 3350
section profiling
crashtracking [baseline] (531.015 µs) : 0, 531
crashtracking [candidate] (541.307 µs) : 0, 541
BytebuddyAgent [baseline] (687.32 ms) : 0, 687320
BytebuddyAgent [candidate] (692.069 ms) : 0, 692069
AgentMeter [baseline] (9.285 ms) : 0, 9285
AgentMeter [candidate] (9.371 ms) : 0, 9371
GlobalTracer [baseline] (209.467 ms) : 0, 209467
GlobalTracer [candidate] (209.372 ms) : 0, 209372
AppSec [baseline] (32.376 ms) : 0, 32376
AppSec [candidate] (32.738 ms) : 0, 32738
Debugger [baseline] (67.749 ms) : 0, 67749
Debugger [candidate] (68.109 ms) : 0, 68109
Remote Config [baseline] (578.217 µs) : 0, 578
Remote Config [candidate] (570.868 µs) : 0, 571
Telemetry [baseline] (8.091 ms) : 0, 8091
Telemetry [candidate] (8.054 ms) : 0, 8054
Flare Poller [baseline] (3.597 ms) : 0, 3597
Flare Poller [candidate] (3.604 ms) : 0, 3604
ProfilingAgent [baseline] (93.203 ms) : 0, 93203
ProfilingAgent [candidate] (94.163 ms) : 0, 94163
Profiling [baseline] (93.776 ms) : 0, 93776
Profiling [candidate] (94.733 ms) : 0, 94733
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.069 s) : 0, 1068865
Total [baseline] (8.848 s) : 0, 8847984
Agent [candidate] (1.069 s) : 0, 1068862
Total [candidate] (8.848 s) : 0, 8848486
section iast
Agent [baseline] (1.263 s) : 0, 1263396
Total [baseline] (9.586 s) : 0, 9586401
Agent [candidate] (1.25 s) : 0, 1249536
Total [candidate] (9.552 s) : 0, 9552493
gantt
title insecure-bank - break down per module: candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.236 ms) : 0, 1236
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (640.064 ms) : 0, 640064
BytebuddyAgent [candidate] (638.565 ms) : 0, 638565
AgentMeter [baseline] (29.867 ms) : 0, 29867
AgentMeter [candidate] (29.795 ms) : 0, 29795
GlobalTracer [baseline] (247.452 ms) : 0, 247452
GlobalTracer [candidate] (248.297 ms) : 0, 248297
AppSec [baseline] (32.755 ms) : 0, 32755
AppSec [candidate] (32.745 ms) : 0, 32745
Debugger [baseline] (60.742 ms) : 0, 60742
Debugger [candidate] (62.302 ms) : 0, 62302
Remote Config [baseline] (606.963 µs) : 0, 607
Remote Config [candidate] (606.257 µs) : 0, 606
Telemetry [baseline] (9.229 ms) : 0, 9229
Telemetry [candidate] (10.011 ms) : 0, 10011
Flare Poller [baseline] (10.03 ms) : 0, 10030
Flare Poller [candidate] (8.415 ms) : 0, 8415
section iast
crashtracking [baseline] (1.239 ms) : 0, 1239
crashtracking [candidate] (1.231 ms) : 0, 1231
BytebuddyAgent [baseline] (838.028 ms) : 0, 838028
BytebuddyAgent [candidate] (827.438 ms) : 0, 827438
AgentMeter [baseline] (11.603 ms) : 0, 11603
AgentMeter [candidate] (11.405 ms) : 0, 11405
GlobalTracer [baseline] (238.97 ms) : 0, 238970
GlobalTracer [candidate] (236.578 ms) : 0, 236578
IAST [baseline] (26.987 ms) : 0, 26987
IAST [candidate] (26.676 ms) : 0, 26676
AppSec [baseline] (33.379 ms) : 0, 33379
AppSec [candidate] (32.47 ms) : 0, 32470
Debugger [baseline] (64.44 ms) : 0, 64440
Debugger [candidate] (65.075 ms) : 0, 65075
Remote Config [baseline] (543.291 µs) : 0, 543
Remote Config [candidate] (534.654 µs) : 0, 535
Telemetry [baseline] (7.982 ms) : 0, 7982
Telemetry [candidate] (7.943 ms) : 0, 7943
Flare Poller [baseline] (3.363 ms) : 0, 3363
Flare Poller [candidate] (3.392 ms) : 0, 3392
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 20 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section baseline
no_agent (18.97 ms) : 18785, 19155
. : milestone, 18970,
appsec (18.291 ms) : 18107, 18475
. : milestone, 18291,
code_origins (18.757 ms) : 18566, 18947
. : milestone, 18757,
iast (17.917 ms) : 17741, 18093
. : milestone, 17917,
profiling (18.095 ms) : 17914, 18276
. : milestone, 18095,
tracing (18.186 ms) : 18004, 18369
. : milestone, 18186,
section candidate
no_agent (19.172 ms) : 18979, 19365
. : milestone, 19172,
appsec (18.46 ms) : 18278, 18642
. : milestone, 18460,
code_origins (18.048 ms) : 17865, 18230
. : milestone, 18048,
iast (17.867 ms) : 17689, 18045
. : milestone, 17867,
profiling (18.437 ms) : 18253, 18620
. : milestone, 18437,
tracing (17.929 ms) : 17752, 18106
. : milestone, 17929,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section baseline
no_agent (1.274 ms) : 1262, 1286
. : milestone, 1274,
iast (3.403 ms) : 3354, 3452
. : milestone, 3403,
iast_FULL (5.908 ms) : 5849, 5968
. : milestone, 5908,
iast_GLOBAL (3.556 ms) : 3506, 3607
. : milestone, 3556,
profiling (2.155 ms) : 2135, 2175
. : milestone, 2155,
tracing (1.885 ms) : 1870, 1901
. : milestone, 1885,
section candidate
no_agent (1.274 ms) : 1262, 1287
. : milestone, 1274,
iast (3.373 ms) : 3327, 3418
. : milestone, 3373,
iast_FULL (5.98 ms) : 5919, 6040
. : milestone, 5980,
iast_GLOBAL (3.527 ms) : 3474, 3580
. : milestone, 3527,
profiling (2.243 ms) : 2222, 2265
. : milestone, 2243,
tracing (1.881 ms) : 1866, 1896
. : milestone, 1881,
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.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section baseline
no_agent (1.488 ms) : 1476, 1499
. : milestone, 1488,
appsec (3.822 ms) : 3603, 4042
. : milestone, 3822,
iast (2.275 ms) : 2206, 2345
. : milestone, 2275,
iast_GLOBAL (2.322 ms) : 2252, 2392
. : milestone, 2322,
profiling (2.525 ms) : 2360, 2690
. : milestone, 2525,
tracing (2.074 ms) : 2020, 2127
. : milestone, 2074,
section candidate
no_agent (1.488 ms) : 1476, 1500
. : milestone, 1488,
appsec (3.818 ms) : 3595, 4041
. : milestone, 3818,
iast (2.267 ms) : 2197, 2336
. : milestone, 2267,
iast_GLOBAL (2.321 ms) : 2251, 2391
. : milestone, 2321,
profiling (2.106 ms) : 2051, 2161
. : milestone, 2106,
tracing (2.084 ms) : 2031, 2137
. : milestone, 2084,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.63.0-SNAPSHOT~f550e8770a, baseline=1.63.0-SNAPSHOT~71c5da043c
dateFormat X
axisFormat %s
section baseline
no_agent (15.584 s) : 15584000, 15584000
. : milestone, 15584000,
appsec (14.695 s) : 14695000, 14695000
. : milestone, 14695000,
iast (18.87 s) : 18870000, 18870000
. : milestone, 18870000,
iast_GLOBAL (17.907 s) : 17907000, 17907000
. : milestone, 17907000,
profiling (15.5 s) : 15500000, 15500000
. : milestone, 15500000,
tracing (14.711 s) : 14711000, 14711000
. : milestone, 14711000,
section candidate
no_agent (15.511 s) : 15511000, 15511000
. : milestone, 15511000,
appsec (14.69 s) : 14690000, 14690000
. : milestone, 14690000,
iast (18.648 s) : 18648000, 18648000
. : milestone, 18648000,
iast_GLOBAL (18.089 s) : 18089000, 18089000
. : milestone, 18089000,
profiling (14.489 s) : 14489000, 14489000
. : milestone, 14489000,
tracing (14.661 s) : 14661000, 14661000
. : milestone, 14661000,
|
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
Handler span keys were previously computed by concatenating "dd.handler.span." + class name (+ ".continue") on every request. These strings are now cached in a ClassValue<Pair<String, String>> keyed by handler class, so the allocation happens once per handler type rather than once per request (those allocations was on the hot path on a classical spring boot server)
Motivation
Additional Notes
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.