-
Notifications
You must be signed in to change notification settings - Fork 312
Pool unionmap for log injection #9555
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
🎯 Code Coverage 🔗 Commit SHA: 5a47b6f | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.069 s) : 0, 1068763
Total [baseline] (10.728 s) : 0, 10727817
Agent [candidate] (1.061 s) : 0, 1060803
Total [candidate] (10.637 s) : 0, 10637383
section appsec
Agent [baseline] (1.243 s) : 0, 1242945
Total [baseline] (11.04 s) : 0, 11039793
Agent [candidate] (1.234 s) : 0, 1234065
Total [candidate] (11.106 s) : 0, 11105738
section iast
Agent [baseline] (1.192 s) : 0, 1192209
Total [baseline] (11.105 s) : 0, 11105288
Agent [candidate] (1.199 s) : 0, 1199240
Total [candidate] (11.145 s) : 0, 11144730
section profiling
Agent [baseline] (1.212 s) : 0, 1211848
Total [baseline] (10.957 s) : 0, 10956638
Agent [candidate] (1.209 s) : 0, 1208642
Total [candidate] (11.014 s) : 0, 11013894
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.476 ms) : 0, 1476
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (737.193 ms) : 0, 737193
BytebuddyAgent [candidate] (730.653 ms) : 0, 730653
GlobalTracer [baseline] (254.269 ms) : 0, 254269
GlobalTracer [candidate] (253.305 ms) : 0, 253305
AppSec [baseline] (30.891 ms) : 0, 30891
AppSec [candidate] (30.813 ms) : 0, 30813
Debugger [baseline] (6.458 ms) : 0, 6458
Debugger [candidate] (6.468 ms) : 0, 6468
Remote Config [baseline] (701.66 µs) : 0, 702
Remote Config [candidate] (696.893 µs) : 0, 697
Telemetry [baseline] (16.641 ms) : 0, 16641
Telemetry [candidate] (16.343 ms) : 0, 16343
section appsec
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.451 ms) : 0, 1451
BytebuddyAgent [baseline] (760.474 ms) : 0, 760474
BytebuddyAgent [candidate] (754.492 ms) : 0, 754492
GlobalTracer [baseline] (247.478 ms) : 0, 247478
GlobalTracer [candidate] (245.527 ms) : 0, 245527
IAST [baseline] (24.18 ms) : 0, 24180
IAST [candidate] (23.961 ms) : 0, 23961
AppSec [baseline] (172.814 ms) : 0, 172814
AppSec [candidate] (171.405 ms) : 0, 171405
Debugger [baseline] (5.988 ms) : 0, 5988
Debugger [candidate] (6.85 ms) : 0, 6850
Remote Config [baseline] (640.712 µs) : 0, 641
Remote Config [candidate] (629.128 µs) : 0, 629
Telemetry [baseline] (8.579 ms) : 0, 8579
Telemetry [candidate] (8.558 ms) : 0, 8558
section iast
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (853.872 ms) : 0, 853872
BytebuddyAgent [candidate] (858.629 ms) : 0, 858629
GlobalTracer [baseline] (244.288 ms) : 0, 244288
GlobalTracer [candidate] (244.283 ms) : 0, 244283
IAST [baseline] (31.211 ms) : 0, 31211
IAST [candidate] (30.975 ms) : 0, 30975
AppSec [baseline] (25.486 ms) : 0, 25486
AppSec [candidate] (26.635 ms) : 0, 26635
Debugger [baseline] (6.08 ms) : 0, 6080
Debugger [candidate] (6.976 ms) : 0, 6976
Remote Config [baseline] (604.351 µs) : 0, 604
Remote Config [candidate] (621.755 µs) : 0, 622
Telemetry [baseline] (8.174 ms) : 0, 8174
Telemetry [candidate] (8.453 ms) : 0, 8453
section profiling
crashtracking [baseline] (1.448 ms) : 0, 1448
crashtracking [candidate] (1.438 ms) : 0, 1438
BytebuddyAgent [baseline] (763.205 ms) : 0, 763205
BytebuddyAgent [candidate] (760.291 ms) : 0, 760291
GlobalTracer [baseline] (232.912 ms) : 0, 232912
GlobalTracer [candidate] (232.438 ms) : 0, 232438
AppSec [baseline] (30.479 ms) : 0, 30479
AppSec [candidate] (30.498 ms) : 0, 30498
Debugger [baseline] (12.044 ms) : 0, 12044
Debugger [candidate] (11.251 ms) : 0, 11251
Remote Config [baseline] (1.502 ms) : 0, 1502
Remote Config [candidate] (739.685 µs) : 0, 740
Telemetry [baseline] (10.298 ms) : 0, 10298
Telemetry [candidate] (11.849 ms) : 0, 11849
ProfilingAgent [baseline] (108.704 ms) : 0, 108704
ProfilingAgent [candidate] (108.973 ms) : 0, 108973
Profiling [baseline] (109.331 ms) : 0, 109331
Profiling [candidate] (109.62 ms) : 0, 109620
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.065 s) : 0, 1064738
Total [baseline] (8.701 s) : 0, 8700694
Agent [candidate] (1.062 s) : 0, 1061859
Total [candidate] (8.668 s) : 0, 8667656
section iast
Agent [baseline] (1.194 s) : 0, 1193783
Total [baseline] (9.322 s) : 0, 9321870
Agent [candidate] (1.19 s) : 0, 1189618
Total [candidate] (9.335 s) : 0, 9334616
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (733.839 ms) : 0, 733839
BytebuddyAgent [candidate] (732.999 ms) : 0, 732999
GlobalTracer [baseline] (253.898 ms) : 0, 253898
GlobalTracer [candidate] (252.991 ms) : 0, 252991
AppSec [baseline] (30.926 ms) : 0, 30926
AppSec [candidate] (30.811 ms) : 0, 30811
Debugger [baseline] (6.446 ms) : 0, 6446
Debugger [candidate] (6.449 ms) : 0, 6449
Remote Config [baseline] (700.588 µs) : 0, 701
Remote Config [candidate] (695.388 µs) : 0, 695
Telemetry [baseline] (16.442 ms) : 0, 16442
Telemetry [candidate] (15.461 ms) : 0, 15461
section iast
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (854.526 ms) : 0, 854526
BytebuddyAgent [candidate] (850.163 ms) : 0, 850163
GlobalTracer [baseline] (246.802 ms) : 0, 246802
GlobalTracer [candidate] (248.232 ms) : 0, 248232
AppSec [baseline] (25.406 ms) : 0, 25406
AppSec [candidate] (24.809 ms) : 0, 24809
Debugger [baseline] (6.015 ms) : 0, 6015
Debugger [candidate] (6.176 ms) : 0, 6176
Remote Config [baseline] (618.401 µs) : 0, 618
Remote Config [candidate] (612.799 µs) : 0, 613
Telemetry [baseline] (8.265 ms) : 0, 8265
Telemetry [candidate] (8.262 ms) : 0, 8262
IAST [baseline] (29.699 ms) : 0, 29699
IAST [candidate] (28.997 ms) : 0, 28997
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 0 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.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section baseline
no_agent (4.462 ms) : 4410, 4514
. : milestone, 4462,
iast (9.62 ms) : 9457, 9782
. : milestone, 9620,
iast_FULL (13.752 ms) : 13479, 14025
. : milestone, 13752,
iast_GLOBAL (10.862 ms) : 10664, 11060
. : milestone, 10862,
profiling (9.03 ms) : 8886, 9174
. : milestone, 9030,
tracing (7.759 ms) : 7649, 7870
. : milestone, 7759,
section candidate
no_agent (4.344 ms) : 4295, 4393
. : milestone, 4344,
iast (9.445 ms) : 9292, 9599
. : milestone, 9445,
iast_FULL (14.17 ms) : 13890, 14450
. : milestone, 14170,
iast_GLOBAL (10.762 ms) : 10565, 10960
. : milestone, 10762,
profiling (9.225 ms) : 9079, 9370
. : milestone, 9225,
tracing (7.426 ms) : 7322, 7530
. : milestone, 7426,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section baseline
no_agent (36.894 ms) : 36593, 37194
. : milestone, 36894,
appsec (48.2 ms) : 47793, 48606
. : milestone, 48200,
code_origins (46.393 ms) : 45977, 46809
. : milestone, 46393,
iast (46.468 ms) : 46057, 46880
. : milestone, 46468,
profiling (48.311 ms) : 47884, 48738
. : milestone, 48311,
tracing (44.653 ms) : 44257, 45049
. : milestone, 44653,
section candidate
no_agent (36.791 ms) : 36499, 37084
. : milestone, 36791,
appsec (45.832 ms) : 45436, 46228
. : milestone, 45832,
code_origins (46.099 ms) : 45705, 46492
. : milestone, 46099,
iast (45.658 ms) : 45259, 46057
. : milestone, 45658,
profiling (47.763 ms) : 47300, 48226
. : milestone, 47763,
tracing (43.193 ms) : 42833, 43552
. : milestone, 43193,
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.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section baseline
no_agent (1.482 ms) : 1470, 1493
. : milestone, 1482,
appsec (3.727 ms) : 3510, 3944
. : milestone, 3727,
iast (2.225 ms) : 2162, 2289
. : milestone, 2225,
iast_GLOBAL (2.269 ms) : 2205, 2332
. : milestone, 2269,
profiling (2.532 ms) : 2361, 2703
. : milestone, 2532,
tracing (2.037 ms) : 1988, 2087
. : milestone, 2037,
section candidate
no_agent (1.484 ms) : 1473, 1496
. : milestone, 1484,
appsec (3.782 ms) : 3563, 4002
. : milestone, 3782,
iast (2.217 ms) : 2154, 2280
. : milestone, 2217,
iast_GLOBAL (2.269 ms) : 2205, 2333
. : milestone, 2269,
profiling (2.06 ms) : 2009, 2111
. : milestone, 2060,
tracing (2.039 ms) : 1989, 2089
. : milestone, 2039,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~5a47b6fa89, baseline=1.54.0-SNAPSHOT~f44ec39f9b
dateFormat X
axisFormat %s
section baseline
no_agent (15.557 s) : 15557000, 15557000
. : milestone, 15557000,
appsec (14.851 s) : 14851000, 14851000
. : milestone, 14851000,
iast (18.457 s) : 18457000, 18457000
. : milestone, 18457000,
iast_GLOBAL (18.205 s) : 18205000, 18205000
. : milestone, 18205000,
profiling (15.464 s) : 15464000, 15464000
. : milestone, 15464000,
tracing (15.036 s) : 15036000, 15036000
. : milestone, 15036000,
section candidate
no_agent (14.921 s) : 14921000, 14921000
. : milestone, 14921000,
appsec (14.812 s) : 14812000, 14812000
. : milestone, 14812000,
iast (18.462 s) : 18462000, 18462000
. : milestone, 18462000,
iast_GLOBAL (18.215 s) : 18215000, 18215000
. : milestone, 18215000,
profiling (15.433 s) : 15433000, 15433000
. : milestone, 15433000,
tracing (14.764 s) : 14764000, 14764000
. : milestone, 14764000,
|
61f2c07
to
e60ce1a
Compare
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
private Map<K, V> secondaryMap; | ||
private transient Set<Map.Entry<K, V>> entrySet; | ||
private transient volatile boolean deduped; | ||
private static final ThreadLocal<UnionMap<?, ?>> TL = new ThreadLocal<>(); |
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.
It might make sense to just have a no-arg constructor and override ThreadLocal.initialValue.
Then you could have an init(primaryMap, secondaryMap)
I think that might read a bit better.
} | ||
|
||
@SuppressWarnings({"unchecked"}) | ||
public static <K, V> UnionMap<K, V> create(Map<K, V> primaryMap, Map<K, V> secondaryMap) { |
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 think I'd prefer some other name than create, but I'm not sure what that would be.
What Does This Do
UnionMaps are used to provide a multimap view backed on original logger's mdc.
The mdc is used to be bound to a thread locality. In recent heap dumps I noticed that we largely allocate instances of this class. Specifically wrt MDC, those objects can be pooled
Motivation
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]