JFR based profiling context#6261
Merged
Merged
Conversation
940821f to
2ae0609
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 9 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.25.0-SNAPSHOT~d4f24564dc, baseline=1.25.0-SNAPSHOT~48850c78e8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.03 s) : 0, 1030398
Total [baseline] (9.312 s) : 0, 9311775
Agent [candidate] (1.034 s) : 0, 1033616
Total [candidate] (9.31 s) : 0, 9309587
section appsec
Agent [baseline] (1.118 s) : 0, 1117679
Total [baseline] (9.367 s) : 0, 9366679
Agent [candidate] (1.12 s) : 0, 1120328
Total [candidate] (9.518 s) : 0, 9518066
section iast
Agent [baseline] (1.147 s) : 0, 1147489
Total [baseline] (9.497 s) : 0, 9496897
Agent [candidate] (1.15 s) : 0, 1150455
Total [candidate] (9.485 s) : 0, 9485084
section profiling
Agent [baseline] (1.217 s) : 0, 1217048
Total [baseline] (9.574 s) : 0, 9574487
Agent [candidate] (1.222 s) : 0, 1221867
Total [candidate] (9.671 s) : 0, 9671274
gantt
title petclinic - break down per module: candidate=1.25.0-SNAPSHOT~d4f24564dc, baseline=1.25.0-SNAPSHOT~48850c78e8
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (643.336 ms) : 0, 643336
BytebuddyAgent [candidate] (644.271 ms) : 0, 644271
GlobalTracer [baseline] (296.656 ms) : 0, 296656
GlobalTracer [candidate] (298.942 ms) : 0, 298942
AppSec [baseline] (48.218 ms) : 0, 48218
AppSec [candidate] (48.233 ms) : 0, 48233
Remote Config [baseline] (676.263 µs) : 0, 676
Remote Config [candidate] (672.793 µs) : 0, 673
Telemetry [baseline] (7.273 ms) : 0, 7273
Telemetry [candidate] (7.227 ms) : 0, 7227
section appsec
BytebuddyAgent [baseline] (642.813 ms) : 0, 642813
BytebuddyAgent [candidate] (643.624 ms) : 0, 643624
GlobalTracer [baseline] (296.907 ms) : 0, 296907
GlobalTracer [candidate] (298.369 ms) : 0, 298369
AppSec [baseline] (136.308 ms) : 0, 136308
AppSec [candidate] (136.725 ms) : 0, 136725
Remote Config [baseline] (652.989 µs) : 0, 653
Remote Config [candidate] (641.861 µs) : 0, 642
Telemetry [baseline] (6.743 ms) : 0, 6743
Telemetry [candidate] (6.718 ms) : 0, 6718
section iast
BytebuddyAgent [baseline] (762.171 ms) : 0, 762171
BytebuddyAgent [candidate] (764.572 ms) : 0, 764572
GlobalTracer [baseline] (276.939 ms) : 0, 276939
GlobalTracer [candidate] (278.63 ms) : 0, 278630
AppSec [baseline] (50.446 ms) : 0, 50446
AppSec [candidate] (50.571 ms) : 0, 50571
Remote Config [baseline] (561.94 µs) : 0, 562
Remote Config [candidate] (572.35 µs) : 0, 572
Telemetry [baseline] (8.591 ms) : 0, 8591
Telemetry [candidate] (7.837 ms) : 0, 7837
IAST [baseline] (14.592 ms) : 0, 14592
IAST [candidate] (14.014 ms) : 0, 14014
section profiling
BytebuddyAgent [baseline] (652.225 ms) : 0, 652225
BytebuddyAgent [candidate] (654.558 ms) : 0, 654558
GlobalTracer [baseline] (366.907 ms) : 0, 366907
GlobalTracer [candidate] (368.371 ms) : 0, 368371
AppSec [baseline] (48.374 ms) : 0, 48374
AppSec [candidate] (48.417 ms) : 0, 48417
Remote Config [baseline] (706.374 µs) : 0, 706
Remote Config [candidate] (699.342 µs) : 0, 699
Telemetry [baseline] (7.336 ms) : 0, 7336
Telemetry [candidate] (7.417 ms) : 0, 7417
ProfilingAgent [baseline] (87.658 ms) : 0, 87658
ProfilingAgent [candidate] (88.35 ms) : 0, 88350
Profiling [baseline] (87.681 ms) : 0, 87681
Profiling [candidate] (88.373 ms) : 0, 88373
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.25.0-SNAPSHOT~d4f24564dc, baseline=1.25.0-SNAPSHOT~48850c78e8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1036011
Total [baseline] (8.665 s) : 0, 8664585
Agent [candidate] (1.038 s) : 0, 1037887
Total [candidate] (8.683 s) : 0, 8683103
section iast
Agent [baseline] (1.145 s) : 0, 1145100
Total [baseline] (9.194 s) : 0, 9194156
Agent [candidate] (1.152 s) : 0, 1151582
Total [candidate] (9.23 s) : 0, 9230280
section iast_TELEMETRY_OFF
Agent [baseline] (1.138 s) : 0, 1138273
Total [baseline] (9.18 s) : 0, 9180097
Agent [candidate] (1.144 s) : 0, 1143575
Total [candidate] (9.217 s) : 0, 9216844
gantt
title insecure-bank - break down per module: candidate=1.25.0-SNAPSHOT~d4f24564dc, baseline=1.25.0-SNAPSHOT~48850c78e8
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (646.746 ms) : 0, 646746
BytebuddyAgent [candidate] (647.315 ms) : 0, 647315
GlobalTracer [baseline] (298.427 ms) : 0, 298427
GlobalTracer [candidate] (299.701 ms) : 0, 299701
AppSec [baseline] (48.344 ms) : 0, 48344
AppSec [candidate] (48.412 ms) : 0, 48412
Remote Config [baseline] (672.855 µs) : 0, 673
Remote Config [candidate] (674.597 µs) : 0, 675
Telemetry [baseline] (7.366 ms) : 0, 7366
Telemetry [candidate] (7.278 ms) : 0, 7278
section iast
BytebuddyAgent [baseline] (760.512 ms) : 0, 760512
BytebuddyAgent [candidate] (764.59 ms) : 0, 764590
GlobalTracer [baseline] (276.475 ms) : 0, 276475
GlobalTracer [candidate] (278.825 ms) : 0, 278825
AppSec [baseline] (50.837 ms) : 0, 50837
AppSec [candidate] (51.259 ms) : 0, 51259
IAST [baseline] (14.686 ms) : 0, 14686
IAST [candidate] (14.05 ms) : 0, 14050
Remote Config [baseline] (560.103 µs) : 0, 560
Remote Config [candidate] (570.952 µs) : 0, 571
Telemetry [baseline] (7.919 ms) : 0, 7919
Telemetry [candidate] (7.982 ms) : 0, 7982
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (754.492 ms) : 0, 754492
BytebuddyAgent [candidate] (757.415 ms) : 0, 757415
GlobalTracer [baseline] (276.941 ms) : 0, 276941
GlobalTracer [candidate] (278.576 ms) : 0, 278576
AppSec [baseline] (46.461 ms) : 0, 46461
AppSec [candidate] (46.593 ms) : 0, 46593
IAST [baseline] (17.219 ms) : 0, 17219
IAST [candidate] (16.872 ms) : 0, 16872
Remote Config [baseline] (563.586 µs) : 0, 564
Remote Config [candidate] (598.397 µs) : 0, 598
Telemetry [baseline] (8.383 ms) : 0, 8383
Telemetry [candidate] (9.278 ms) : 0, 9278
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 8 metrics, 14 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.25.0-SNAPSHOT~d4f24564dc, baseline=1.25.0-SNAPSHOT~48850c78e8
dateFormat X
axisFormat %s
section baseline
no_agent (1.374 ms) : 1355, 1394
. : milestone, 1374,
appsec (1.756 ms) : 1731, 1782
. : milestone, 1756,
iast (1.529 ms) : 1505, 1553
. : milestone, 1529,
profiling (1.507 ms) : 1481, 1533
. : milestone, 1507,
tracing (1.509 ms) : 1484, 1534
. : milestone, 1509,
section candidate
no_agent (1.348 ms) : 1328, 1367
. : milestone, 1348,
appsec (1.76 ms) : 1735, 1785
. : milestone, 1760,
iast (1.515 ms) : 1491, 1539
. : milestone, 1515,
profiling (1.511 ms) : 1486, 1536
. : milestone, 1511,
tracing (1.521 ms) : 1496, 1547
. : milestone, 1521,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.25.0-SNAPSHOT~d4f24564dc, baseline=1.25.0-SNAPSHOT~48850c78e8
dateFormat X
axisFormat %s
section baseline
no_agent (362.907 µs) : 342, 384
. : milestone, 363,
iast (469.146 µs) : 448, 490
. : milestone, 469,
iast_FULL (529.326 µs) : 509, 550
. : milestone, 529,
iast_INACTIVE (441.569 µs) : 420, 463
. : milestone, 442,
iast_TELEMETRY_OFF (469.365 µs) : 449, 490
. : milestone, 469,
tracing (441.186 µs) : 420, 463
. : milestone, 441,
section candidate
no_agent (366.349 µs) : 344, 389
. : milestone, 366,
iast (474.464 µs) : 454, 495
. : milestone, 474,
iast_FULL (531.164 µs) : 511, 552
. : milestone, 531,
iast_INACTIVE (441.649 µs) : 421, 462
. : milestone, 442,
iast_TELEMETRY_OFF (467.321 µs) : 446, 488
. : milestone, 467,
tracing (438.355 µs) : 418, 459
. : milestone, 438,
|
51c7ca5 to
1afead4
Compare
…, introduce TimelineEvent
1afead4 to
b02d04d
Compare
510ac72 to
3e07c6e
Compare
3e07c6e to
d4f2456
Compare
jbachorik
approved these changes
Nov 23, 2023
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.
What Does This Do
This emits JFR events spanning each scope activation. It does this by introducing an interface called
Statefulwhich is anAutoCloseablewhich hides the checked exception, and the scope manager creates thisStatefulwhen it creates scopes, and the scopes ensure theStatefulis closed when the scope is closed. When a scope becomes the top of the scope stack again, it passes the context to theStateful::activatemethod, which theStatefulimplementation is free to use or ignore. These interactions are enough to generalise over the existing ddprof-based context integration, and a new one which is essentially identical to the first incarnation of scope events. This refactoring moves most of the profiling logic out of the scope stack, except for the notifications of when the stack becomes empty/non-empty.A new implementation of
ProfilingContextIntegrationis registered when a feature flag is set and ddprof is disabled, is not supported on the current OS, or cannot be loaded for other reasons. This implementation simply produces aTimelineEventwhen a scope is started, does nothing when a scope is reactivated, and commits the event when the scope is closed if enough time has elapsed since its creation. Dealing with stack of overlapping events is handled in our backend.Motivation
This is required for filtering down to trace level in the timeline when ddprof is not in use, which widens support for the trace level timeline.
Additional Notes
Jira ticket: PROF-8687