-
Notifications
You must be signed in to change notification settings - Fork 324
Introducing TagMap EntryReader #10339
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
base: master
Are you sure you want to change the base?
Conversation
EntryIterator and EntryChangeIterator are arguably redundant
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~bff8837e3e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.087 s) : 0, 1086861
Total [baseline] (8.738 s) : 0, 8738481
Agent [candidate] (1.094 s) : 0, 1093728
Total [candidate] (8.796 s) : 0, 8796464
section iast
Agent [baseline] (1.232 s) : 0, 1231748
Total [baseline] (9.352 s) : 0, 9351881
Agent [candidate] (1.228 s) : 0, 1228436
Total [candidate] (9.385 s) : 0, 9384848
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~bff8837e3e
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.183 ms) : 0, 1183
crashtracking [candidate] (1.201 ms) : 0, 1201
BytebuddyAgent [baseline] (651.925 ms) : 0, 651925
BytebuddyAgent [candidate] (657.202 ms) : 0, 657202
GlobalTracer [baseline] (284.372 ms) : 0, 284372
GlobalTracer [candidate] (285.177 ms) : 0, 285177
AppSec [baseline] (32.933 ms) : 0, 32933
AppSec [candidate] (33.039 ms) : 0, 33039
Debugger [baseline] (67.408 ms) : 0, 67408
Debugger [candidate] (67.758 ms) : 0, 67758
Remote Config [baseline] (670.099 µs) : 0, 670
Remote Config [candidate] (641.799 µs) : 0, 642
Telemetry [baseline] (8.937 ms) : 0, 8937
Telemetry [candidate] (9.072 ms) : 0, 9072
Flare Poller [baseline] (3.812 ms) : 0, 3812
Flare Poller [candidate] (3.866 ms) : 0, 3866
section iast
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.2 ms) : 0, 1200
BytebuddyAgent [baseline] (796.683 ms) : 0, 796683
BytebuddyAgent [candidate] (794.875 ms) : 0, 794875
GlobalTracer [baseline] (258.192 ms) : 0, 258192
GlobalTracer [candidate] (256.878 ms) : 0, 256878
AppSec [baseline] (35.402 ms) : 0, 35402
AppSec [candidate] (33.612 ms) : 0, 33612
Debugger [baseline] (64.217 ms) : 0, 64217
Debugger [candidate] (66.323 ms) : 0, 66323
Remote Config [baseline] (600.245 µs) : 0, 600
Remote Config [candidate] (597.301 µs) : 0, 597
Telemetry [baseline] (8.695 ms) : 0, 8695
Telemetry [candidate] (8.678 ms) : 0, 8678
Flare Poller [baseline] (3.71 ms) : 0, 3710
Flare Poller [candidate] (3.68 ms) : 0, 3680
IAST [baseline] (27.316 ms) : 0, 27316
IAST [candidate] (26.957 ms) : 0, 26957
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~bff8837e3e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1088873
Total [baseline] (10.807 s) : 0, 10807041
Agent [candidate] (1.088 s) : 0, 1087836
Total [candidate] (10.763 s) : 0, 10762598
section appsec
Agent [baseline] (1.268 s) : 0, 1267821
Total [baseline] (11.014 s) : 0, 11013538
Agent [candidate] (1.267 s) : 0, 1266657
Total [candidate] (9.274 s) : 0, 9273915
section iast
Agent [baseline] (1.234 s) : 0, 1233872
Total [baseline] (11.274 s) : 0, 11274428
Agent [candidate] (1.237 s) : 0, 1236800
Total [candidate] (11.31 s) : 0, 11310288
section profiling
Agent [baseline] (1.208 s) : 0, 1207783
Total [baseline] (10.886 s) : 0, 10885615
Agent [candidate] (1.208 s) : 0, 1208269
Total [candidate] (10.931 s) : 0, 10930812
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~bff8837e3e
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (654.183 ms) : 0, 654183
BytebuddyAgent [candidate] (652.758 ms) : 0, 652758
GlobalTracer [baseline] (283.26 ms) : 0, 283260
GlobalTracer [candidate] (283.582 ms) : 0, 283582
AppSec [baseline] (32.788 ms) : 0, 32788
AppSec [candidate] (32.794 ms) : 0, 32794
Debugger [baseline] (68.186 ms) : 0, 68186
Debugger [candidate] (68.436 ms) : 0, 68436
Remote Config [baseline] (653.947 µs) : 0, 654
Remote Config [candidate] (632.31 µs) : 0, 632
Telemetry [baseline] (9.034 ms) : 0, 9034
Telemetry [candidate] (8.979 ms) : 0, 8979
Flare Poller [baseline] (3.794 ms) : 0, 3794
Flare Poller [candidate] (3.819 ms) : 0, 3819
section appsec
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.179 ms) : 0, 1179
BytebuddyAgent [baseline] (692.296 ms) : 0, 692296
BytebuddyAgent [candidate] (691.976 ms) : 0, 691976
GlobalTracer [baseline] (259.124 ms) : 0, 259124
GlobalTracer [candidate] (258.989 ms) : 0, 258989
AppSec [baseline] (174.514 ms) : 0, 174514
AppSec [candidate] (172.493 ms) : 0, 172493
Debugger [baseline] (66.78 ms) : 0, 66780
Debugger [candidate] (67.978 ms) : 0, 67978
Remote Config [baseline] (803.239 µs) : 0, 803
Remote Config [candidate] (782.913 µs) : 0, 783
Telemetry [baseline] (9.377 ms) : 0, 9377
Telemetry [candidate] (9.343 ms) : 0, 9343
Flare Poller [baseline] (3.714 ms) : 0, 3714
Flare Poller [candidate] (3.831 ms) : 0, 3831
IAST [baseline] (24.576 ms) : 0, 24576
IAST [candidate] (24.571 ms) : 0, 24571
section iast
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.2 ms) : 0, 1200
BytebuddyAgent [baseline] (798.744 ms) : 0, 798744
BytebuddyAgent [candidate] (798.918 ms) : 0, 798918
GlobalTracer [baseline] (258.272 ms) : 0, 258272
GlobalTracer [candidate] (259.469 ms) : 0, 259469
AppSec [baseline] (34.619 ms) : 0, 34619
AppSec [candidate] (34.708 ms) : 0, 34708
Debugger [baseline] (65.554 ms) : 0, 65554
Debugger [candidate] (66.606 ms) : 0, 66606
Remote Config [baseline] (575.782 µs) : 0, 576
Remote Config [candidate] (583.522 µs) : 0, 584
Telemetry [baseline] (8.514 ms) : 0, 8514
Telemetry [candidate] (8.549 ms) : 0, 8549
Flare Poller [baseline] (3.576 ms) : 0, 3576
Flare Poller [candidate] (3.645 ms) : 0, 3645
IAST [baseline] (27.154 ms) : 0, 27154
IAST [candidate] (27.354 ms) : 0, 27354
section profiling
crashtracking [baseline] (1.217 ms) : 0, 1217
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (703.308 ms) : 0, 703308
BytebuddyAgent [candidate] (702.722 ms) : 0, 702722
GlobalTracer [baseline] (221.651 ms) : 0, 221651
GlobalTracer [candidate] (221.685 ms) : 0, 221685
AppSec [baseline] (32.21 ms) : 0, 32210
AppSec [candidate] (32.084 ms) : 0, 32084
Debugger [baseline] (68.505 ms) : 0, 68505
Debugger [candidate] (68.803 ms) : 0, 68803
Remote Config [baseline] (658.846 µs) : 0, 659
Remote Config [candidate] (651.069 µs) : 0, 651
Telemetry [baseline] (9.037 ms) : 0, 9037
Telemetry [candidate] (9.027 ms) : 0, 9027
Flare Poller [baseline] (3.838 ms) : 0, 3838
Flare Poller [candidate] (3.847 ms) : 0, 3847
ProfilingAgent [baseline] (97.38 ms) : 0, 97380
ProfilingAgent [candidate] (98.237 ms) : 0, 98237
Profiling [baseline] (97.964 ms) : 0, 97964
Profiling [candidate] (98.833 ms) : 0, 98833
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 1 performance regressions! Performance is the same for 17 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~bff8837e3e
dateFormat X
axisFormat %s
section baseline
no_agent (17.821 ms) : 17635, 18006
. : milestone, 17821,
appsec (18.469 ms) : 18283, 18655
. : milestone, 18469,
code_origins (17.652 ms) : 17476, 17828
. : milestone, 17652,
iast (17.625 ms) : 17449, 17800
. : milestone, 17625,
profiling (19.698 ms) : 19499, 19896
. : milestone, 19698,
tracing (17.582 ms) : 17411, 17752
. : milestone, 17582,
section candidate
no_agent (17.572 ms) : 17398, 17745
. : milestone, 17572,
appsec (19.157 ms) : 18963, 19351
. : milestone, 19157,
code_origins (17.964 ms) : 17786, 18142
. : milestone, 17964,
iast (17.739 ms) : 17564, 17914
. : milestone, 17739,
profiling (18.423 ms) : 18240, 18606
. : milestone, 18423,
tracing (17.854 ms) : 17675, 18032
. : milestone, 17854,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~bff8837e3e
dateFormat X
axisFormat %s
section baseline
no_agent (1.191 ms) : 1179, 1203
. : milestone, 1191,
iast (3.157 ms) : 3114, 3199
. : milestone, 3157,
iast_FULL (5.849 ms) : 5790, 5907
. : milestone, 5849,
iast_GLOBAL (3.748 ms) : 3691, 3805
. : milestone, 3748,
profiling (2.064 ms) : 2045, 2084
. : milestone, 2064,
tracing (1.783 ms) : 1769, 1798
. : milestone, 1783,
section candidate
no_agent (1.185 ms) : 1174, 1197
. : milestone, 1185,
iast (3.168 ms) : 3129, 3207
. : milestone, 3168,
iast_FULL (5.837 ms) : 5779, 5896
. : milestone, 5837,
iast_GLOBAL (3.526 ms) : 3485, 3566
. : milestone, 3526,
profiling (2.021 ms) : 2003, 2038
. : milestone, 2021,
tracing (1.824 ms) : 1806, 1841
. : milestone, 1824,
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~5fadff5141, baseline=1.59.0-SNAPSHOT~1c3382de68
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (3.709 ms) : 3488, 3930
. : milestone, 3709,
iast (2.204 ms) : 2139, 2269
. : milestone, 2204,
iast_GLOBAL (2.248 ms) : 2182, 2313
. : milestone, 2248,
profiling (2.068 ms) : 2014, 2122
. : milestone, 2068,
tracing (2.037 ms) : 1986, 2089
. : milestone, 2037,
section candidate
no_agent (1.465 ms) : 1454, 1477
. : milestone, 1465,
appsec (3.704 ms) : 3486, 3923
. : milestone, 3704,
iast (2.201 ms) : 2136, 2266
. : milestone, 2201,
iast_GLOBAL (2.251 ms) : 2185, 2317
. : milestone, 2251,
profiling (2.059 ms) : 2006, 2112
. : milestone, 2059,
tracing (2.029 ms) : 1978, 2080
. : milestone, 2029,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~5fadff5141, baseline=1.59.0-SNAPSHOT~1c3382de68
dateFormat X
axisFormat %s
section baseline
no_agent (15.035 s) : 15035000, 15035000
. : milestone, 15035000,
appsec (14.462 s) : 14462000, 14462000
. : milestone, 14462000,
iast (18.154 s) : 18154000, 18154000
. : milestone, 18154000,
iast_GLOBAL (17.962 s) : 17962000, 17962000
. : milestone, 17962000,
profiling (14.895 s) : 14895000, 14895000
. : milestone, 14895000,
tracing (14.708 s) : 14708000, 14708000
. : milestone, 14708000,
section candidate
no_agent (14.967 s) : 14967000, 14967000
. : milestone, 14967000,
appsec (14.99 s) : 14990000, 14990000
. : milestone, 14990000,
iast (18.654 s) : 18654000, 18654000
. : milestone, 18654000,
iast_GLOBAL (18.048 s) : 18048000, 18048000
. : milestone, 18048000,
profiling (14.758 s) : 14758000, 14758000
. : milestone, 14758000,
tracing (14.613 s) : 14613000, 14613000
. : milestone, 14613000,
|
| * <li>adaptive collision | ||
| * </ul> | ||
| */ | ||
| public interface TagMap extends Map<String, Object>, Iterable<TagMap.Entry> { |
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.
Entry now implements EntryReader, so the updates to code using TagMap are trivial
| /** | ||
| * Visits each Entry in this TagMap This method is more efficient than {@link TagMap#iterator()} | ||
| */ | ||
| void forEach(Consumer<? super TagMap.Entry> consumer); |
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.
Entry now implements EntryReader
And since forEach is primarily used with a lambda and type inferencing, this is often source compatible with existing callers
What Does This Do
Introduces EntryReader as a low allocation means to traverse either a LegacyTagMap or an OptimizedTagMap
TagMap now extends Iterable<EntryReader> rather than Iterable<Entry>
Motivation
EntryReader provides a way to traverse a map with minimal allocation - avoiding the need to create specialized code that is optimal for each map type
In a future change, this capability will be used in the serializers to reduce overhead for OptimizedTagMap without introducing two pieces of code to maintain (one for each map)
Additional Notes
LegacyTagMap reuses a EntryReadingHelper which is updating each time the Iterator advances or the Entry changes in a forEach method. EntryReadingHelper uses TagValueConversions to help unbox / convert objects as needed.
OptimizedTagMap continues to pass the Entry object directly, since Entry objects are EntryReaders.
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]