Type resolver's use of URL caches should be configurable#5805
Merged
Conversation
Some deployments will want to use URL caches for performance reasons. Others may want to skip URL caches as they can lead to JarFiles being pinned in memory (or keeping files locked in Windows) The Java tracer will now use the default URLConnection 'UseCaches' setting, but this can be overriden (to false or true) by adding this JVM option: ``` -Ddd.resolver.use.url.caches=false ``` or by setting this environment variable: ``` DD_RESOLVER_USE_URL_CACHES=false ```
bantonsson
approved these changes
Aug 29, 2023
| uc.setUseCaches(false); | ||
| if (null != USE_URL_CACHES) { | ||
| uc.setUseCaches(USE_URL_CACHES); | ||
| } |
Contributor
There was a problem hiding this comment.
Nice. If nothing's set it uses the default.
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 cases. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~2e44c07cd9, baseline=1.20.0-SNAPSHOT~be378f24bc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.009 s) : 0, 1008549
Total [baseline] (9.208 s) : 0, 9207830
Agent [candidate] (995.126 ms) : 0, 995126
Total [candidate] (9.153 s) : 0, 9152941
section appsec
Agent [baseline] (1.083 s) : 0, 1082617
Total [baseline] (9.341 s) : 0, 9341196
Agent [candidate] (1.075 s) : 0, 1074756
Total [candidate] (9.265 s) : 0, 9264613
section iast
Agent [baseline] (1.096 s) : 0, 1095740
Total [baseline] (9.426 s) : 0, 9426131
Agent [candidate] (1.096 s) : 0, 1095684
Total [candidate] (9.421 s) : 0, 9421407
section profiling
Agent [baseline] (1.159 s) : 0, 1158648
Total [baseline] (9.514 s) : 0, 9513616
Agent [candidate] (1.162 s) : 0, 1161817
Total [candidate] (9.435 s) : 0, 9434720
gantt
title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~2e44c07cd9, baseline=1.20.0-SNAPSHOT~be378f24bc
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (626.8 ms) : 0, 626800
BytebuddyAgent [candidate] (617.109 ms) : 0, 617109
GlobalTracer [baseline] (289.707 ms) : 0, 289707
GlobalTracer [candidate] (286.232 ms) : 0, 286232
AppSec [baseline] (50.172 ms) : 0, 50172
AppSec [candidate] (50.654 ms) : 0, 50654
Remote Config [baseline] (672.278 µs) : 0, 672
Remote Config [candidate] (665.639 µs) : 0, 666
Telemetry [baseline] (6.095 ms) : 0, 6095
Telemetry [candidate] (6.004 ms) : 0, 6004
section appsec
BytebuddyAgent [baseline] (618.688 ms) : 0, 618688
BytebuddyAgent [candidate] (613.887 ms) : 0, 613887
GlobalTracer [baseline] (287.031 ms) : 0, 287031
GlobalTracer [candidate] (284.891 ms) : 0, 284891
AppSec [baseline] (135.701 ms) : 0, 135701
AppSec [candidate] (135.234 ms) : 0, 135234
Remote Config [baseline] (725.596 µs) : 0, 726
Remote Config [candidate] (724.903 µs) : 0, 725
Telemetry [baseline] (5.779 ms) : 0, 5779
Telemetry [candidate] (5.726 ms) : 0, 5726
section iast
BytebuddyAgent [baseline] (721.867 ms) : 0, 721867
BytebuddyAgent [candidate] (721.907 ms) : 0, 721907
GlobalTracer [baseline] (271.684 ms) : 0, 271684
GlobalTracer [candidate] (271.603 ms) : 0, 271603
AppSec [baseline] (46.983 ms) : 0, 46983
AppSec [candidate] (46.896 ms) : 0, 46896
Remote Config [baseline] (569.782 µs) : 0, 570
Remote Config [candidate] (577.845 µs) : 0, 578
Telemetry [baseline] (5.755 ms) : 0, 5755
Telemetry [candidate] (5.812 ms) : 0, 5812
IAST [baseline] (14.466 ms) : 0, 14466
IAST [candidate] (14.454 ms) : 0, 14454
section profiling
ProfilingAgent [baseline] (75.444 ms) : 0, 75444
ProfilingAgent [candidate] (77.252 ms) : 0, 77252
BytebuddyAgent [baseline] (626.261 ms) : 0, 626261
BytebuddyAgent [candidate] (626.85 ms) : 0, 626850
GlobalTracer [baseline] (347.989 ms) : 0, 347989
GlobalTracer [candidate] (349.203 ms) : 0, 349203
AppSec [baseline] (49.488 ms) : 0, 49488
AppSec [candidate] (49.152 ms) : 0, 49152
Remote Config [baseline] (646.651 µs) : 0, 647
Remote Config [candidate] (647.912 µs) : 0, 648
Telemetry [baseline] (6.033 ms) : 0, 6033
Telemetry [candidate] (5.977 ms) : 0, 5977
Profiling [baseline] (75.469 ms) : 0, 75469
Profiling [candidate] (77.277 ms) : 0, 77277
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~2e44c07cd9, baseline=1.20.0-SNAPSHOT~be378f24bc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (988.547 ms) : 0, 988547
Total [baseline] (8.643 s) : 0, 8643008
Agent [candidate] (987.097 ms) : 0, 987097
Total [candidate] (8.687 s) : 0, 8686588
section appsec
Agent [baseline] (1.082 s) : 0, 1081521
Total [baseline] (8.767 s) : 0, 8767026
Agent [candidate] (1.074 s) : 0, 1074123
Total [candidate] (8.731 s) : 0, 8731298
section iast
Agent [baseline] (1.094 s) : 0, 1093694
Total [baseline] (9.178 s) : 0, 9178111
Agent [candidate] (1.093 s) : 0, 1092850
Total [candidate] (9.155 s) : 0, 9154751
section profiling
Agent [baseline] (1.16 s) : 0, 1160086
Total [baseline] (8.871 s) : 0, 8871406
Agent [candidate] (1.162 s) : 0, 1161910
Total [candidate] (8.857 s) : 0, 8856990
gantt
title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~2e44c07cd9, baseline=1.20.0-SNAPSHOT~be378f24bc
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (613.225 ms) : 0, 613225
BytebuddyAgent [candidate] (611.889 ms) : 0, 611889
GlobalTracer [baseline] (284.289 ms) : 0, 284289
GlobalTracer [candidate] (283.974 ms) : 0, 283974
AppSec [baseline] (49.977 ms) : 0, 49977
AppSec [candidate] (50.441 ms) : 0, 50441
Remote Config [baseline] (662.356 µs) : 0, 662
Remote Config [candidate] (666.942 µs) : 0, 667
Telemetry [baseline] (5.971 ms) : 0, 5971
Telemetry [candidate] (5.967 ms) : 0, 5967
section appsec
BytebuddyAgent [baseline] (618.485 ms) : 0, 618485
BytebuddyAgent [candidate] (613.709 ms) : 0, 613709
GlobalTracer [baseline] (286.654 ms) : 0, 286654
GlobalTracer [candidate] (284.69 ms) : 0, 284690
AppSec [baseline] (135.187 ms) : 0, 135187
AppSec [candidate] (134.905 ms) : 0, 134905
Remote Config [baseline] (751.29 µs) : 0, 751
Remote Config [candidate] (736.064 µs) : 0, 736
Telemetry [baseline] (5.842 ms) : 0, 5842
Telemetry [candidate] (5.715 ms) : 0, 5715
section iast
BytebuddyAgent [baseline] (721.037 ms) : 0, 721037
BytebuddyAgent [candidate] (720.555 ms) : 0, 720555
GlobalTracer [baseline] (270.857 ms) : 0, 270857
GlobalTracer [candidate] (270.476 ms) : 0, 270476
AppSec [baseline] (46.724 ms) : 0, 46724
AppSec [candidate] (46.838 ms) : 0, 46838
Remote Config [baseline] (568.308 µs) : 0, 568
Remote Config [candidate] (585.106 µs) : 0, 585
Telemetry [baseline] (5.728 ms) : 0, 5728
Telemetry [candidate] (5.74 ms) : 0, 5740
IAST [baseline] (14.383 ms) : 0, 14383
IAST [candidate] (14.365 ms) : 0, 14365
section profiling
ProfilingAgent [baseline] (77.937 ms) : 0, 77937
ProfilingAgent [candidate] (78.074 ms) : 0, 78074
BytebuddyAgent [baseline] (625.483 ms) : 0, 625483
BytebuddyAgent [candidate] (626.777 ms) : 0, 626777
GlobalTracer [baseline] (348.027 ms) : 0, 348027
GlobalTracer [candidate] (348.347 ms) : 0, 348347
AppSec [baseline] (49.224 ms) : 0, 49224
AppSec [candidate] (49.213 ms) : 0, 49213
Remote Config [baseline] (645.475 µs) : 0, 645
Remote Config [candidate] (642.15 µs) : 0, 642
Telemetry [baseline] (5.986 ms) : 0, 5986
Telemetry [candidate] (5.992 ms) : 0, 5992
Profiling [baseline] (77.961 ms) : 0, 77961
Profiling [candidate] (78.098 ms) : 0, 78098
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~2e44c07cd9, baseline=1.20.0-SNAPSHOT~be378f24bc
dateFormat X
axisFormat %s
section baseline
no_agent (1.352 ms) : 1333, 1371
. : milestone, 1352,
appsec (1.712 ms) : 1688, 1736
. : milestone, 1712,
iast (1.455 ms) : 1430, 1479
. : milestone, 1455,
profiling (1.488 ms) : 1462, 1513
. : milestone, 1488,
tracing (1.467 ms) : 1443, 1491
. : milestone, 1467,
section candidate
no_agent (1.33 ms) : 1310, 1349
. : milestone, 1330,
appsec (1.696 ms) : 1672, 1720
. : milestone, 1696,
iast (1.465 ms) : 1441, 1489
. : milestone, 1465,
profiling (1.486 ms) : 1461, 1511
. : milestone, 1486,
tracing (1.458 ms) : 1433, 1482
. : milestone, 1458,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~2e44c07cd9, baseline=1.20.0-SNAPSHOT~be378f24bc
dateFormat X
axisFormat %s
section baseline
no_agent (360.497 µs) : 340, 381
. : milestone, 360,
appsec (663.681 µs) : 643, 685
. : milestone, 664,
iast (460.291 µs) : 439, 482
. : milestone, 460,
iast_FULL (518.757 µs) : 498, 539
. : milestone, 519,
iast_INACTIVE (431.632 µs) : 411, 452
. : milestone, 432,
profiling (446.31 µs) : 425, 468
. : milestone, 446,
tracing (435.382 µs) : 415, 455
. : milestone, 435,
section candidate
no_agent (362.832 µs) : 343, 383
. : milestone, 363,
appsec (666.915 µs) : 646, 688
. : milestone, 667,
iast (456.096 µs) : 435, 477
. : milestone, 456,
iast_FULL (525.141 µs) : 504, 546
. : milestone, 525,
iast_INACTIVE (434.947 µs) : 414, 456
. : milestone, 435,
profiling (439.807 µs) : 419, 461
. : milestone, 440,
tracing (429.543 µs) : 409, 450
. : milestone, 430,
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some deployments will want to use URL caches for performance reasons. Others may want to skip URL caches as they can lead to JarFiles being pinned in memory (or keeping files locked in Windows)
The Java tracer will now use the default URLConnection 'UseCaches' setting, but this can be overriden (to false or true) by adding this JVM option:
or by setting this environment variable: