-
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
Fix native-image generation of reactive applications #8012
Draft
mcculls
wants to merge
3
commits into
master
Choose a base branch
from
mcculls/fix-async-result-on-graal
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
mcculls
added
type: bug
inst: reactor
Reactor instrumentation
comp: native-image
GraalVM native-image
labels
Nov 25, 2024
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 9 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.087 s) : 0, 1087270
Total [baseline] (10.442 s) : 0, 10441843
Agent [candidate] (1.092 s) : 0, 1092406
Total [candidate] (10.482 s) : 0, 10481864
section appsec
Agent [baseline] (1.222 s) : 0, 1222030
Total [baseline] (10.709 s) : 0, 10709007
Agent [candidate] (1.232 s) : 0, 1232250
Total [candidate] (10.771 s) : 0, 10771157
section iast
Agent [baseline] (1.229 s) : 0, 1229494
Total [baseline] (11.004 s) : 0, 11004414
Agent [candidate] (1.221 s) : 0, 1220860
Total [candidate] (11.019 s) : 0, 11019040
section profiling
Agent [baseline] (1.315 s) : 0, 1314603
Total [baseline] (10.868 s) : 0, 10867643
Agent [candidate] (1.318 s) : 0, 1318018
Total [candidate] (10.893 s) : 0, 10893276
gantt
title petclinic - break down per module: candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.053 ms) : 0, 692053
BytebuddyAgent [candidate] (695.151 ms) : 0, 695151
GlobalTracer [baseline] (318.024 ms) : 0, 318024
GlobalTracer [candidate] (318.472 ms) : 0, 318472
AppSec [baseline] (54.43 ms) : 0, 54430
AppSec [candidate] (54.5 ms) : 0, 54500
Remote Config [baseline] (681.194 µs) : 0, 681
Remote Config [candidate] (691.912 µs) : 0, 692
Telemetry [baseline] (8.417 ms) : 0, 8417
Telemetry [candidate] (9.832 ms) : 0, 9832
section appsec
BytebuddyAgent [baseline] (709.462 ms) : 0, 709462
BytebuddyAgent [candidate] (715.344 ms) : 0, 715344
GlobalTracer [baseline] (314.149 ms) : 0, 314149
GlobalTracer [candidate] (316.683 ms) : 0, 316683
AppSec [baseline] (165.983 ms) : 0, 165983
AppSec [candidate] (167.501 ms) : 0, 167501
Remote Config [baseline] (653.112 µs) : 0, 653
Remote Config [candidate] (654.233 µs) : 0, 654
Telemetry [baseline] (8.584 ms) : 0, 8584
Telemetry [candidate] (8.647 ms) : 0, 8647
IAST [baseline] (19.082 ms) : 0, 19082
IAST [candidate] (19.239 ms) : 0, 19239
section iast
BytebuddyAgent [baseline] (818.865 ms) : 0, 818865
BytebuddyAgent [candidate] (812.542 ms) : 0, 812542
GlobalTracer [baseline] (309.416 ms) : 0, 309416
GlobalTracer [candidate] (307.409 ms) : 0, 307409
AppSec [baseline] (55.691 ms) : 0, 55691
AppSec [candidate] (56.689 ms) : 0, 56689
Remote Config [baseline] (629.782 µs) : 0, 630
Remote Config [candidate] (625.828 µs) : 0, 626
Telemetry [baseline] (7.555 ms) : 0, 7555
Telemetry [candidate] (7.501 ms) : 0, 7501
IAST [baseline] (23.489 ms) : 0, 23489
IAST [candidate] (22.333 ms) : 0, 22333
section profiling
BytebuddyAgent [baseline] (687.849 ms) : 0, 687849
BytebuddyAgent [candidate] (688.78 ms) : 0, 688780
GlobalTracer [baseline] (432.901 ms) : 0, 432901
GlobalTracer [candidate] (434.3 ms) : 0, 434300
AppSec [baseline] (53.517 ms) : 0, 53517
AppSec [candidate] (53.745 ms) : 0, 53745
Remote Config [baseline] (657.708 µs) : 0, 658
Remote Config [candidate] (660.136 µs) : 0, 660
Telemetry [baseline] (7.759 ms) : 0, 7759
Telemetry [candidate] (7.842 ms) : 0, 7842
ProfilingAgent [baseline] (92.945 ms) : 0, 92945
ProfilingAgent [candidate] (93.537 ms) : 0, 93537
Profiling [baseline] (92.969 ms) : 0, 92969
Profiling [candidate] (93.56 ms) : 0, 93560
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.091 s) : 0, 1091330
Total [baseline] (8.681 s) : 0, 8681023
Agent [candidate] (1.09 s) : 0, 1089629
Total [candidate] (8.674 s) : 0, 8673792
section iast
Agent [baseline] (1.221 s) : 0, 1220569
Total [baseline] (9.212 s) : 0, 9212216
Agent [candidate] (1.218 s) : 0, 1218169
Total [candidate] (9.221 s) : 0, 9220787
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.216 s) : 0, 1215776
Total [baseline] (9.184 s) : 0, 9183865
Agent [candidate] (1.221 s) : 0, 1221152
Total [candidate] (9.227 s) : 0, 9227464
section iast_TELEMETRY_OFF
Agent [baseline] (1.216 s) : 0, 1216191
Total [baseline] (9.214 s) : 0, 9213539
Agent [candidate] (1.217 s) : 0, 1216767
Total [candidate] (9.198 s) : 0, 9198009
gantt
title insecure-bank - break down per module: candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (695.497 ms) : 0, 695497
BytebuddyAgent [candidate] (693.146 ms) : 0, 693146
GlobalTracer [baseline] (318.695 ms) : 0, 318695
GlobalTracer [candidate] (318.215 ms) : 0, 318215
AppSec [baseline] (54.914 ms) : 0, 54914
AppSec [candidate] (54.752 ms) : 0, 54752
Remote Config [baseline] (679.426 µs) : 0, 679
Remote Config [candidate] (682.113 µs) : 0, 682
Telemetry [baseline] (7.794 ms) : 0, 7794
Telemetry [candidate] (9.1 ms) : 0, 9100
section iast
BytebuddyAgent [baseline] (812.806 ms) : 0, 812806
BytebuddyAgent [candidate] (810.787 ms) : 0, 810787
GlobalTracer [baseline] (306.627 ms) : 0, 306627
GlobalTracer [candidate] (306.925 ms) : 0, 306925
AppSec [baseline] (57.459 ms) : 0, 57459
AppSec [candidate] (57.986 ms) : 0, 57986
IAST [baseline] (21.734 ms) : 0, 21734
IAST [candidate] (20.525 ms) : 0, 20525
Remote Config [baseline] (615.97 µs) : 0, 616
Remote Config [candidate] (615.674 µs) : 0, 616
Telemetry [baseline] (7.56 ms) : 0, 7560
Telemetry [candidate] (7.564 ms) : 0, 7564
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (808.964 ms) : 0, 808964
BytebuddyAgent [candidate] (812.4 ms) : 0, 812400
GlobalTracer [baseline] (306.227 ms) : 0, 306227
GlobalTracer [candidate] (307.446 ms) : 0, 307446
AppSec [baseline] (56.536 ms) : 0, 56536
AppSec [candidate] (57.696 ms) : 0, 57696
IAST [baseline] (22.254 ms) : 0, 22254
IAST [candidate] (21.669 ms) : 0, 21669
Remote Config [baseline] (606.912 µs) : 0, 607
Remote Config [candidate] (613.968 µs) : 0, 614
Telemetry [baseline] (7.486 ms) : 0, 7486
Telemetry [candidate] (7.538 ms) : 0, 7538
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (809.095 ms) : 0, 809095
BytebuddyAgent [candidate] (808.989 ms) : 0, 808989
GlobalTracer [baseline] (307.37 ms) : 0, 307370
GlobalTracer [candidate] (307.766 ms) : 0, 307766
AppSec [baseline] (56.961 ms) : 0, 56961
AppSec [candidate] (57.753 ms) : 0, 57753
IAST [baseline] (21.077 ms) : 0, 21077
IAST [candidate] (20.423 ms) : 0, 20423
Remote Config [baseline] (611.974 µs) : 0, 612
Remote Config [candidate] (639.161 µs) : 0, 639
Telemetry [baseline] (7.324 ms) : 0, 7324
Telemetry [candidate] (7.398 ms) : 0, 7398
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section baseline
no_agent (368.718 µs) : 349, 389
. : milestone, 369,
iast (484.886 µs) : 463, 506
. : milestone, 485,
iast_FULL (641.988 µs) : 620, 664
. : milestone, 642,
iast_GLOBAL (519.915 µs) : 497, 542
. : milestone, 520,
iast_HARDCODED_SECRET_DISABLED (484.215 µs) : 463, 506
. : milestone, 484,
iast_INACTIVE (445.93 µs) : 425, 467
. : milestone, 446,
iast_TELEMETRY_OFF (469.663 µs) : 448, 491
. : milestone, 470,
tracing (439.415 µs) : 418, 461
. : milestone, 439,
section candidate
no_agent (368.58 µs) : 349, 389
. : milestone, 369,
iast (487.464 µs) : 466, 509
. : milestone, 487,
iast_FULL (642.64 µs) : 621, 664
. : milestone, 643,
iast_GLOBAL (511.47 µs) : 490, 533
. : milestone, 511,
iast_HARDCODED_SECRET_DISABLED (485.055 µs) : 464, 507
. : milestone, 485,
iast_INACTIVE (444.213 µs) : 423, 465
. : milestone, 444,
iast_TELEMETRY_OFF (483.606 µs) : 462, 506
. : milestone, 484,
tracing (443.802 µs) : 423, 465
. : milestone, 444,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section baseline
no_agent (1.339 ms) : 1320, 1358
. : milestone, 1339,
appsec (1.73 ms) : 1704, 1757
. : milestone, 1730,
appsec_no_iast (1.741 ms) : 1716, 1765
. : milestone, 1741,
iast (1.495 ms) : 1473, 1518
. : milestone, 1495,
profiling (1.536 ms) : 1510, 1561
. : milestone, 1536,
tracing (1.485 ms) : 1458, 1513
. : milestone, 1485,
section candidate
no_agent (1.34 ms) : 1320, 1359
. : milestone, 1340,
appsec (1.742 ms) : 1717, 1767
. : milestone, 1742,
appsec_no_iast (1.748 ms) : 1723, 1772
. : milestone, 1748,
iast (1.487 ms) : 1464, 1510
. : milestone, 1487,
profiling (1.543 ms) : 1518, 1568
. : milestone, 1543,
tracing (1.491 ms) : 1467, 1515
. : milestone, 1491,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section baseline
no_agent (1.467 ms) : 1456, 1479
. : milestone, 1467,
appsec (2.343 ms) : 2302, 2385
. : milestone, 2343,
iast (2.078 ms) : 2026, 2131
. : milestone, 2078,
iast_GLOBAL (2.13 ms) : 2078, 2183
. : milestone, 2130,
profiling (1.955 ms) : 1913, 1998
. : milestone, 1955,
tracing (1.925 ms) : 1885, 1966
. : milestone, 1925,
section candidate
no_agent (1.465 ms) : 1453, 1476
. : milestone, 1465,
appsec (2.332 ms) : 2291, 2373
. : milestone, 2332,
iast (2.079 ms) : 2027, 2132
. : milestone, 2079,
iast_GLOBAL (2.13 ms) : 2077, 2183
. : milestone, 2130,
profiling (1.967 ms) : 1924, 2010
. : milestone, 1967,
tracing (1.921 ms) : 1881, 1961
. : milestone, 1921,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~1c93dacf08, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section baseline
no_agent (14.929 s) : 14929000, 14929000
. : milestone, 14929000,
appsec (14.89 s) : 14890000, 14890000
. : milestone, 14890000,
iast (18.696 s) : 18696000, 18696000
. : milestone, 18696000,
iast_GLOBAL (17.681 s) : 17681000, 17681000
. : milestone, 17681000,
profiling (15.228 s) : 15228000, 15228000
. : milestone, 15228000,
tracing (14.957 s) : 14957000, 14957000
. : milestone, 14957000,
section candidate
no_agent (15.627 s) : 15627000, 15627000
. : milestone, 15627000,
appsec (15.116 s) : 15116000, 15116000
. : milestone, 15116000,
iast (18.685 s) : 18685000, 18685000
. : milestone, 18685000,
iast_GLOBAL (17.798 s) : 17798000, 17798000
. : milestone, 17798000,
profiling (15.04 s) : 15040000, 15040000
. : milestone, 15040000,
tracing (14.775 s) : 14775000, 14775000
. : milestone, 14775000,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Refactors registration of
AsyncResult
extensions so it doesn't pull inAsyncResultDecorator
and all the associated decorator and function classes at bytecode transformation time, which would pollute the analyzed heap and lead to them all needing to be marked as build-time.Also marks the runtime holder of
AsyncResult
extensions as re-runnable. This avoids having to list all the different extensions that might end up registered as build-time, but also avoids double registrations where the same extension is registered at build-time via native-image - and at runtime via the compiled type initializer.Finally extensions are now registered when the relevant reactive type is loaded - rather than on each construction. This should still meet the original requirements, but be more performant.
Motivation
The recent refactoring of
AsyncResult
extensions caused a regression in our native-image support, but only when a reactive library was on the application class-path.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: AIDM-447