-
Notifications
You must be signed in to change notification settings - Fork 324
Avoid primitive boxing in v0.5 serializer #10471
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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 63 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1063976
Total [baseline] (10.965 s) : 0, 10964936
Agent [candidate] (1.059 s) : 0, 1059050
Total [candidate] (10.934 s) : 0, 10934030
section appsec
Agent [baseline] (1.243 s) : 0, 1242606
Total [baseline] (10.99 s) : 0, 10990031
Agent [candidate] (1.236 s) : 0, 1236143
Total [candidate] (11.09 s) : 0, 11090494
section iast
Agent [baseline] (1.242 s) : 0, 1241612
Total [baseline] (11.22 s) : 0, 11220059
Agent [candidate] (1.238 s) : 0, 1237697
Total [candidate] (11.222 s) : 0, 11222413
section profiling
Agent [baseline] (1.185 s) : 0, 1184610
Total [baseline] (10.886 s) : 0, 10886038
Agent [candidate] (1.186 s) : 0, 1185918
Total [candidate] (10.941 s) : 0, 10940687
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.185 ms) : 0, 1185
BytebuddyAgent [baseline] (627.33 ms) : 0, 627330
BytebuddyAgent [candidate] (623.491 ms) : 0, 623491
AgentMeter [baseline] (28.946 ms) : 0, 28946
AgentMeter [candidate] (28.681 ms) : 0, 28681
GlobalTracer [baseline] (258.997 ms) : 0, 258997
GlobalTracer [candidate] (257.492 ms) : 0, 257492
AppSec [baseline] (33.255 ms) : 0, 33255
AppSec [candidate] (32.891 ms) : 0, 32891
Debugger [baseline] (62.615 ms) : 0, 62615
Debugger [candidate] (63.865 ms) : 0, 63865
Remote Config [baseline] (616.471 µs) : 0, 616
Remote Config [candidate] (602.46 µs) : 0, 602
Telemetry [baseline] (10.016 ms) : 0, 10016
Telemetry [candidate] (9.199 ms) : 0, 9199
Flare Poller [baseline] (5.371 ms) : 0, 5371
Flare Poller [candidate] (6.115 ms) : 0, 6115
section appsec
crashtracking [baseline] (1.188 ms) : 0, 1188
crashtracking [candidate] (1.189 ms) : 0, 1189
BytebuddyAgent [baseline] (656.701 ms) : 0, 656701
BytebuddyAgent [candidate] (653.581 ms) : 0, 653581
AgentMeter [baseline] (11.962 ms) : 0, 11962
AgentMeter [candidate] (11.888 ms) : 0, 11888
GlobalTracer [baseline] (260.045 ms) : 0, 260045
GlobalTracer [candidate] (258.399 ms) : 0, 258399
AppSec [baseline] (169.114 ms) : 0, 169114
AppSec [candidate] (168.14 ms) : 0, 168140
Debugger [baseline] (68.413 ms) : 0, 68413
Debugger [candidate] (68.22 ms) : 0, 68220
Remote Config [baseline] (662.457 µs) : 0, 662
Remote Config [candidate] (666.626 µs) : 0, 667
Telemetry [baseline] (9.312 ms) : 0, 9312
Telemetry [candidate] (9.466 ms) : 0, 9466
Flare Poller [baseline] (3.739 ms) : 0, 3739
Flare Poller [candidate] (3.738 ms) : 0, 3738
IAST [baseline] (26.043 ms) : 0, 26043
IAST [candidate] (25.495 ms) : 0, 25495
section iast
crashtracking [baseline] (1.206 ms) : 0, 1206
crashtracking [candidate] (1.194 ms) : 0, 1194
BytebuddyAgent [baseline] (803.062 ms) : 0, 803062
BytebuddyAgent [candidate] (796.939 ms) : 0, 796939
AgentMeter [baseline] (11.776 ms) : 0, 11776
AgentMeter [candidate] (11.483 ms) : 0, 11483
GlobalTracer [baseline] (249.784 ms) : 0, 249784
GlobalTracer [candidate] (250.296 ms) : 0, 250296
AppSec [baseline] (35.37 ms) : 0, 35370
AppSec [candidate] (36.005 ms) : 0, 36005
Debugger [baseline] (65.075 ms) : 0, 65075
Debugger [candidate] (65.982 ms) : 0, 65982
Remote Config [baseline] (558.262 µs) : 0, 558
Remote Config [candidate] (560.904 µs) : 0, 561
Telemetry [baseline] (8.672 ms) : 0, 8672
Telemetry [candidate] (8.837 ms) : 0, 8837
Flare Poller [baseline] (3.513 ms) : 0, 3513
Flare Poller [candidate] (3.563 ms) : 0, 3563
IAST [baseline] (26.89 ms) : 0, 26890
IAST [candidate] (27.186 ms) : 0, 27186
section profiling
ProfilingAgent [baseline] (98.588 ms) : 0, 98588
ProfilingAgent [candidate] (99.262 ms) : 0, 99262
crashtracking [baseline] (1.216 ms) : 0, 1216
crashtracking [candidate] (1.214 ms) : 0, 1214
BytebuddyAgent [baseline] (676.82 ms) : 0, 676820
BytebuddyAgent [candidate] (676.952 ms) : 0, 676952
AgentMeter [baseline] (8.64 ms) : 0, 8640
AgentMeter [candidate] (8.664 ms) : 0, 8664
GlobalTracer [baseline] (216.638 ms) : 0, 216638
GlobalTracer [candidate] (216.764 ms) : 0, 216764
AppSec [baseline] (32.122 ms) : 0, 32122
AppSec [candidate] (32.196 ms) : 0, 32196
Debugger [baseline] (67.666 ms) : 0, 67666
Debugger [candidate] (67.869 ms) : 0, 67869
Remote Config [baseline] (583.75 µs) : 0, 584
Remote Config [candidate] (588.788 µs) : 0, 589
Telemetry [baseline] (8.745 ms) : 0, 8745
Telemetry [candidate] (8.72 ms) : 0, 8720
Flare Poller [baseline] (3.746 ms) : 0, 3746
Flare Poller [candidate] (3.746 ms) : 0, 3746
Profiling [baseline] (99.155 ms) : 0, 99155
Profiling [candidate] (99.861 ms) : 0, 99861
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056798
Total [baseline] (8.703 s) : 0, 8703381
Agent [candidate] (1.061 s) : 0, 1060811
Total [candidate] (8.713 s) : 0, 8713226
section iast
Agent [baseline] (1.226 s) : 0, 1225541
Total [baseline] (9.385 s) : 0, 9385182
Agent [candidate] (1.231 s) : 0, 1231398
Total [candidate] (9.397 s) : 0, 9396912
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (621.745 ms) : 0, 621745
BytebuddyAgent [candidate] (625.563 ms) : 0, 625563
AgentMeter [baseline] (28.603 ms) : 0, 28603
AgentMeter [candidate] (28.725 ms) : 0, 28725
GlobalTracer [baseline] (256.753 ms) : 0, 256753
GlobalTracer [candidate] (257.957 ms) : 0, 257957
AppSec [baseline] (32.719 ms) : 0, 32719
AppSec [candidate] (32.873 ms) : 0, 32873
Debugger [baseline] (62.234 ms) : 0, 62234
Debugger [candidate] (62.488 ms) : 0, 62488
Remote Config [baseline] (597.118 µs) : 0, 597
Remote Config [candidate] (599.725 µs) : 0, 600
Telemetry [baseline] (10.603 ms) : 0, 10603
Telemetry [candidate] (9.826 ms) : 0, 9826
Flare Poller [baseline] (6.899 ms) : 0, 6899
Flare Poller [candidate] (6.062 ms) : 0, 6062
section iast
crashtracking [baseline] (1.176 ms) : 0, 1176
crashtracking [candidate] (1.208 ms) : 0, 1208
BytebuddyAgent [baseline] (790.547 ms) : 0, 790547
BytebuddyAgent [candidate] (795.69 ms) : 0, 795690
AgentMeter [baseline] (11.168 ms) : 0, 11168
AgentMeter [candidate] (11.162 ms) : 0, 11162
GlobalTracer [baseline] (247.933 ms) : 0, 247933
GlobalTracer [candidate] (247.772 ms) : 0, 247772
IAST [baseline] (26.833 ms) : 0, 26833
IAST [candidate] (26.763 ms) : 0, 26763
AppSec [baseline] (33.15 ms) : 0, 33150
AppSec [candidate] (34.844 ms) : 0, 34844
Debugger [baseline] (66.934 ms) : 0, 66934
Debugger [candidate] (65.596 ms) : 0, 65596
Remote Config [baseline] (541.999 µs) : 0, 542
Remote Config [candidate] (548.986 µs) : 0, 549
Telemetry [baseline] (8.451 ms) : 0, 8451
Telemetry [candidate] (8.667 ms) : 0, 8667
Flare Poller [baseline] (3.457 ms) : 0, 3457
Flare Poller [candidate] (3.56 ms) : 0, 3560
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 17 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section baseline
no_agent (1.203 ms) : 1191, 1215
. : milestone, 1203,
iast (3.211 ms) : 3167, 3256
. : milestone, 3211,
iast_FULL (5.71 ms) : 5653, 5766
. : milestone, 5710,
iast_GLOBAL (3.39 ms) : 3338, 3441
. : milestone, 3390,
profiling (2.172 ms) : 2153, 2191
. : milestone, 2172,
tracing (1.847 ms) : 1830, 1864
. : milestone, 1847,
section candidate
no_agent (1.177 ms) : 1166, 1189
. : milestone, 1177,
iast (3.294 ms) : 3247, 3341
. : milestone, 3294,
iast_FULL (5.969 ms) : 5909, 6029
. : milestone, 5969,
iast_GLOBAL (3.516 ms) : 3465, 3568
. : milestone, 3516,
profiling (2.328 ms) : 2304, 2353
. : milestone, 2328,
tracing (1.824 ms) : 1808, 1839
. : milestone, 1824,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section baseline
no_agent (18.37 ms) : 18179, 18561
. : milestone, 18370,
appsec (18.296 ms) : 18109, 18484
. : milestone, 18296,
code_origins (17.67 ms) : 17492, 17848
. : milestone, 17670,
iast (17.598 ms) : 17423, 17772
. : milestone, 17598,
profiling (18.684 ms) : 18497, 18872
. : milestone, 18684,
tracing (17.798 ms) : 17623, 17974
. : milestone, 17798,
section candidate
no_agent (18.259 ms) : 18068, 18450
. : milestone, 18259,
appsec (18.734 ms) : 18542, 18925
. : milestone, 18734,
code_origins (17.788 ms) : 17609, 17966
. : milestone, 17788,
iast (18.061 ms) : 17879, 18244
. : milestone, 18061,
profiling (18.866 ms) : 18674, 19057
. : milestone, 18866,
tracing (17.844 ms) : 17669, 18020
. : milestone, 17844,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (3.792 ms) : 3568, 4015
. : milestone, 3792,
iast (2.26 ms) : 2190, 2329
. : milestone, 2260,
iast_GLOBAL (2.308 ms) : 2237, 2378
. : milestone, 2308,
profiling (2.088 ms) : 2033, 2144
. : milestone, 2088,
tracing (2.064 ms) : 2010, 2118
. : milestone, 2064,
section candidate
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (3.795 ms) : 3571, 4018
. : milestone, 3795,
iast (2.26 ms) : 2190, 2329
. : milestone, 2260,
iast_GLOBAL (2.304 ms) : 2234, 2374
. : milestone, 2304,
profiling (2.09 ms) : 2034, 2146
. : milestone, 2090,
tracing (2.079 ms) : 2024, 2133
. : milestone, 2079,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~955fa92a61, baseline=1.59.0-SNAPSHOT~02cc48359b
dateFormat X
axisFormat %s
section baseline
no_agent (15.624 s) : 15624000, 15624000
. : milestone, 15624000,
appsec (14.892 s) : 14892000, 14892000
. : milestone, 14892000,
iast (18.172 s) : 18172000, 18172000
. : milestone, 18172000,
iast_GLOBAL (17.637 s) : 17637000, 17637000
. : milestone, 17637000,
profiling (15.084 s) : 15084000, 15084000
. : milestone, 15084000,
tracing (14.827 s) : 14827000, 14827000
. : milestone, 14827000,
section candidate
no_agent (14.951 s) : 14951000, 14951000
. : milestone, 14951000,
appsec (15.061 s) : 15061000, 15061000
. : milestone, 15061000,
iast (18.492 s) : 18492000, 18492000
. : milestone, 18492000,
iast_GLOBAL (17.585 s) : 17585000, 17585000
. : milestone, 17585000,
profiling (15.461 s) : 15461000, 15461000
. : milestone, 15461000,
tracing (14.652 s) : 14652000, 14652000
. : milestone, 14652000,
|
| String key = entry.getKey(); | ||
| Object value = entry.getValue(); | ||
|
|
||
| for (TagMap.EntryReader entry : tags) { |
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.
Unlike v0.4 for now, I opted not to use TagMap.forEach for these loops.
That was done because the inner classes of v05 make the change a bit messier.
forEach would still be preferable, since it faster and incurs less allocation for OptimizedTagMap. I will likely revisit this in a future PR.
But for now, these changes make v0.5 on par or better than v0.4 in load tests.
| * @param map map to traverse | ||
| * @return number of all elements in the tree | ||
| */ | ||
| private int getFlatMapSize(Map<String, Object> map) { |
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.
why the visibility changed?
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.
I prefer not to introduce synthetic accessors, so I tend to make things package visible.
What Does This Do
Uses the new EntryReader API to avoid boxing primitives during serialization
Motivation
Reduces allocation making garbage collection less frequent
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]