-
Notifications
You must be signed in to change notification settings - Fork 314
WIP: Replace weak-map per context store with a single global weak-map #9749
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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 4 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.017 s) : 0, 1017325
Total [baseline] (10.771 s) : 0, 10771008
Agent [candidate] (1.019 s) : 0, 1019224
Total [candidate] (10.714 s) : 0, 10713550
section appsec
Agent [baseline] (1.194 s) : 0, 1193903
Total [baseline] (11.013 s) : 0, 11013226
Agent [candidate] (1.19 s) : 0, 1190011
Total [candidate] (11.121 s) : 0, 11120560
section iast
Agent [baseline] (1.156 s) : 0, 1155713
Total [baseline] (11.015 s) : 0, 11014728
Agent [candidate] (1.158 s) : 0, 1157527
Total [candidate] (11.079 s) : 0, 11079484
section profiling
Agent [baseline] (1.162 s) : 0, 1162409
Total [baseline] (11.071 s) : 0, 11071476
Agent [candidate] (1.161 s) : 0, 1160876
Total [candidate] (11.035 s) : 0, 11034833
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.495 ms) : 0, 1495
crashtracking [candidate] (1.472 ms) : 0, 1472
BytebuddyAgent [baseline] (692.846 ms) : 0, 692846
BytebuddyAgent [candidate] (693.289 ms) : 0, 693289
GlobalTracer [baseline] (241.92 ms) : 0, 241920
GlobalTracer [candidate] (243.388 ms) : 0, 243388
AppSec [baseline] (32.454 ms) : 0, 32454
AppSec [candidate] (32.518 ms) : 0, 32518
Debugger [baseline] (6.42 ms) : 0, 6420
Debugger [candidate] (6.473 ms) : 0, 6473
Remote Config [baseline] (705.421 µs) : 0, 705
Remote Config [candidate] (698.181 µs) : 0, 698
Telemetry [baseline] (9.436 ms) : 0, 9436
Telemetry [candidate] (9.292 ms) : 0, 9292
Flare Poller [baseline] (10.867 ms) : 0, 10867
Flare Poller [candidate] (10.813 ms) : 0, 10813
section appsec
crashtracking [baseline] (1.473 ms) : 0, 1473
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (717.135 ms) : 0, 717135
BytebuddyAgent [candidate] (713.944 ms) : 0, 713944
GlobalTracer [baseline] (234.356 ms) : 0, 234356
GlobalTracer [candidate] (233.123 ms) : 0, 233123
IAST [baseline] (24.747 ms) : 0, 24747
IAST [candidate] (24.683 ms) : 0, 24683
AppSec [baseline] (175.013 ms) : 0, 175013
AppSec [candidate] (176.526 ms) : 0, 176526
Debugger [baseline] (6.147 ms) : 0, 6147
Debugger [candidate] (6.129 ms) : 0, 6129
Remote Config [baseline] (638.818 µs) : 0, 639
Remote Config [candidate] (631.441 µs) : 0, 631
Telemetry [baseline] (9.313 ms) : 0, 9313
Telemetry [candidate] (8.491 ms) : 0, 8491
Flare Poller [baseline] (3.966 ms) : 0, 3966
Flare Poller [candidate] (3.993 ms) : 0, 3993
section iast
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.479 ms) : 0, 1479
BytebuddyAgent [baseline] (817.395 ms) : 0, 817395
BytebuddyAgent [candidate] (820.521 ms) : 0, 820521
GlobalTracer [baseline] (232.86 ms) : 0, 232860
GlobalTracer [candidate] (232.615 ms) : 0, 232615
IAST [baseline] (26.799 ms) : 0, 26799
IAST [candidate] (26.556 ms) : 0, 26556
AppSec [baseline] (35.585 ms) : 0, 35585
AppSec [candidate] (35.314 ms) : 0, 35314
Debugger [baseline] (6.221 ms) : 0, 6221
Debugger [candidate] (6.122 ms) : 0, 6122
Remote Config [baseline] (644.021 µs) : 0, 644
Remote Config [candidate] (602.028 µs) : 0, 602
Telemetry [baseline] (8.846 ms) : 0, 8846
Telemetry [candidate] (8.623 ms) : 0, 8623
Flare Poller [baseline] (4.225 ms) : 0, 4225
Flare Poller [candidate] (4.218 ms) : 0, 4218
section profiling
crashtracking [baseline] (1.438 ms) : 0, 1438
crashtracking [candidate] (1.438 ms) : 0, 1438
BytebuddyAgent [baseline] (721.338 ms) : 0, 721338
BytebuddyAgent [candidate] (721.315 ms) : 0, 721315
GlobalTracer [baseline] (217.873 ms) : 0, 217873
GlobalTracer [candidate] (217.869 ms) : 0, 217869
AppSec [baseline] (32.388 ms) : 0, 32388
AppSec [candidate] (32.32 ms) : 0, 32320
Debugger [baseline] (6.491 ms) : 0, 6491
Debugger [candidate] (6.573 ms) : 0, 6573
Remote Config [baseline] (757.134 µs) : 0, 757
Remote Config [candidate] (809.318 µs) : 0, 809
Telemetry [baseline] (16.213 ms) : 0, 16213
Telemetry [candidate] (16.136 ms) : 0, 16136
Flare Poller [baseline] (4.147 ms) : 0, 4147
Flare Poller [candidate] (4.149 ms) : 0, 4149
ProfilingAgent [baseline] (108.672 ms) : 0, 108672
ProfilingAgent [candidate] (106.895 ms) : 0, 106895
Profiling [baseline] (109.664 ms) : 0, 109664
Profiling [candidate] (108.152 ms) : 0, 108152
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.016 s) : 0, 1015771
Total [baseline] (8.668 s) : 0, 8667707
Agent [candidate] (1.024 s) : 0, 1024135
Total [candidate] (8.696 s) : 0, 8696482
section iast
Agent [baseline] (1.149 s) : 0, 1148634
Total [baseline] (9.282 s) : 0, 9281563
Agent [candidate] (1.159 s) : 0, 1158537
Total [candidate] (9.282 s) : 0, 9281807
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.478 ms) : 0, 1478
BytebuddyAgent [baseline] (690.861 ms) : 0, 690861
BytebuddyAgent [candidate] (698.549 ms) : 0, 698549
GlobalTracer [baseline] (241.485 ms) : 0, 241485
GlobalTracer [candidate] (242.786 ms) : 0, 242786
AppSec [baseline] (32.347 ms) : 0, 32347
AppSec [candidate] (32.079 ms) : 0, 32079
Debugger [baseline] (6.394 ms) : 0, 6394
Debugger [candidate] (6.401 ms) : 0, 6401
Remote Config [baseline] (712.064 µs) : 0, 712
Remote Config [candidate] (706.787 µs) : 0, 707
Telemetry [baseline] (9.375 ms) : 0, 9375
Telemetry [candidate] (9.269 ms) : 0, 9269
Flare Poller [baseline] (11.929 ms) : 0, 11929
Flare Poller [candidate] (11.638 ms) : 0, 11638
section iast
crashtracking [baseline] (1.491 ms) : 0, 1491
crashtracking [candidate] (1.503 ms) : 0, 1503
BytebuddyAgent [baseline] (813.58 ms) : 0, 813580
BytebuddyAgent [candidate] (820.955 ms) : 0, 820955
GlobalTracer [baseline] (230.912 ms) : 0, 230912
GlobalTracer [candidate] (232.613 ms) : 0, 232613
IAST [baseline] (26.448 ms) : 0, 26448
IAST [candidate] (26.757 ms) : 0, 26757
AppSec [baseline] (34.858 ms) : 0, 34858
AppSec [candidate] (35.402 ms) : 0, 35402
Debugger [baseline] (6.18 ms) : 0, 6180
Debugger [candidate] (6.181 ms) : 0, 6181
Remote Config [baseline] (613.428 µs) : 0, 613
Remote Config [candidate] (623.027 µs) : 0, 623
Telemetry [baseline] (8.737 ms) : 0, 8737
Telemetry [candidate] (8.699 ms) : 0, 8699
Flare Poller [baseline] (4.234 ms) : 0, 4234
Flare Poller [candidate] (4.292 ms) : 0, 4292
LoadParameters
See matching parameters
SummaryFound 4 performance improvements and 3 performance regressions! Performance is the same for 5 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section baseline
no_agent (4.459 ms) : 4405, 4512
. : milestone, 4459,
iast (9.904 ms) : 9737, 10071
. : milestone, 9904,
iast_FULL (15.826 ms) : 15512, 16140
. : milestone, 15826,
iast_GLOBAL (11.098 ms) : 10899, 11296
. : milestone, 11098,
profiling (8.497 ms) : 8367, 8628
. : milestone, 8497,
tracing (7.936 ms) : 7821, 8050
. : milestone, 7936,
section candidate
no_agent (4.29 ms) : 4243, 4337
. : milestone, 4290,
iast (10.108 ms) : 9938, 10277
. : milestone, 10108,
iast_FULL (14.035 ms) : 13761, 14310
. : milestone, 14035,
iast_GLOBAL (10.745 ms) : 10556, 10935
. : milestone, 10745,
profiling (8.818 ms) : 8683, 8952
. : milestone, 8818,
tracing (7.584 ms) : 7477, 7691
. : milestone, 7584,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section baseline
no_agent (35.894 ms) : 35612, 36177
. : milestone, 35894,
appsec (49.029 ms) : 48580, 49478
. : milestone, 49029,
code_origins (45.336 ms) : 44956, 45716
. : milestone, 45336,
iast (44.468 ms) : 44093, 44844
. : milestone, 44468,
profiling (46.923 ms) : 46487, 47359
. : milestone, 46923,
tracing (44.239 ms) : 43846, 44632
. : milestone, 44239,
section candidate
no_agent (37.096 ms) : 36797, 37396
. : milestone, 37096,
appsec (49.72 ms) : 49249, 50191
. : milestone, 49720,
code_origins (41.556 ms) : 41203, 41908
. : milestone, 41556,
iast (44.386 ms) : 44009, 44763
. : milestone, 44386,
profiling (48.523 ms) : 48092, 48955
. : milestone, 48523,
tracing (44.417 ms) : 44033, 44800
. : milestone, 44417,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section baseline
no_agent (15.596 s) : 15596000, 15596000
. : milestone, 15596000,
appsec (15.043 s) : 15043000, 15043000
. : milestone, 15043000,
iast (18.511 s) : 18511000, 18511000
. : milestone, 18511000,
iast_GLOBAL (18.169 s) : 18169000, 18169000
. : milestone, 18169000,
profiling (15.272 s) : 15272000, 15272000
. : milestone, 15272000,
tracing (14.947 s) : 14947000, 14947000
. : milestone, 14947000,
section candidate
no_agent (15.641 s) : 15641000, 15641000
. : milestone, 15641000,
appsec (14.846 s) : 14846000, 14846000
. : milestone, 14846000,
iast (18.262 s) : 18262000, 18262000
. : milestone, 18262000,
iast_GLOBAL (17.711 s) : 17711000, 17711000
. : milestone, 17711000,
profiling (15.197 s) : 15197000, 15197000
. : milestone, 15197000,
tracing (15.08 s) : 15080000, 15080000
. : milestone, 15080000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~789a9969a4, baseline=1.55.0-SNAPSHOT~4f6f6b0d56
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (3.632 ms) : 3418, 3846
. : milestone, 3632,
iast (2.202 ms) : 2138, 2266
. : milestone, 2202,
iast_GLOBAL (2.264 ms) : 2199, 2329
. : milestone, 2264,
profiling (2.072 ms) : 2019, 2125
. : milestone, 2072,
tracing (2.02 ms) : 1970, 2070
. : milestone, 2020,
section candidate
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (3.734 ms) : 3516, 3951
. : milestone, 3734,
iast (2.203 ms) : 2139, 2267
. : milestone, 2203,
iast_GLOBAL (2.251 ms) : 2187, 2315
. : milestone, 2251,
profiling (2.051 ms) : 1999, 2103
. : milestone, 2051,
tracing (2.019 ms) : 1969, 2068
. : milestone, 2019,
|
/** | ||
* Global weak {@link ContextStore} that acts as a fall-back when field-injection isn't possible. | ||
*/ | ||
public final class GlobalWeakContextStore { | ||
|
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.
Just curious if it make sense to cover this class with unit tests, maybe with some threading?
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's a draft PR with WIP
in the title... tests and benchmarks will turn up
But yes - this will definitely have both functional and multi-threaded test coverage.
ed27aed
to
789a996
Compare
🎯 Code Coverage 🔗 Commit SHA: 789a996 | Docs | Was this helpful? Give us feedback! |
Motivation
Preparing the ground to separate field-injection from other transformations.
Having a single weak-map makes it easier to manage the weak fall-back approach.
Benchmark Results
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any useful labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: APMAPI-1567