Skip to content

Conversation

@amarziali
Copy link
Contributor

@amarziali amarziali commented Apr 28, 2025

What Does This Do

Our reactor-core instrumentation needs to access to the currentContext() in order to eventually propagate the active span the user can provide under the dd.span key.
The issue, raised by one customer, is that access can eat a lot of cpu time because of the way reactor is working.
In fact, the reactor operators, are nested and for InnerOperators (https://github.com/reactor/reactor-core/blob/718cc691dc3610e6a46636b2e90f1a37bb434669/reactor-core/src/main/java/reactor/core/publisher/InnerOperator.java#L33) the call is delegating to the enclosed one.

This means that on each subscribe and onNext we're calling a lot of method wasting time and causing performance issue.
That PR is addressing the issue by limiting that context access only when needed

Motivation

Additional Notes

Contributor Checklist

Jira ticket: AIDM-611

@amarziali amarziali added tag: performance Performance related changes inst: reactor Reactor instrumentation labels Apr 28, 2025
@amarziali amarziali requested a review from a team as a code owner April 28, 2025 14:40
@github-actions
Copy link
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@amarziali amarziali requested a review from mcculls April 28, 2025 14:40
@amarziali amarziali added the type: enhancement Enhancements and improvements label Apr 28, 2025
@pr-commenter
Copy link

pr-commenter bot commented Apr 28, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/reactor-optimize
git_commit_date 1745847396 1745850016
git_commit_sha bd7a9c8 cdc63bd
release_version 1.49.0-SNAPSHOT~bd7a9c8502 1.49.0-SNAPSHOT~cdc63bd130
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1745852957 1745852957
ci_job_id 915100201 915100201
ci_pipeline_id 63499836 63499836
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ekfrqbyz-project-304-concurrent-0-ap8w5rs0 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-ekfrqbyz-project-304-concurrent-0-ap8w5rs0 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 67 metrics, 4 unstable metrics.

Startup time reports for insecure-bank
gantt title insecure-bank - global startup overhead: candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section tracing Agent [baseline] (1.019 s) : 0, 1019051 Total [baseline] (8.671 s) : 0, 8671141 Agent [candidate] (1.004 s) : 0, 1003845 Total [candidate] (8.628 s) : 0, 8628432 section iast Agent [baseline] (1.135 s) : 0, 1135273 Total [baseline] (9.211 s) : 0, 9210724 Agent [candidate] (1.144 s) : 0, 1144478 Total [candidate] (9.198 s) : 0, 9197630 section iast_HARDCODED_SECRET_DISABLED Agent [baseline] (1.139 s) : 0, 1139139 Total [baseline] (9.154 s) : 0, 9154348 Agent [candidate] (1.147 s) : 0, 1147050 Total [candidate] (9.168 s) : 0, 9167656 section iast_TELEMETRY_OFF Agent [baseline] (1.136 s) : 0, 1135628 Total [baseline] (9.201 s) : 0, 9200840 Agent [candidate] (1.134 s) : 0, 1133779 Total [candidate] (9.227 s) : 0, 9226658 
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.019 s -
Agent iast 1.135 s 116.222 ms (11.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.139 s 120.088 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.136 s 116.577 ms (11.4%)
Total tracing 8.671 s -
Total iast 9.211 s 539.583 ms (6.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.154 s 483.206 ms (5.6%)
Total iast_TELEMETRY_OFF 9.201 s 529.699 ms (6.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.004 s -
Agent iast 1.144 s 140.633 ms (14.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.147 s 143.205 ms (14.3%)
Agent iast_TELEMETRY_OFF 1.134 s 129.934 ms (12.9%)
Total tracing 8.628 s -
Total iast 9.198 s 569.198 ms (6.6%)
Total iast_HARDCODED_SECRET_DISABLED 9.168 s 539.224 ms (6.2%)
Total iast_TELEMETRY_OFF 9.227 s 598.226 ms (6.9%)
gantt title insecure-bank - break down per module: candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section tracing BytebuddyAgent [baseline] (679.071 ms) : 0, 679071 BytebuddyAgent [candidate] (668.807 ms) : 0, 668807 GlobalTracer [baseline] (242.998 ms) : 0, 242998 GlobalTracer [candidate] (239.64 ms) : 0, 239640 AppSec [baseline] (55.528 ms) : 0, 55528 AppSec [candidate] (54.52 ms) : 0, 54520 Debugger [baseline] (6.225 ms) : 0, 6225 Debugger [candidate] (6.896 ms) : 0, 6896 Remote Config [baseline] (723.081 µs) : 0, 723 Remote Config [candidate] (705.994 µs) : 0, 706 Telemetry [baseline] (10.908 ms) : 0, 10908 Telemetry [candidate] (9.926 ms) : 0, 9926 section iast BytebuddyAgent [baseline] (788.509 ms) : 0, 788509 BytebuddyAgent [candidate] (795.993 ms) : 0, 795993 GlobalTracer [baseline] (229.895 ms) : 0, 229895 GlobalTracer [candidate] (231.324 ms) : 0, 231324 IAST [baseline] (22.76 ms) : 0, 22760 IAST [candidate] (23.078 ms) : 0, 23078 AppSec [baseline] (56.407 ms) : 0, 56407 AppSec [candidate] (56.191 ms) : 0, 56191 Debugger [baseline] (5.849 ms) : 0, 5849 Debugger [candidate] (5.858 ms) : 0, 5858 Remote Config [baseline] (590.319 µs) : 0, 590 Remote Config [candidate] (578.842 µs) : 0, 579 Telemetry [baseline] (7.873 ms) : 0, 7873 Telemetry [candidate] (7.916 ms) : 0, 7916 section iast_HARDCODED_SECRET_DISABLED BytebuddyAgent [baseline] (790.71 ms) : 0, 790710 BytebuddyAgent [candidate] (797.405 ms) : 0, 797405 GlobalTracer [baseline] (230.622 ms) : 0, 230622 GlobalTracer [candidate] (232.006 ms) : 0, 232006 IAST [baseline] (22.932 ms) : 0, 22932 IAST [candidate] (23.163 ms) : 0, 23163 AppSec [baseline] (56.802 ms) : 0, 56802 AppSec [candidate] (56.519 ms) : 0, 56519 Debugger [baseline] (5.979 ms) : 0, 5979 Debugger [candidate] (5.893 ms) : 0, 5893 Remote Config [baseline] (592.927 µs) : 0, 593 Remote Config [candidate] (598.819 µs) : 0, 599 Telemetry [baseline] (7.987 ms) : 0, 7987 Telemetry [candidate] (7.868 ms) : 0, 7868 section iast_TELEMETRY_OFF BytebuddyAgent [baseline] (788.597 ms) : 0, 788597 BytebuddyAgent [candidate] (787.036 ms) : 0, 787036 GlobalTracer [baseline] (230.209 ms) : 0, 230209 GlobalTracer [candidate] (230.114 ms) : 0, 230114 IAST [baseline] (22.352 ms) : 0, 22352 IAST [candidate] (22.366 ms) : 0, 22366 AppSec [baseline] (56.579 ms) : 0, 56579 AppSec [candidate] (56.544 ms) : 0, 56544 Debugger [baseline] (5.946 ms) : 0, 5946 Debugger [candidate] (5.929 ms) : 0, 5929 Remote Config [baseline] (601.614 µs) : 0, 602 Remote Config [candidate] (612.616 µs) : 0, 613 Telemetry [baseline] (7.804 ms) : 0, 7804 Telemetry [candidate] (7.77 ms) : 0, 7770 
Loading
Startup time reports for petclinic
gantt title petclinic - global startup overhead: candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section tracing Agent [baseline] (1.004 s) : 0, 1003767 Total [baseline] (10.462 s) : 0, 10462327 Agent [candidate] (1.006 s) : 0, 1005780 Total [candidate] (10.566 s) : 0, 10565552 section appsec Agent [baseline] (1.152 s) : 0, 1152291 Total [baseline] (10.66 s) : 0, 10659535 Agent [candidate] (1.148 s) : 0, 1148291 Total [candidate] (10.646 s) : 0, 10645751 section iast Agent [baseline] (1.136 s) : 0, 1136453 Total [baseline] (10.852 s) : 0, 10852399 Agent [candidate] (1.135 s) : 0, 1135380 Total [candidate] (10.874 s) : 0, 10874383 section profiling Agent [baseline] (1.27 s) : 0, 1270067 Total [baseline] (10.759 s) : 0, 10758583 Agent [candidate] (1.262 s) : 0, 1262274 Total [candidate] (10.757 s) : 0, 10756656 
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.004 s -
Agent appsec 1.152 s 148.525 ms (14.8%)
Agent iast 1.136 s 132.687 ms (13.2%)
Agent profiling 1.27 s 266.3 ms (26.5%)
Total tracing 10.462 s -
Total appsec 10.66 s 197.208 ms (1.9%)
Total iast 10.852 s 390.072 ms (3.7%)
Total profiling 10.759 s 296.255 ms (2.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.006 s -
Agent appsec 1.148 s 142.51 ms (14.2%)
Agent iast 1.135 s 129.6 ms (12.9%)
Agent profiling 1.262 s 256.493 ms (25.5%)
Total tracing 10.566 s -
Total appsec 10.646 s 80.199 ms (0.8%)
Total iast 10.874 s 308.831 ms (2.9%)
Total profiling 10.757 s 191.104 ms (1.8%)
gantt title petclinic - break down per module: candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section tracing BytebuddyAgent [baseline] (668.836 ms) : 0, 668836 BytebuddyAgent [candidate] (670.45 ms) : 0, 670450 GlobalTracer [baseline] (239.872 ms) : 0, 239872 GlobalTracer [candidate] (240.454 ms) : 0, 240454 AppSec [baseline] (54.332 ms) : 0, 54332 AppSec [candidate] (54.683 ms) : 0, 54683 Debugger [baseline] (6.114 ms) : 0, 6114 Debugger [candidate] (6.177 ms) : 0, 6177 Remote Config [baseline] (701.628 µs) : 0, 702 Remote Config [candidate] (722.98 µs) : 0, 723 Telemetry [baseline] (10.536 ms) : 0, 10536 Telemetry [candidate] (9.907 ms) : 0, 9907 section appsec BytebuddyAgent [baseline] (690.794 ms) : 0, 690794 BytebuddyAgent [candidate] (687.727 ms) : 0, 687727 GlobalTracer [baseline] (237.183 ms) : 0, 237183 GlobalTracer [candidate] (236.372 ms) : 0, 236372 AppSec [baseline] (176.081 ms) : 0, 176081 AppSec [candidate] (175.322 ms) : 0, 175322 Debugger [baseline] (5.86 ms) : 0, 5860 Debugger [candidate] (5.873 ms) : 0, 5873 Remote Config [baseline] (624.12 µs) : 0, 624 Remote Config [candidate] (631.114 µs) : 0, 631 Telemetry [baseline] (7.364 ms) : 0, 7364 Telemetry [candidate] (8.12 ms) : 0, 8120 IAST [baseline] (21.971 ms) : 0, 21971 IAST [candidate] (21.771 ms) : 0, 21771 section iast BytebuddyAgent [baseline] (790.026 ms) : 0, 790026 BytebuddyAgent [candidate] (788.521 ms) : 0, 788521 GlobalTracer [baseline] (229.905 ms) : 0, 229905 GlobalTracer [candidate] (230.244 ms) : 0, 230244 AppSec [baseline] (56.193 ms) : 0, 56193 AppSec [candidate] (56.207 ms) : 0, 56207 Debugger [baseline] (5.851 ms) : 0, 5851 Debugger [candidate] (5.846 ms) : 0, 5846 Remote Config [baseline] (596.946 µs) : 0, 597 Remote Config [candidate] (597.855 µs) : 0, 598 Telemetry [baseline] (7.835 ms) : 0, 7835 Telemetry [candidate] (7.863 ms) : 0, 7863 IAST [baseline] (22.595 ms) : 0, 22595 IAST [candidate] (22.684 ms) : 0, 22684 section profiling BytebuddyAgent [baseline] (672.363 ms) : 0, 672363 BytebuddyAgent [candidate] (667.181 ms) : 0, 667181 GlobalTracer [baseline] (378.523 ms) : 0, 378523 GlobalTracer [candidate] (377.078 ms) : 0, 377078 AppSec [baseline] (55.059 ms) : 0, 55059 AppSec [candidate] (53.785 ms) : 0, 53785 Debugger [baseline] (6.224 ms) : 0, 6224 Debugger [candidate] (6.202 ms) : 0, 6202 Remote Config [baseline] (656.733 µs) : 0, 657 Remote Config [candidate] (671.652 µs) : 0, 672 Telemetry [baseline] (8.294 ms) : 0, 8294 Telemetry [candidate] (8.289 ms) : 0, 8289 ProfilingAgent [baseline] (98.104 ms) : 0, 98104 ProfilingAgent [candidate] (98.603 ms) : 0, 98603 Profiling [baseline] (98.128 ms) : 0, 98128 Profiling [candidate] (98.628 ms) : 0, 98628 
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-04-28T14:39:44 2025-04-28T14:47:26
git_branch master andrea.marziali/reactor-optimize
git_commit_date 1745847396 1745850016
git_commit_sha bd7a9c8 cdc63bd
release_version 1.49.0-SNAPSHOT~bd7a9c8502 1.49.0-SNAPSHOT~cdc63bd130
start_time 2025-04-28T14:39:30 2025-04-28T14:47:12
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1745852043 1745852043
ci_job_id 915100202 915100202
ci_pipeline_id 63499836 63499836
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ekfrqbyz-project-304-concurrent-1-91vletrn 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-ekfrqbyz-project-304-concurrent-1-91vletrn 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics.

Request duration reports for insecure-bank
gantt title insecure-bank - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section baseline no_agent (375.121 µs) : 355, 395 . : milestone, 375, iast (522.0 µs) : 499, 545 . : milestone, 522, iast_FULL (727.572 µs) : 704, 751 . : milestone, 728, iast_GLOBAL (569.138 µs) : 546, 592 . : milestone, 569, iast_HARDCODED_SECRET_DISABLED (510.98 µs) : 488, 534 . : milestone, 511, iast_INACTIVE (466.673 µs) : 443, 490 . : milestone, 467, iast_TELEMETRY_OFF (510.579 µs) : 488, 534 . : milestone, 511, tracing (460.557 µs) : 439, 482 . : milestone, 461, section candidate no_agent (377.09 µs) : 357, 397 . : milestone, 377, iast (506.042 µs) : 483, 529 . : milestone, 506, iast_FULL (722.309 µs) : 699, 746 . : milestone, 722, iast_GLOBAL (567.523 µs) : 543, 592 . : milestone, 568, iast_HARDCODED_SECRET_DISABLED (518.547 µs) : 496, 541 . : milestone, 519, iast_INACTIVE (467.801 µs) : 445, 491 . : milestone, 468, iast_TELEMETRY_OFF (496.941 µs) : 474, 520 . : milestone, 497, tracing (455.916 µs) : 434, 478 . : milestone, 456, 
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.121 µs [355.035 µs, 395.208 µs] -
iast 522.0 µs [499.027 µs, 544.973 µs] 146.879 µs (39.2%)
iast_FULL 727.572 µs [704.219 µs, 750.925 µs] 352.451 µs (94.0%)
iast_GLOBAL 569.138 µs [545.792 µs, 592.485 µs] 194.017 µs (51.7%)
iast_HARDCODED_SECRET_DISABLED 510.98 µs [488.188 µs, 533.772 µs] 135.859 µs (36.2%)
iast_INACTIVE 466.673 µs [443.354 µs, 489.992 µs] 91.552 µs (24.4%)
iast_TELEMETRY_OFF 510.579 µs [487.634 µs, 533.525 µs] 135.458 µs (36.1%)
tracing 460.557 µs [438.957 µs, 482.158 µs] 85.436 µs (22.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 377.09 µs [357.184 µs, 396.996 µs] -
iast 506.042 µs [483.009 µs, 529.076 µs] 128.953 µs (34.2%)
iast_FULL 722.309 µs [698.94 µs, 745.679 µs] 345.22 µs (91.5%)
iast_GLOBAL 567.523 µs [543.083 µs, 591.963 µs] 190.433 µs (50.5%)
iast_HARDCODED_SECRET_DISABLED 518.547 µs [496.241 µs, 540.852 µs] 141.457 µs (37.5%)
iast_INACTIVE 467.801 µs [445.062 µs, 490.539 µs] 90.711 µs (24.1%)
iast_TELEMETRY_OFF 496.941 µs [474.366 µs, 519.516 µs] 119.851 µs (31.8%)
tracing 455.916 µs [434.011 µs, 477.821 µs] 78.826 µs (20.9%)
Request duration reports for petclinic
gantt title petclinic - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section baseline no_agent (1.363 ms) : 1343, 1382 . : milestone, 1363, appsec (1.744 ms) : 1720, 1768 . : milestone, 1744, appsec_no_iast (1.708 ms) : 1685, 1732 . : milestone, 1708, code_origins (1.672 ms) : 1645, 1699 . : milestone, 1672, iast (1.507 ms) : 1482, 1531 . : milestone, 1507, profiling (1.508 ms) : 1485, 1532 . : milestone, 1508, tracing (1.493 ms) : 1469, 1518 . : milestone, 1493, section candidate no_agent (1.359 ms) : 1340, 1378 . : milestone, 1359, appsec (1.727 ms) : 1703, 1751 . : milestone, 1727, appsec_no_iast (1.723 ms) : 1699, 1747 . : milestone, 1723, code_origins (1.687 ms) : 1660, 1714 . : milestone, 1687, iast (1.515 ms) : 1490, 1539 . : milestone, 1515, profiling (1.534 ms) : 1509, 1558 . : milestone, 1534, tracing (1.464 ms) : 1439, 1489 . : milestone, 1464, 
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.363 ms [1.343 ms, 1.382 ms] -
appsec 1.744 ms [1.72 ms, 1.768 ms] 381.495 µs (28.0%)
appsec_no_iast 1.708 ms [1.685 ms, 1.732 ms] 345.545 µs (25.4%)
code_origins 1.672 ms [1.645 ms, 1.699 ms] 309.049 µs (22.7%)
iast 1.507 ms [1.482 ms, 1.531 ms] 143.989 µs (10.6%)
profiling 1.508 ms [1.485 ms, 1.532 ms] 145.606 µs (10.7%)
tracing 1.493 ms [1.469 ms, 1.518 ms] 130.489 µs (9.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.359 ms [1.34 ms, 1.378 ms] -
appsec 1.727 ms [1.703 ms, 1.751 ms] 367.545 µs (27.0%)
appsec_no_iast 1.723 ms [1.699 ms, 1.747 ms] 363.396 µs (26.7%)
code_origins 1.687 ms [1.66 ms, 1.714 ms] 327.69 µs (24.1%)
iast 1.515 ms [1.49 ms, 1.539 ms] 155.53 µs (11.4%)
profiling 1.534 ms [1.509 ms, 1.558 ms] 174.578 µs (12.8%)
tracing 1.464 ms [1.439 ms, 1.489 ms] 104.444 µs (7.7%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/reactor-optimize
git_commit_date 1745847396 1745850016
git_commit_sha bd7a9c8 cdc63bd
release_version 1.49.0-SNAPSHOT~bd7a9c8502 1.49.0-SNAPSHOT~cdc63bd130
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1745852524 1745852524
ci_job_id 915100203 915100203
ci_pipeline_id 63499836 63499836
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ekfrqbyz-project-304-concurrent-2-afgj4a1r 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-ekfrqbyz-project-304-concurrent-2-afgj4a1r 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for biojava
gantt title biojava - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section baseline no_agent (15.376 s) : 15376000, 15376000 . : milestone, 15376000, appsec (14.893 s) : 14893000, 14893000 . : milestone, 14893000, iast (18.571 s) : 18571000, 18571000 . : milestone, 18571000, iast_GLOBAL (18.13 s) : 18130000, 18130000 . : milestone, 18130000, profiling (15.145 s) : 15145000, 15145000 . : milestone, 15145000, tracing (14.912 s) : 14912000, 14912000 . : milestone, 14912000, section candidate no_agent (14.698 s) : 14698000, 14698000 . : milestone, 14698000, appsec (15.172 s) : 15172000, 15172000 . : milestone, 15172000, iast (18.391 s) : 18391000, 18391000 . : milestone, 18391000, iast_GLOBAL (18.178 s) : 18178000, 18178000 . : milestone, 18178000, profiling (15.347 s) : 15347000, 15347000 . : milestone, 15347000, tracing (15.186 s) : 15186000, 15186000 . : milestone, 15186000, 
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.376 s [15.376 s, 15.376 s] -
appsec 14.893 s [14.893 s, 14.893 s] -483.0 ms (-3.1%)
iast 18.571 s [18.571 s, 18.571 s] 3.195 s (20.8%)
iast_GLOBAL 18.13 s [18.13 s, 18.13 s] 2.754 s (17.9%)
profiling 15.145 s [15.145 s, 15.145 s] -231.0 ms (-1.5%)
tracing 14.912 s [14.912 s, 14.912 s] -464.0 ms (-3.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.698 s [14.698 s, 14.698 s] -
appsec 15.172 s [15.172 s, 15.172 s] 474.0 ms (3.2%)
iast 18.391 s [18.391 s, 18.391 s] 3.693 s (25.1%)
iast_GLOBAL 18.178 s [18.178 s, 18.178 s] 3.48 s (23.7%)
profiling 15.347 s [15.347 s, 15.347 s] 649.0 ms (4.4%)
tracing 15.186 s [15.186 s, 15.186 s] 488.0 ms (3.3%)
Execution time for tomcat
gantt title tomcat - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~cdc63bd130, baseline=1.49.0-SNAPSHOT~bd7a9c8502 dateFormat X axisFormat %s section baseline no_agent (1.474 ms) : 1463, 1486 . : milestone, 1474, appsec (2.366 ms) : 2319, 2413 . : milestone, 2366, iast (2.158 ms) : 2099, 2218 . : milestone, 2158, iast_GLOBAL (2.2 ms) : 2140, 2260 . : milestone, 2200, profiling (2.038 ms) : 1988, 2088 . : milestone, 2038, tracing (1.988 ms) : 1942, 2034 . : milestone, 1988, section candidate no_agent (1.471 ms) : 1459, 1482 . : milestone, 1471, appsec (2.375 ms) : 2328, 2422 . : milestone, 2375, iast (2.154 ms) : 2094, 2214 . : milestone, 2154, iast_GLOBAL (2.198 ms) : 2137, 2258 . : milestone, 2198, profiling (2.01 ms) : 1963, 2058 . : milestone, 2010, tracing (1.979 ms) : 1933, 2025 . : milestone, 1979, 
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.463 ms, 1.486 ms] -
appsec 2.366 ms [2.319 ms, 2.413 ms] 891.308 µs (60.5%)
iast 2.158 ms [2.099 ms, 2.218 ms] 684.026 µs (46.4%)
iast_GLOBAL 2.2 ms [2.14 ms, 2.26 ms] 725.939 µs (49.2%)
profiling 2.038 ms [1.988 ms, 2.088 ms] 564.072 µs (38.3%)
tracing 1.988 ms [1.942 ms, 2.034 ms] 513.874 µs (34.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.459 ms, 1.482 ms] -
appsec 2.375 ms [2.328 ms, 2.422 ms] 904.703 µs (61.5%)
iast 2.154 ms [2.094 ms, 2.214 ms] 683.704 µs (46.5%)
iast_GLOBAL 2.198 ms [2.137 ms, 2.258 ms] 726.988 µs (49.4%)
profiling 2.01 ms [1.963 ms, 2.058 ms] 539.892 µs (36.7%)
tracing 1.979 ms [1.933 ms, 2.025 ms] 508.547 µs (34.6%)
Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - and thanks for the detailed description

@amarziali amarziali merged commit 3682733 into master Apr 29, 2025
457 of 461 checks passed
@amarziali amarziali deleted the andrea.marziali/reactor-optimize branch April 29, 2025 09:25
@amarziali amarziali added this to the 1.49.0 milestone Apr 29, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request May 7, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-logging](https://github.com/googleapis/java-logging) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `3.22.2` -> `3.22.3` | | [com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.28.0` -> `2.28.1` | | [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.48.2` -> `1.49.0` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | | [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.36` -> `2.31.37` | --- ### Release Notes <details> <summary>googleapis/java-logging (com.google.cloud:google-cloud-logging)</summary> ### [`v3.22.3`](https://github.com/googleapis/java-logging/blob/HEAD/CHANGELOG.md#3223-2025-05-06) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.56.3 ([844f4fa](googleapis/java-logging@844f4fa)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.46.3 ([#&#8203;1801](googleapis/java-logging#1801)) ([d7aa7bc](googleapis/java-logging@d7aa7bc)) - Update dependency com.google.cloud:sdk-platform-java-config to v3.47.0 ([#&#8203;1803](googleapis/java-logging#1803)) ([5967ffe](googleapis/java-logging@5967ffe)) - Update googleapis/sdk-platform-java action to v2.57.0 ([#&#8203;1804](googleapis/java-logging#1804)) ([e9a27ec](googleapis/java-logging@e9a27ec)) </details> <details> <summary>googleapis/java-datastore (com.google.cloud:google-cloud-datastore)</summary> ### [`v2.28.1`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2281-2025-05-06) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.47.0 ([#&#8203;1841](googleapis/java-datastore#1841)) ([ac393e6](googleapis/java-datastore@ac393e6)) - Update googleapis/sdk-platform-java action to v2.57.0 ([#&#8203;1842](googleapis/java-datastore#1842)) ([0745906](googleapis/java-datastore@0745906)) </details> <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.49.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.49.0): 1.49.0 ### Components #### Configuration at Runtime - ✨ Add process tags as list to remote config payload ([#&#8203;8705](DataDog/dd-trace-java#8705) - [@&#8203;amarziali](https://github.com/amarziali)) #### Continuous Integration Visibility - 🐛 Add span propagation for Pekko scheduled tasks ([#&#8203;8765](DataDog/dd-trace-java#8765) - [@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Update test.retry_reason to use full name of the feature ([#&#8203;8689](DataDog/dd-trace-java#8689) - [@&#8203;daniel-mohedano](https://github.com/daniel-mohedano)) - 🧹 Remove unused TestEventsHandler methods ([#&#8203;8674](DataDog/dd-trace-java#8674) - [@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) #### Dynamic Instrumentation - 🐛 Fix exclude identifiers normalization ([#&#8203;8742](DataDog/dd-trace-java#8742) - [@&#8203;jpbempel](https://github.com/jpbempel)) - ✨ Make source file tracking asynchronous ([#&#8203;8684](DataDog/dd-trace-java#8684) - [@&#8203;jpbempel](https://github.com/jpbempel)) - ✨ Add scope filtering for symbol extraction ([#&#8203;8676](DataDog/dd-trace-java#8676) - [@&#8203;jpbempel](https://github.com/jpbempel)) - ✨ Add support for [@&#8203;key](https://github.com/key) and [@&#8203;value](https://github.com/value) for Map filtering ([#&#8203;8669](DataDog/dd-trace-java#8669) - [@&#8203;jpbempel](https://github.com/jpbempel)) #### Library Injection - ✨ Add system property to force injection of the tracing library even though multiple javaagents have been detected ([#&#8203;8697](DataDog/dd-trace-java#8697) - [@&#8203;cecile75](https://github.com/cecile75)) #### Metrics - ✨ Allow dogstatsd port to be configurable with DD_DOGSTATSD_PORT ([#&#8203;8693](DataDog/dd-trace-java#8693) - [@&#8203;randomanderson](https://github.com/randomanderson)) #### Profiling - ✨ Bump ddprof-java to 1.25.1 ([#&#8203;8750](DataDog/dd-trace-java#8750) - [@&#8203;jbachorik](https://github.com/jbachorik)) - 🐛 Remove cleanup-on-shutdown for temporary files ([#&#8203;8746](DataDog/dd-trace-java#8746) - [@&#8203;jbachorik](https://github.com/jbachorik)) - ✨⚡ Replace a regex-based SMAP parser with a hand-crafted one ([#&#8203;8730](DataDog/dd-trace-java#8730) - [@&#8203;jbachorik](https://github.com/jbachorik)) - ✨ Improve error reporting on profiler startup ([#&#8203;8714](DataDog/dd-trace-java#8714) - [@&#8203;jbachorik](https://github.com/jbachorik)) - ✨ Exclude ProxyLeakTask exception from exception profiling ([#&#8203;8666](DataDog/dd-trace-java#8666) - [@&#8203;jbachorik](https://github.com/jbachorik)) - ✨ Use jvmstat for JDKs 9+ programmatically ([#&#8203;8641](DataDog/dd-trace-java#8641) - [@&#8203;MattAlp](https://github.com/MattAlp)) #### Telemetry - ✨ Allow dogstatsd port to be configurable with DD_DOGSTATSD_PORT ([#&#8203;8693](DataDog/dd-trace-java#8693) - [@&#8203;randomanderson](https://github.com/randomanderson)) - 🐛 Fix appsec.waf.requests telemetry metric ([#&#8203;8644](DataDog/dd-trace-java#8644) - [@&#8203;jandro996](https://github.com/jandro996)) #### Tracer core - ✨ Exclude jackson afterburner dynamic classes from instrumentation ([#&#8203;8747](DataDog/dd-trace-java#8747) - [@&#8203;amarziali](https://github.com/amarziali)) - ✨ Introduce Java 8 bytecode bridge for instrumentation API ([#&#8203;8736](DataDog/dd-trace-java#8736) - [@&#8203;PerfectSlayer](https://github.com/PerfectSlayer)) - ⚡🧹 Use byte-buddy classes optimized for Java8+ ([#&#8203;8735](DataDog/dd-trace-java#8735) - [@&#8203;mcculls](https://github.com/mcculls)) - 🐛 Do not set the hibernate or datanucleus span service name when disabled ([#&#8203;8727](DataDog/dd-trace-java#8727) - [@&#8203;ygree](https://github.com/ygree)) - ✨ Update bytebuddy and ASM to support JDK 24 ([#&#8203;8720](DataDog/dd-trace-java#8720) - [@&#8203;sarahchen6](https://github.com/sarahchen6)) - 🐛 Turn off JDK socket support by default ([#&#8203;8715](DataDog/dd-trace-java#8715) - [@&#8203;mcculls](https://github.com/mcculls)) - 🐛 Log warning when trace buffer overflow occurs ([#&#8203;8712](DataDog/dd-trace-java#8712) - [@&#8203;ygree](https://github.com/ygree)) - ✨🧪 Introducing an internal integration name ([#&#8203;8708](DataDog/dd-trace-java#8708) - [@&#8203;amarziali](https://github.com/amarziali)) - ✨ Add process tags to client stats payload ([#&#8203;8704](DataDog/dd-trace-java#8704) - [@&#8203;amarziali](https://github.com/amarziali)) - ✨ Collect process tags for tracing ([#&#8203;8698](DataDog/dd-trace-java#8698) - [@&#8203;amarziali](https://github.com/amarziali)) - ✨ Stable Config file: target system properties in process_arguments and support template variables in YamlParser ([#&#8203;8690](DataDog/dd-trace-java#8690) - [@&#8203;mtoffl01](https://github.com/mtoffl01)) - ✨⚡ Use prefix trie for proxy ignores ([#&#8203;8678](DataDog/dd-trace-java#8678) - [@&#8203;amarziali](https://github.com/amarziali)) - ✨ Allow agent to be automatically injected when running aside Log4J patch agent ([#&#8203;8648](DataDog/dd-trace-java#8648) - [@&#8203;paullegranddc](https://github.com/paullegranddc)) - ✨ Use jvmstat for JDKs 9+ programmatically ([#&#8203;8641](DataDog/dd-trace-java#8641) - [@&#8203;MattAlp](https://github.com/MattAlp)) #### Tracer internal logging - 🐛 Delete print line ([#&#8203;8686](DataDog/dd-trace-java#8686) - [@&#8203;sarahchen6](https://github.com/sarahchen6)) ### Instrumentations #### Akka instrumentation - 🐛 Handle reentrant scope cleanup in Akka/Pekko actor instrumentations ([#&#8203;8722](DataDog/dd-trace-java#8722) - [@&#8203;mcculls](https://github.com/mcculls)) #### Apache Spark instrumentation - ✨ Use OpenLineage root parent information to generate trace id ([#&#8203;8726](DataDog/dd-trace-java#8726) - [@&#8203;mobuchowski](https://github.com/mobuchowski)) - ✨ Spark job cancellation no longer marks application as failed ([#&#8203;8701](DataDog/dd-trace-java#8701) - [@&#8203;paul-laffon-dd](https://github.com/paul-laffon-dd)) #### JDBC instrumentation - 💡 Add support for sybase tds jdbc driver ([#&#8203;8764](DataDog/dd-trace-java#8764) - [@&#8203;amarziali](https://github.com/amarziali)) #### Kotlin instrumentation - 🐛 Take defensive copy of parent scope stack when closing nested coroutines ([#&#8203;8749](DataDog/dd-trace-java#8749) - [@&#8203;mcculls](https://github.com/mcculls)) #### Reactor instrumentation - ✨⚡ Do not inspect reactor context when not needed ([#&#8203;8745](DataDog/dd-trace-java#8745) - [@&#8203;amarziali](https://github.com/amarziali)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 795f347ae34d056efc1194c2f606cee7bca1beea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: reactor Reactor instrumentation tag: performance Performance related changes type: enhancement Enhancements and improvements

3 participants