-
Couldn't load subscription status.
- Fork 315
Ensure info discovery state change is atomic #9497
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
|
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 long lastTimeDiscovered; | ||
| private static class State { | ||
| String traceEndpoint; |
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.
didn't put those final to avoid having a too heavy refactoring to do on this sensible part
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.
Yeah, this stuff should basically be an immutable record...
c66d7a8 to
0dca1f7
Compare
0dca1f7 to
b6bd66b
Compare
|
🎯 Code Coverage 🔗 Commit SHA: 8663672 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1048750
Total [baseline] (10.692 s) : 0, 10692103
Agent [candidate] (1.049 s) : 0, 1049461
Total [candidate] (10.683 s) : 0, 10682507
section appsec
Agent [baseline] (1.225 s) : 0, 1225315
Total [baseline] (10.848 s) : 0, 10847991
Agent [candidate] (1.231 s) : 0, 1231021
Total [candidate] (10.863 s) : 0, 10862672
section iast
Agent [baseline] (1.183 s) : 0, 1182653
Total [baseline] (10.963 s) : 0, 10963131
Agent [candidate] (1.182 s) : 0, 1181698
Total [candidate] (10.912 s) : 0, 10912079
section profiling
Agent [baseline] (1.206 s) : 0, 1206076
Total [baseline] (10.938 s) : 0, 10938263
Agent [candidate] (1.201 s) : 0, 1201348
Total [candidate] (10.87 s) : 0, 10870131
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (733.946 ms) : 0, 733946
BytebuddyAgent [candidate] (733.662 ms) : 0, 733662
GlobalTracer [baseline] (242.655 ms) : 0, 242655
GlobalTracer [candidate] (242.776 ms) : 0, 242776
AppSec [baseline] (30.201 ms) : 0, 30201
AppSec [candidate] (30.249 ms) : 0, 30249
Debugger [baseline] (6.412 ms) : 0, 6412
Debugger [candidate] (6.423 ms) : 0, 6423
Remote Config [baseline] (676.999 µs) : 0, 677
Remote Config [candidate] (674.769 µs) : 0, 675
Telemetry [baseline] (12.352 ms) : 0, 12352
Telemetry [candidate] (13.111 ms) : 0, 13111
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (756.497 ms) : 0, 756497
BytebuddyAgent [candidate] (760.233 ms) : 0, 760233
GlobalTracer [baseline] (235.754 ms) : 0, 235754
GlobalTracer [candidate] (236.824 ms) : 0, 236824
IAST [baseline] (23.68 ms) : 0, 23680
IAST [candidate] (23.901 ms) : 0, 23901
AppSec [baseline] (169.368 ms) : 0, 169368
AppSec [candidate] (170.625 ms) : 0, 170625
Debugger [baseline] (7.536 ms) : 0, 7536
Debugger [candidate] (7.581 ms) : 0, 7581
Remote Config [baseline] (629.784 µs) : 0, 630
Remote Config [candidate] (623.08 µs) : 0, 623
Telemetry [baseline] (9.338 ms) : 0, 9338
Telemetry [candidate] (8.594 ms) : 0, 8594
section iast
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.443 ms) : 0, 1443
BytebuddyAgent [baseline] (853.164 ms) : 0, 853164
BytebuddyAgent [candidate] (852.447 ms) : 0, 852447
GlobalTracer [baseline] (233.682 ms) : 0, 233682
GlobalTracer [candidate] (233.714 ms) : 0, 233714
IAST [baseline] (31.119 ms) : 0, 31119
IAST [candidate] (32.764 ms) : 0, 32764
AppSec [baseline] (26.186 ms) : 0, 26186
AppSec [candidate] (25.192 ms) : 0, 25192
Debugger [baseline] (6.989 ms) : 0, 6989
Debugger [candidate] (6.131 ms) : 0, 6131
Remote Config [baseline] (609.799 µs) : 0, 610
Remote Config [candidate] (603.97 µs) : 0, 604
Telemetry [baseline] (8.327 ms) : 0, 8327
Telemetry [candidate] (8.278 ms) : 0, 8278
section profiling
crashtracking [baseline] (1.432 ms) : 0, 1432
crashtracking [candidate] (1.424 ms) : 0, 1424
BytebuddyAgent [baseline] (766.728 ms) : 0, 766728
BytebuddyAgent [candidate] (762.801 ms) : 0, 762801
GlobalTracer [baseline] (224.152 ms) : 0, 224152
GlobalTracer [candidate] (224.084 ms) : 0, 224084
AppSec [baseline] (30.714 ms) : 0, 30714
AppSec [candidate] (30.507 ms) : 0, 30507
Debugger [baseline] (8.208 ms) : 0, 8208
Debugger [candidate] (7.516 ms) : 0, 7516
Remote Config [baseline] (725.503 µs) : 0, 726
Remote Config [candidate] (692.453 µs) : 0, 692
Telemetry [baseline] (14.918 ms) : 0, 14918
Telemetry [candidate] (15.769 ms) : 0, 15769
ProfilingAgent [baseline] (108.371 ms) : 0, 108371
ProfilingAgent [candidate] (107.976 ms) : 0, 107976
Profiling [baseline] (109.037 ms) : 0, 109037
Profiling [candidate] (108.703 ms) : 0, 108703
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056149
Total [baseline] (8.674 s) : 0, 8674431
Agent [candidate] (1.049 s) : 0, 1048536
Total [candidate] (8.643 s) : 0, 8643495
section iast
Agent [baseline] (1.19 s) : 0, 1190049
Total [baseline] (9.397 s) : 0, 9397207
Agent [candidate] (1.178 s) : 0, 1178186
Total [candidate] (9.356 s) : 0, 9355934
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.484 ms) : 0, 1484
crashtracking [candidate] (1.454 ms) : 0, 1454
BytebuddyAgent [baseline] (739.189 ms) : 0, 739189
BytebuddyAgent [candidate] (734.46 ms) : 0, 734460
GlobalTracer [baseline] (244.089 ms) : 0, 244089
GlobalTracer [candidate] (243.051 ms) : 0, 243051
AppSec [baseline] (30.555 ms) : 0, 30555
AppSec [candidate] (30.397 ms) : 0, 30397
Debugger [baseline] (6.453 ms) : 0, 6453
Debugger [candidate] (6.472 ms) : 0, 6472
Remote Config [baseline] (693.326 µs) : 0, 693
Remote Config [candidate] (679.521 µs) : 0, 680
Telemetry [baseline] (12.539 ms) : 0, 12539
Telemetry [candidate] (10.971 ms) : 0, 10971
section iast
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.474 ms) : 0, 1474
BytebuddyAgent [baseline] (859.172 ms) : 0, 859172
BytebuddyAgent [candidate] (850.191 ms) : 0, 850191
GlobalTracer [baseline] (235.198 ms) : 0, 235198
GlobalTracer [candidate] (232.515 ms) : 0, 232515
IAST [baseline] (28.141 ms) : 0, 28141
IAST [candidate] (30.968 ms) : 0, 30968
AppSec [baseline] (28.901 ms) : 0, 28901
AppSec [candidate] (26.082 ms) : 0, 26082
Debugger [baseline] (7.023 ms) : 0, 7023
Debugger [candidate] (7.02 ms) : 0, 7020
Remote Config [baseline] (619.326 µs) : 0, 619
Remote Config [candidate] (613.669 µs) : 0, 614
Telemetry [baseline] (8.354 ms) : 0, 8354
Telemetry [candidate] (8.306 ms) : 0, 8306
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section baseline
no_agent (37.262 ms) : 36960, 37564
. : milestone, 37262,
appsec (47.696 ms) : 47282, 48110
. : milestone, 47696,
code_origins (44.058 ms) : 43682, 44434
. : milestone, 44058,
iast (45.959 ms) : 45570, 46348
. : milestone, 45959,
profiling (48.794 ms) : 48301, 49287
. : milestone, 48794,
tracing (46.185 ms) : 45788, 46582
. : milestone, 46185,
section candidate
no_agent (37.698 ms) : 37386, 38011
. : milestone, 37698,
appsec (48.816 ms) : 48402, 49231
. : milestone, 48816,
code_origins (45.413 ms) : 45016, 45810
. : milestone, 45413,
iast (44.096 ms) : 43713, 44480
. : milestone, 44096,
profiling (49.273 ms) : 48814, 49732
. : milestone, 49273,
tracing (43.709 ms) : 43344, 44074
. : milestone, 43709,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section baseline
no_agent (4.146 ms) : 4096, 4196
. : milestone, 4146,
iast (9.256 ms) : 9097, 9415
. : milestone, 9256,
iast_FULL (14.803 ms) : 14499, 15107
. : milestone, 14803,
iast_GLOBAL (10.164 ms) : 9987, 10341
. : milestone, 10164,
profiling (8.816 ms) : 8684, 8948
. : milestone, 8816,
tracing (7.658 ms) : 7552, 7764
. : milestone, 7658,
section candidate
no_agent (4.429 ms) : 4378, 4480
. : milestone, 4429,
iast (9.1 ms) : 8943, 9257
. : milestone, 9100,
iast_FULL (14.375 ms) : 14087, 14663
. : milestone, 14375,
iast_GLOBAL (10.26 ms) : 10081, 10439
. : milestone, 10260,
profiling (9.073 ms) : 8929, 9217
. : milestone, 9073,
tracing (7.667 ms) : 7560, 7775
. : milestone, 7667,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section baseline
no_agent (15.521 s) : 15521000, 15521000
. : milestone, 15521000,
appsec (14.82 s) : 14820000, 14820000
. : milestone, 14820000,
iast (18.487 s) : 18487000, 18487000
. : milestone, 18487000,
iast_GLOBAL (18.152 s) : 18152000, 18152000
. : milestone, 18152000,
profiling (15.384 s) : 15384000, 15384000
. : milestone, 15384000,
tracing (15.03 s) : 15030000, 15030000
. : milestone, 15030000,
section candidate
no_agent (15.297 s) : 15297000, 15297000
. : milestone, 15297000,
appsec (14.826 s) : 14826000, 14826000
. : milestone, 14826000,
iast (18.695 s) : 18695000, 18695000
. : milestone, 18695000,
iast_GLOBAL (17.799 s) : 17799000, 17799000
. : milestone, 17799000,
profiling (15.351 s) : 15351000, 15351000
. : milestone, 15351000,
tracing (15.06 s) : 15060000, 15060000
. : milestone, 15060000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~b6bd66bec5, baseline=1.54.0-SNAPSHOT~f284153719
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (2.473 ms) : 2420, 2526
. : milestone, 2473,
iast (2.208 ms) : 2145, 2271
. : milestone, 2208,
iast_GLOBAL (2.246 ms) : 2183, 2310
. : milestone, 2246,
profiling (2.065 ms) : 2013, 2118
. : milestone, 2065,
tracing (2.017 ms) : 1968, 2066
. : milestone, 2017,
section candidate
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.671 ms) : 3454, 3888
. : milestone, 3671,
iast (2.204 ms) : 2140, 2267
. : milestone, 2204,
iast_GLOBAL (2.243 ms) : 2180, 2306
. : milestone, 2243,
profiling (2.486 ms) : 2315, 2656
. : milestone, 2486,
tracing (2.013 ms) : 1964, 2062
. : milestone, 2013,
|
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.
Thanks for the fix!
|
|
||
| private long lastTimeDiscovered; | ||
| private static class State { | ||
| String traceEndpoint; |
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.
Yeah, this stuff should basically be an immutable record...
What Does This Do
The feature discovery should maintain its state preserved until the discovery and parsing of the info endpoint is done.
In particular, when a discovery is triggered, the state was reset and this led to have inconsistent values in between (i.e. metrics were disabled temporary until the discovery finished).
This PR makes sure the state is swapped atomically when the new is available
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]