-
Notifications
You must be signed in to change notification settings - Fork 292
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
Ensure queue timer is started for RunnableFuture types #6828
Merged
Conversation
This file contains 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
e893948
to
39fd859
Compare
39fd859
to
b7cf900
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 13 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.32.0-SNAPSHOT~b7cf900de6, baseline=1.32.0-SNAPSHOT~e20dfff5e5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.081 s) : 0, 1081023
Total [baseline] (8.58 s) : 0, 8579545
Agent [candidate] (1.089 s) : 0, 1089039
Total [candidate] (8.606 s) : 0, 8606144
section iast
Agent [baseline] (1.206 s) : 0, 1206209
Total [baseline] (9.062 s) : 0, 9062086
Agent [candidate] (1.215 s) : 0, 1215179
Total [candidate] (9.075 s) : 0, 9075376
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.206 s) : 0, 1206368
Total [baseline] (9.053 s) : 0, 9052657
Agent [candidate] (1.221 s) : 0, 1221217
Total [candidate] (9.102 s) : 0, 9102441
section iast_TELEMETRY_OFF
Agent [baseline] (1.2 s) : 0, 1200254
Total [baseline] (9.118 s) : 0, 9118351
Agent [candidate] (1.206 s) : 0, 1205613
Total [candidate] (9.092 s) : 0, 9092336
gantt
title insecure-bank - break down per module: candidate=1.32.0-SNAPSHOT~b7cf900de6, baseline=1.32.0-SNAPSHOT~e20dfff5e5
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (697.233 ms) : 0, 697233
BytebuddyAgent [candidate] (702.162 ms) : 0, 702162
GlobalTracer [baseline] (291.879 ms) : 0, 291879
GlobalTracer [candidate] (294.247 ms) : 0, 294247
AppSec [baseline] (49.105 ms) : 0, 49105
AppSec [candidate] (49.605 ms) : 0, 49605
Remote Config [baseline] (1.074 ms) : 0, 1074
Remote Config [candidate] (1.072 ms) : 0, 1072
Telemetry [baseline] (7.41 ms) : 0, 7410
Telemetry [candidate] (7.448 ms) : 0, 7448
section iast
BytebuddyAgent [baseline] (802.11 ms) : 0, 802110
BytebuddyAgent [candidate] (807.456 ms) : 0, 807456
GlobalTracer [baseline] (288.981 ms) : 0, 288981
GlobalTracer [candidate] (291.598 ms) : 0, 291598
AppSec [baseline] (50.827 ms) : 0, 50827
AppSec [candidate] (48.377 ms) : 0, 48377
Remote Config [baseline] (569.304 µs) : 0, 569
Remote Config [candidate] (575.373 µs) : 0, 575
Telemetry [baseline] (7.343 ms) : 0, 7343
Telemetry [candidate] (6.573 ms) : 0, 6573
IAST [baseline] (22.045 ms) : 0, 22045
IAST [candidate] (25.99 ms) : 0, 25990
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (801.43 ms) : 0, 801430
BytebuddyAgent [candidate] (810.79 ms) : 0, 810790
GlobalTracer [baseline] (289.479 ms) : 0, 289479
GlobalTracer [candidate] (292.62 ms) : 0, 292620
AppSec [baseline] (51.845 ms) : 0, 51845
AppSec [candidate] (49.641 ms) : 0, 49641
Remote Config [baseline] (581.708 µs) : 0, 582
Remote Config [candidate] (593.961 µs) : 0, 594
Telemetry [baseline] (6.614 ms) : 0, 6614
Telemetry [candidate] (6.734 ms) : 0, 6734
IAST [baseline] (22.052 ms) : 0, 22052
IAST [candidate] (26.165 ms) : 0, 26165
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (795.142 ms) : 0, 795142
BytebuddyAgent [candidate] (798.818 ms) : 0, 798818
GlobalTracer [baseline] (289.936 ms) : 0, 289936
GlobalTracer [candidate] (291.538 ms) : 0, 291538
AppSec [baseline] (50.038 ms) : 0, 50038
AppSec [candidate] (49.0 ms) : 0, 49000
Remote Config [baseline] (564.927 µs) : 0, 565
Remote Config [candidate] (569.538 µs) : 0, 570
Telemetry [baseline] (6.472 ms) : 0, 6472
Telemetry [candidate] (6.559 ms) : 0, 6559
IAST [baseline] (23.684 ms) : 0, 23684
IAST [candidate] (24.657 ms) : 0, 24657
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.32.0-SNAPSHOT~b7cf900de6, baseline=1.32.0-SNAPSHOT~e20dfff5e5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.103 s) : 0, 1103186
Total [baseline] (9.273 s) : 0, 9273083
Agent [candidate] (1.091 s) : 0, 1091223
Total [candidate] (9.197 s) : 0, 9197471
section appsec
Agent [baseline] (1.203 s) : 0, 1202568
Total [baseline] (9.353 s) : 0, 9353362
Agent [candidate] (1.207 s) : 0, 1206872
Total [candidate] (9.383 s) : 0, 9382985
section iast
Agent [baseline] (1.219 s) : 0, 1219397
Total [baseline] (9.421 s) : 0, 9420634
Agent [candidate] (1.214 s) : 0, 1214365
Total [candidate] (9.458 s) : 0, 9457958
section profiling
Agent [baseline] (1.274 s) : 0, 1274334
Total [baseline] (9.468 s) : 0, 9468362
Agent [candidate] (1.277 s) : 0, 1277125
Total [candidate] (9.354 s) : 0, 9354199
gantt
title petclinic - break down per module: candidate=1.32.0-SNAPSHOT~b7cf900de6, baseline=1.32.0-SNAPSHOT~e20dfff5e5
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (711.445 ms) : 0, 711445
BytebuddyAgent [candidate] (703.355 ms) : 0, 703355
GlobalTracer [baseline] (297.658 ms) : 0, 297658
GlobalTracer [candidate] (295.193 ms) : 0, 295193
AppSec [baseline] (50.325 ms) : 0, 50325
AppSec [candidate] (49.498 ms) : 0, 49498
Remote Config [baseline] (1.103 ms) : 0, 1103
Remote Config [candidate] (1.091 ms) : 0, 1091
Telemetry [baseline] (7.584 ms) : 0, 7584
Telemetry [candidate] (7.484 ms) : 0, 7484
section appsec
BytebuddyAgent [baseline] (697.673 ms) : 0, 697673
BytebuddyAgent [candidate] (699.757 ms) : 0, 699757
GlobalTracer [baseline] (291.933 ms) : 0, 291933
GlobalTracer [candidate] (293.5 ms) : 0, 293500
AppSec [baseline] (153.344 ms) : 0, 153344
AppSec [candidate] (153.801 ms) : 0, 153801
IAST [baseline] (17.84 ms) : 0, 17840
IAST [candidate] (17.935 ms) : 0, 17935
Remote Config [baseline] (603.954 µs) : 0, 604
Remote Config [candidate] (607.697 µs) : 0, 608
Telemetry [baseline] (6.847 ms) : 0, 6847
Telemetry [candidate] (6.88 ms) : 0, 6880
section iast
BytebuddyAgent [baseline] (809.667 ms) : 0, 809667
BytebuddyAgent [candidate] (805.478 ms) : 0, 805478
GlobalTracer [baseline] (292.894 ms) : 0, 292894
GlobalTracer [candidate] (292.256 ms) : 0, 292256
AppSec [baseline] (51.507 ms) : 0, 51507
AppSec [candidate] (51.635 ms) : 0, 51635
IAST [baseline] (23.315 ms) : 0, 23315
IAST [candidate] (23.359 ms) : 0, 23359
Remote Config [baseline] (606.822 µs) : 0, 607
Remote Config [candidate] (573.72 µs) : 0, 574
Telemetry [baseline] (6.716 ms) : 0, 6716
Telemetry [candidate] (6.653 ms) : 0, 6653
section profiling
BytebuddyAgent [baseline] (689.305 ms) : 0, 689305
BytebuddyAgent [candidate] (690.675 ms) : 0, 690675
GlobalTracer [baseline] (375.934 ms) : 0, 375934
GlobalTracer [candidate] (377.614 ms) : 0, 377614
AppSec [baseline] (50.035 ms) : 0, 50035
AppSec [candidate] (50.026 ms) : 0, 50026
Remote Config [baseline] (872.316 µs) : 0, 872
Remote Config [candidate] (812.829 µs) : 0, 813
Telemetry [baseline] (7.237 ms) : 0, 7237
Telemetry [candidate] (7.332 ms) : 0, 7332
ProfilingAgent [baseline] (94.872 ms) : 0, 94872
ProfilingAgent [candidate] (94.526 ms) : 0, 94526
Profiling [baseline] (94.896 ms) : 0, 94896
Profiling [candidate] (94.549 ms) : 0, 94549
LoadRequest duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.32.0-SNAPSHOT~b7cf900de6, baseline=1.32.0-SNAPSHOT~e20dfff5e5
dateFormat X
axisFormat %s
section baseline
no_agent (362.851 µs) : 343, 382
. : milestone, 363,
iast (479.87 µs) : 459, 500
. : milestone, 480,
iast_FULL (544.035 µs) : 523, 565
. : milestone, 544,
iast_GLOBAL (502.759 µs) : 482, 523
. : milestone, 503,
iast_HARDCODED_SECRET_DISABLED (478.796 µs) : 458, 499
. : milestone, 479,
iast_INACTIVE (452.002 µs) : 431, 473
. : milestone, 452,
iast_TELEMETRY_OFF (475.493 µs) : 455, 496
. : milestone, 475,
tracing (453.164 µs) : 433, 474
. : milestone, 453,
section candidate
no_agent (370.295 µs) : 350, 390
. : milestone, 370,
iast (476.325 µs) : 456, 497
. : milestone, 476,
iast_FULL (544.086 µs) : 524, 565
. : milestone, 544,
iast_GLOBAL (497.824 µs) : 478, 518
. : milestone, 498,
iast_HARDCODED_SECRET_DISABLED (484.278 µs) : 464, 505
. : milestone, 484,
iast_INACTIVE (456.508 µs) : 436, 477
. : milestone, 457,
iast_TELEMETRY_OFF (477.886 µs) : 457, 499
. : milestone, 478,
tracing (444.855 µs) : 425, 465
. : milestone, 445,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.32.0-SNAPSHOT~b7cf900de6, baseline=1.32.0-SNAPSHOT~e20dfff5e5
dateFormat X
axisFormat %s
section baseline
no_agent (1.355 ms) : 1336, 1374
. : milestone, 1355,
appsec (1.78 ms) : 1756, 1803
. : milestone, 1780,
iast (1.543 ms) : 1519, 1566
. : milestone, 1543,
profiling (1.584 ms) : 1559, 1608
. : milestone, 1584,
tracing (1.512 ms) : 1489, 1536
. : milestone, 1512,
section candidate
no_agent (1.361 ms) : 1342, 1380
. : milestone, 1361,
appsec (1.783 ms) : 1760, 1807
. : milestone, 1783,
iast (1.517 ms) : 1493, 1541
. : milestone, 1517,
profiling (1.58 ms) : 1555, 1605
. : milestone, 1580,
tracing (1.511 ms) : 1487, 1535
. : milestone, 1511,
|
mcculls
approved these changes
Mar 20, 2024
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.
LGTM, thanks for the additional test
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.
What Does This Do
This fixes a regression in an unreleased profiling feature (queue time) which times how long is spent scheduling tasks which run in thread pools. This was inadvertently broken by #6446 but there wasn't a test in place to prevent this. The root cause was that FutureTask is excluded as a
RUNNABLE
so the timer was no longer started after being moved intoTPEHelper
, but the original instrumentation was using the wrong context field within FutureTask (the one forRunnable
, notRunnableFuture
) in the first place. The solution is to move the starting the queue timer back into the instrumentation, and (hopefully, temporarily) complicating the instrumentation slightly to handleRunnableFuture
s whenever excluded asRUNNABLE
. A test is also added to verify the fix and prevent regression.In the longer term, this instrumentation could be simplified by entirely removing the
RunnableInstrumentation
and only instrumenting or wrapping instances we fully know the state lifecycle of.Motivation
Additional Notes
Jira ticket: [PROJ-IDENT]