-
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: e94561b | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.015 s) : 0, 1014696
Total [baseline] (8.598 s) : 0, 8597901
Agent [candidate] (1.014 s) : 0, 1014438
Total [candidate] (8.66 s) : 0, 8659593
section iast
Agent [baseline] (1.147 s) : 0, 1147037
Total [baseline] (9.213 s) : 0, 9213452
Agent [candidate] (1.148 s) : 0, 1147688
Total [candidate] (9.213 s) : 0, 9213199
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (690.684 ms) : 0, 690684
BytebuddyAgent [candidate] (690.284 ms) : 0, 690284
GlobalTracer [baseline] (242.983 ms) : 0, 242983
GlobalTracer [candidate] (243.172 ms) : 0, 243172
AppSec [baseline] (31.277 ms) : 0, 31277
AppSec [candidate] (31.456 ms) : 0, 31456
Debugger [baseline] (6.365 ms) : 0, 6365
Debugger [candidate] (6.368 ms) : 0, 6368
Remote Config [baseline] (674.102 µs) : 0, 674
Remote Config [candidate] (667.576 µs) : 0, 668
Telemetry [baseline] (9.085 ms) : 0, 9085
Telemetry [candidate] (9.15 ms) : 0, 9150
Flare Poller [baseline] (11.199 ms) : 0, 11199
Flare Poller [candidate] (10.787 ms) : 0, 10787
section iast
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (812.375 ms) : 0, 812375
BytebuddyAgent [candidate] (812.284 ms) : 0, 812284
GlobalTracer [baseline] (232.729 ms) : 0, 232729
GlobalTracer [candidate] (232.288 ms) : 0, 232288
IAST [baseline] (26.28 ms) : 0, 26280
IAST [candidate] (26.782 ms) : 0, 26782
AppSec [baseline] (33.856 ms) : 0, 33856
AppSec [candidate] (34.101 ms) : 0, 34101
Debugger [baseline] (6.036 ms) : 0, 6036
Debugger [candidate] (6.118 ms) : 0, 6118
Remote Config [baseline] (586.25 µs) : 0, 586
Remote Config [candidate] (587.869 µs) : 0, 588
Telemetry [baseline] (8.162 ms) : 0, 8162
Telemetry [candidate] (8.348 ms) : 0, 8348
Flare Poller [baseline] (4.24 ms) : 0, 4240
Flare Poller [candidate] (4.266 ms) : 0, 4266
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.028 s) : 0, 1027766
Total [baseline] (10.789 s) : 0, 10789137
Agent [candidate] (1.021 s) : 0, 1021131
Total [candidate] (10.679 s) : 0, 10679275
section appsec
Agent [baseline] (1.197 s) : 0, 1197377
Total [baseline] (11.071 s) : 0, 11070523
Agent [candidate] (1.188 s) : 0, 1187926
Total [candidate] (11.009 s) : 0, 11008756
section iast
Agent [baseline] (1.149 s) : 0, 1149039
Total [baseline] (10.873 s) : 0, 10873000
Agent [candidate] (1.147 s) : 0, 1146704
Total [candidate] (10.951 s) : 0, 10950580
section profiling
Agent [baseline] (1.166 s) : 0, 1165735
Total [baseline] (11.158 s) : 0, 11158138
Agent [candidate] (1.156 s) : 0, 1156371
Total [candidate] (11.009 s) : 0, 11009126
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.49 ms) : 0, 1490
crashtracking [candidate] (1.474 ms) : 0, 1474
BytebuddyAgent [baseline] (700.729 ms) : 0, 700729
BytebuddyAgent [candidate] (694.319 ms) : 0, 694319
GlobalTracer [baseline] (246.019 ms) : 0, 246019
GlobalTracer [candidate] (244.451 ms) : 0, 244451
AppSec [baseline] (31.741 ms) : 0, 31741
AppSec [candidate] (31.732 ms) : 0, 31732
Debugger [baseline] (6.49 ms) : 0, 6490
Debugger [candidate] (6.435 ms) : 0, 6435
Remote Config [baseline] (687.37 µs) : 0, 687
Remote Config [candidate] (697.507 µs) : 0, 698
Telemetry [baseline] (9.136 ms) : 0, 9136
Telemetry [candidate] (9.09 ms) : 0, 9090
Flare Poller [baseline] (10.124 ms) : 0, 10124
Flare Poller [candidate] (11.736 ms) : 0, 11736
section appsec
crashtracking [baseline] (1.475 ms) : 0, 1475
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (721.583 ms) : 0, 721583
BytebuddyAgent [candidate] (714.569 ms) : 0, 714569
GlobalTracer [baseline] (236.291 ms) : 0, 236291
GlobalTracer [candidate] (234.443 ms) : 0, 234443
IAST [baseline] (25.007 ms) : 0, 25007
IAST [candidate] (24.829 ms) : 0, 24829
AppSec [baseline] (172.118 ms) : 0, 172118
AppSec [candidate] (171.838 ms) : 0, 171838
Debugger [baseline] (6.037 ms) : 0, 6037
Debugger [candidate] (6.039 ms) : 0, 6039
Remote Config [baseline] (629.752 µs) : 0, 630
Remote Config [candidate] (636.042 µs) : 0, 636
Telemetry [baseline] (8.977 ms) : 0, 8977
Telemetry [candidate] (9.042 ms) : 0, 9042
Flare Poller [baseline] (3.988 ms) : 0, 3988
Flare Poller [candidate] (4.034 ms) : 0, 4034
section iast
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (813.956 ms) : 0, 813956
BytebuddyAgent [candidate] (813.147 ms) : 0, 813147
GlobalTracer [baseline] (232.956 ms) : 0, 232956
GlobalTracer [candidate] (231.708 ms) : 0, 231708
IAST [baseline] (26.059 ms) : 0, 26059
IAST [candidate] (26.041 ms) : 0, 26041
AppSec [baseline] (34.089 ms) : 0, 34089
AppSec [candidate] (33.79 ms) : 0, 33790
Debugger [baseline] (5.988 ms) : 0, 5988
Debugger [candidate] (6.021 ms) : 0, 6021
Remote Config [baseline] (588.815 µs) : 0, 589
Remote Config [candidate] (579.424 µs) : 0, 579
Telemetry [baseline] (8.178 ms) : 0, 8178
Telemetry [candidate] (8.22 ms) : 0, 8220
Flare Poller [baseline] (4.181 ms) : 0, 4181
Flare Poller [candidate] (4.291 ms) : 0, 4291
section profiling
crashtracking [baseline] (1.457 ms) : 0, 1457
crashtracking [candidate] (1.426 ms) : 0, 1426
BytebuddyAgent [baseline] (726.421 ms) : 0, 726421
BytebuddyAgent [candidate] (720.52 ms) : 0, 720520
GlobalTracer [baseline] (219.737 ms) : 0, 219737
GlobalTracer [candidate] (218.219 ms) : 0, 218219
AppSec [baseline] (31.925 ms) : 0, 31925
AppSec [candidate] (31.432 ms) : 0, 31432
Debugger [baseline] (6.564 ms) : 0, 6564
Debugger [candidate] (7.292 ms) : 0, 7292
Remote Config [baseline] (731.47 µs) : 0, 731
Remote Config [candidate] (758.903 µs) : 0, 759
Telemetry [baseline] (16.086 ms) : 0, 16086
Telemetry [candidate] (15.529 ms) : 0, 15529
Flare Poller [baseline] (4.994 ms) : 0, 4994
Flare Poller [candidate] (4.253 ms) : 0, 4253
ProfilingAgent [baseline] (104.869 ms) : 0, 104869
ProfilingAgent [candidate] (104.414 ms) : 0, 104414
Profiling [baseline] (105.456 ms) : 0, 105456
Profiling [candidate] (105.0 ms) : 0, 105000
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 5 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (4.382 ms) : 4322, 4442
. : milestone, 4382,
iast (10.155 ms) : 9984, 10325
. : milestone, 10155,
iast_FULL (14.014 ms) : 13742, 14287
. : milestone, 14014,
iast_GLOBAL (10.937 ms) : 10741, 11132
. : milestone, 10937,
profiling (8.846 ms) : 8696, 8996
. : milestone, 8846,
tracing (7.716 ms) : 7605, 7826
. : milestone, 7716,
section candidate
no_agent (4.311 ms) : 4262, 4361
. : milestone, 4311,
iast (10.4 ms) : 10220, 10580
. : milestone, 10400,
iast_FULL (14.597 ms) : 14315, 14880
. : milestone, 14597,
iast_GLOBAL (11.479 ms) : 11275, 11682
. : milestone, 11479,
profiling (8.725 ms) : 8595, 8856
. : milestone, 8725,
tracing (7.687 ms) : 7578, 7795
. : milestone, 7687,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (37.201 ms) : 36899, 37504
. : milestone, 37201,
appsec (47.96 ms) : 47536, 48383
. : milestone, 47960,
code_origins (45.836 ms) : 45426, 46247
. : milestone, 45836,
iast (45.028 ms) : 44628, 45427
. : milestone, 45028,
profiling (48.56 ms) : 48105, 49016
. : milestone, 48560,
tracing (46.049 ms) : 45654, 46445
. : milestone, 46049,
section candidate
no_agent (38.75 ms) : 38424, 39076
. : milestone, 38750,
appsec (50.886 ms) : 50427, 51344
. : milestone, 50886,
code_origins (44.608 ms) : 44216, 44999
. : milestone, 44608,
iast (45.118 ms) : 44737, 45498
. : milestone, 45118,
profiling (50.836 ms) : 50316, 51356
. : milestone, 50836,
tracing (44.4 ms) : 44016, 44785
. : milestone, 44400,
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.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (3.636 ms) : 3425, 3847
. : milestone, 3636,
iast (2.202 ms) : 2138, 2265
. : milestone, 2202,
iast_GLOBAL (2.244 ms) : 2180, 2308
. : milestone, 2244,
profiling (2.065 ms) : 2012, 2118
. : milestone, 2065,
tracing (2.016 ms) : 1967, 2065
. : milestone, 2016,
section candidate
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (3.657 ms) : 3443, 3871
. : milestone, 3657,
iast (2.204 ms) : 2140, 2267
. : milestone, 2204,
iast_GLOBAL (2.241 ms) : 2178, 2305
. : milestone, 2241,
profiling (2.063 ms) : 2011, 2116
. : milestone, 2063,
tracing (2.024 ms) : 1975, 2074
. : milestone, 2024,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~e94561b73a, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (15.001 s) : 15001000, 15001000
. : milestone, 15001000,
appsec (15.067 s) : 15067000, 15067000
. : milestone, 15067000,
iast (18.531 s) : 18531000, 18531000
. : milestone, 18531000,
iast_GLOBAL (18.165 s) : 18165000, 18165000
. : milestone, 18165000,
profiling (15.44 s) : 15440000, 15440000
. : milestone, 15440000,
tracing (15.3 s) : 15300000, 15300000
. : milestone, 15300000,
section candidate
no_agent (15.21 s) : 15210000, 15210000
. : milestone, 15210000,
appsec (15.25 s) : 15250000, 15250000
. : milestone, 15250000,
iast (18.631 s) : 18631000, 18631000
. : milestone, 18631000,
iast_GLOBAL (17.957 s) : 17957000, 17957000
. : milestone, 17957000,
profiling (15.474 s) : 15474000, 15474000
. : milestone, 15474000,
tracing (15.125 s) : 15125000, 15125000
. : milestone, 15125000,
|
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. |
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/log/UnionMap.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
@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.
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 changed to obtain
. It looks not so bad for this kind of action
5a47b6f
to
4fb3661
Compare
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]