-
Notifications
You must be signed in to change notification settings - Fork 311
Change ConfigProvider to iterate from lowest to highest precedence so… #9307
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
Conversation
…urce, adn report all to ConfigCollector
…ate tests accordingly
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 45 metrics, 12 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.04 s) : 0, 1040085
Total [baseline] (10.665 s) : 0, 10664758
Agent [candidate] (1.049 s) : 0, 1049313
Total [candidate] (10.768 s) : 0, 10767995
section appsec
Agent [baseline] (1.217 s) : 0, 1217425
Total [baseline] (10.797 s) : 0, 10796572
Agent [candidate] (1.229 s) : 0, 1228831
Total [candidate] (10.775 s) : 0, 10775478
section iast
Agent [baseline] (1.174 s) : 0, 1173633
Total [baseline] (10.835 s) : 0, 10834882
Agent [candidate] (1.177 s) : 0, 1176848
Total [candidate] (10.994 s) : 0, 10993850
section profiling
Agent [baseline] (1.192 s) : 0, 1191940
Total [baseline] (10.922 s) : 0, 10922350
Agent [candidate] (1.205 s) : 0, 1205010
Total [candidate] (10.866 s) : 0, 10865595
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.432 ms) : 0, 1432
crashtracking [candidate] (1.444 ms) : 0, 1444
BytebuddyAgent [baseline] (729.057 ms) : 0, 729057
BytebuddyAgent [candidate] (733.576 ms) : 0, 733576
GlobalTracer [baseline] (241.384 ms) : 0, 241384
GlobalTracer [candidate] (243.457 ms) : 0, 243457
AppSec [baseline] (29.974 ms) : 0, 29974
AppSec [candidate] (30.171 ms) : 0, 30171
Debugger [baseline] (6.057 ms) : 0, 6057
Debugger [candidate] (6.028 ms) : 0, 6028
Remote Config [baseline] (649.705 µs) : 0, 650
Remote Config [candidate] (685.852 µs) : 0, 686
Telemetry [baseline] (10.506 ms) : 0, 10506
Telemetry [candidate] (12.895 ms) : 0, 12895
section appsec
crashtracking [baseline] (1.427 ms) : 0, 1427
crashtracking [candidate] (1.437 ms) : 0, 1437
BytebuddyAgent [baseline] (750.862 ms) : 0, 750862
BytebuddyAgent [candidate] (760.168 ms) : 0, 760168
GlobalTracer [baseline] (234.747 ms) : 0, 234747
GlobalTracer [candidate] (236.491 ms) : 0, 236491
IAST [baseline] (23.46 ms) : 0, 23460
IAST [candidate] (23.69 ms) : 0, 23690
AppSec [baseline] (165.407 ms) : 0, 165407
AppSec [candidate] (171.209 ms) : 0, 171209
Debugger [baseline] (11.647 ms) : 0, 11647
Debugger [candidate] (5.727 ms) : 0, 5727
Remote Config [baseline] (617.547 µs) : 0, 618
Remote Config [candidate] (600.47 µs) : 0, 600
Telemetry [baseline] (8.229 ms) : 0, 8229
Telemetry [candidate] (8.352 ms) : 0, 8352
section iast
crashtracking [baseline] (1.435 ms) : 0, 1435
crashtracking [candidate] (1.431 ms) : 0, 1431
BytebuddyAgent [baseline] (847.293 ms) : 0, 847293
BytebuddyAgent [candidate] (850.393 ms) : 0, 850393
GlobalTracer [baseline] (231.879 ms) : 0, 231879
GlobalTracer [candidate] (231.902 ms) : 0, 231902
IAST [baseline] (30.572 ms) : 0, 30572
IAST [candidate] (27.192 ms) : 0, 27192
AppSec [baseline] (26.919 ms) : 0, 26919
AppSec [candidate] (29.464 ms) : 0, 29464
Debugger [baseline] (5.775 ms) : 0, 5775
Debugger [candidate] (6.745 ms) : 0, 6745
Remote Config [baseline] (579.38 µs) : 0, 579
Remote Config [candidate] (621.699 µs) : 0, 622
Telemetry [baseline] (8.169 ms) : 0, 8169
Telemetry [candidate] (8.063 ms) : 0, 8063
section profiling
crashtracking [baseline] (1.407 ms) : 0, 1407
crashtracking [candidate] (1.435 ms) : 0, 1435
BytebuddyAgent [baseline] (759.691 ms) : 0, 759691
BytebuddyAgent [candidate] (767.035 ms) : 0, 767035
GlobalTracer [baseline] (221.491 ms) : 0, 221491
GlobalTracer [candidate] (222.979 ms) : 0, 222979
AppSec [baseline] (29.897 ms) : 0, 29897
AppSec [candidate] (30.397 ms) : 0, 30397
Debugger [baseline] (6.282 ms) : 0, 6282
Debugger [candidate] (6.322 ms) : 0, 6322
Remote Config [baseline] (670.764 µs) : 0, 671
Remote Config [candidate] (668.59 µs) : 0, 669
Telemetry [baseline] (15.12 ms) : 0, 15120
Telemetry [candidate] (16.024 ms) : 0, 16024
ProfilingAgent [baseline] (108.021 ms) : 0, 108021
ProfilingAgent [candidate] (108.891 ms) : 0, 108891
Profiling [baseline] (108.638 ms) : 0, 108638
Profiling [candidate] (109.487 ms) : 0, 109487
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.052 s) : 0, 1051659
Total [baseline] (8.618 s) : 0, 8618248
Agent [candidate] (1.046 s) : 0, 1046142
Total [candidate] (8.588 s) : 0, 8587919
section iast
Agent [baseline] (1.175 s) : 0, 1174659
Total [baseline] (9.337 s) : 0, 9337038
Agent [candidate] (1.175 s) : 0, 1174744
Total [candidate] (9.294 s) : 0, 9294452
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.437 ms) : 0, 1437
crashtracking [candidate] (1.431 ms) : 0, 1431
BytebuddyAgent [baseline] (735.081 ms) : 0, 735081
BytebuddyAgent [candidate] (733.456 ms) : 0, 733456
GlobalTracer [baseline] (243.583 ms) : 0, 243583
GlobalTracer [candidate] (242.375 ms) : 0, 242375
AppSec [baseline] (30.263 ms) : 0, 30263
AppSec [candidate] (29.982 ms) : 0, 29982
Debugger [baseline] (6.093 ms) : 0, 6093
Debugger [candidate] (6.016 ms) : 0, 6016
Remote Config [baseline] (727.112 µs) : 0, 727
Remote Config [candidate] (690.596 µs) : 0, 691
Telemetry [baseline] (13.408 ms) : 0, 13408
Telemetry [candidate] (11.196 ms) : 0, 11196
section iast
crashtracking [baseline] (1.432 ms) : 0, 1432
crashtracking [candidate] (1.439 ms) : 0, 1439
BytebuddyAgent [baseline] (848.022 ms) : 0, 848022
BytebuddyAgent [candidate] (849.114 ms) : 0, 849114
GlobalTracer [baseline] (231.772 ms) : 0, 231772
GlobalTracer [candidate] (231.116 ms) : 0, 231116
AppSec [baseline] (26.215 ms) : 0, 26215
AppSec [candidate] (30.235 ms) : 0, 30235
Debugger [baseline] (8.419 ms) : 0, 8419
Debugger [candidate] (5.809 ms) : 0, 5809
Remote Config [baseline] (581.737 µs) : 0, 582
Remote Config [candidate] (595.723 µs) : 0, 596
Telemetry [baseline] (8.137 ms) : 0, 8137
Telemetry [candidate] (8.053 ms) : 0, 8053
IAST [baseline] (29.094 ms) : 0, 29094
IAST [candidate] (27.341 ms) : 0, 27341
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 3 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.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section baseline
no_agent (4.402 ms) : 4351, 4453
. : milestone, 4402,
iast (9.402 ms) : 9246, 9558
. : milestone, 9402,
iast_FULL (14.276 ms) : 13987, 14565
. : milestone, 14276,
iast_GLOBAL (10.531 ms) : 10349, 10713
. : milestone, 10531,
profiling (8.807 ms) : 8662, 8952
. : milestone, 8807,
tracing (7.498 ms) : 7395, 7601
. : milestone, 7498,
section candidate
no_agent (4.353 ms) : 4304, 4402
. : milestone, 4353,
iast (9.592 ms) : 9432, 9751
. : milestone, 9592,
iast_FULL (13.834 ms) : 13557, 14111
. : milestone, 13834,
iast_GLOBAL (10.178 ms) : 9997, 10360
. : milestone, 10178,
profiling (9.15 ms) : 8997, 9303
. : milestone, 9150,
tracing (7.634 ms) : 7517, 7751
. : milestone, 7634,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section baseline
no_agent (37.418 ms) : 37122, 37713
. : milestone, 37418,
appsec (47.27 ms) : 46848, 47692
. : milestone, 47270,
code_origins (43.937 ms) : 43555, 44318
. : milestone, 43937,
iast (45.285 ms) : 44891, 45679
. : milestone, 45285,
profiling (47.72 ms) : 47255, 48186
. : milestone, 47720,
tracing (44.511 ms) : 44146, 44875
. : milestone, 44511,
section candidate
no_agent (37.294 ms) : 36992, 37596
. : milestone, 37294,
appsec (46.931 ms) : 46511, 47350
. : milestone, 46931,
code_origins (45.417 ms) : 45039, 45794
. : milestone, 45417,
iast (45.194 ms) : 44805, 45584
. : milestone, 45194,
profiling (50.094 ms) : 49606, 50581
. : milestone, 50094,
tracing (43.931 ms) : 43558, 44303
. : milestone, 43931,
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.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section baseline
no_agent (15.671 s) : 15671000, 15671000
. : milestone, 15671000,
appsec (15.038 s) : 15038000, 15038000
. : milestone, 15038000,
iast (18.827 s) : 18827000, 18827000
. : milestone, 18827000,
iast_GLOBAL (18.139 s) : 18139000, 18139000
. : milestone, 18139000,
profiling (15.382 s) : 15382000, 15382000
. : milestone, 15382000,
tracing (15.111 s) : 15111000, 15111000
. : milestone, 15111000,
section candidate
no_agent (14.99 s) : 14990000, 14990000
. : milestone, 14990000,
appsec (14.846 s) : 14846000, 14846000
. : milestone, 14846000,
iast (18.771 s) : 18771000, 18771000
. : milestone, 18771000,
iast_GLOBAL (18.119 s) : 18119000, 18119000
. : milestone, 18119000,
profiling (15.357 s) : 15357000, 15357000
. : milestone, 15357000,
tracing (14.829 s) : 14829000, 14829000
. : milestone, 14829000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~225eb4a24e, baseline=1.53.0-SNAPSHOT~c6140367d1
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1465, 1488
. : milestone, 1476,
appsec (3.644 ms) : 3427, 3861
. : milestone, 3644,
iast (2.2 ms) : 2138, 2262
. : milestone, 2200,
iast_GLOBAL (2.226 ms) : 2164, 2289
. : milestone, 2226,
profiling (2.037 ms) : 1986, 2088
. : milestone, 2037,
tracing (2.032 ms) : 1983, 2081
. : milestone, 2032,
section candidate
no_agent (1.47 ms) : 1458, 1481
. : milestone, 1470,
appsec (3.576 ms) : 3364, 3788
. : milestone, 3576,
iast (2.195 ms) : 2133, 2257
. : milestone, 2195,
iast_GLOBAL (2.238 ms) : 2175, 2300
. : milestone, 2238,
profiling (2.044 ms) : 1993, 2095
. : milestone, 2044,
tracing (2.006 ms) : 1958, 2054
. : milestone, 2006,
|
…Provider, to report all configured sources
_ * telemetryService.addConfigurationByOrigin(_) | ||
1 * timeSource.getCurrentTimeMillis() >> 60 * 1000 | ||
_ * telemetryService.addConfiguration(_) |
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.
This change allowed the test to pass, but I'm not sure it's an "ok" change
@@ -11,19 +11,27 @@ public final class ConfigSetting { | |||
public final String key; | |||
public final Object value; | |||
public final ConfigOrigin origin; | |||
public final int seqId; | |||
|
|||
public static final int DEFAULT_SEQ_ID = 1; |
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.
This is hard to name -- it's actually the seq_id to represent the "default" configorigin, not the seq ID to be used in absence of a seqId.
/** | ||
* Creates a ConfigProvider with sources ordered from lowest to highest precedence. Internally | ||
* reverses the array to support the new approach of iterating from lowest to highest precedence, | ||
* enabling reporting of all configured sources to telemetry (not just the highest-precedence | ||
* match). | ||
* | ||
* @param sources the configuration sources, in order from lowest to highest precedence | ||
* @return a ConfigProvider with sources in precedence order (highest first) | ||
*/ | ||
public static ConfigProvider createWithPrecedenceOrder(Source... sources) { | ||
Source[] reversed = Arrays.copyOf(sources, sources.length); | ||
Collections.reverse(Arrays.asList(reversed)); | ||
return new ConfigProvider(reversed); | ||
} |
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.
We needed to change the order of Sources from going "highest to lowest precedence" to go "lowest to highest precedence". I introduced this method to ease that migration, so we don't have to change where the sources are getting registered in the configprovider.
if (collectConfig) { | ||
String valueStr = defaultValue == null ? null : defaultValue.name(); | ||
ConfigCollector.get().put(key, valueStr, ConfigOrigin.DEFAULT); | ||
} |
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.
Do we need to report the default here, if it's already done in getString? (see line 92)
…urce, adn report all to ConfigCollector# What Does This Do
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]