8000
  • Using forEach to avoid Iterator allocation by dougqh · Pull Request #10830 · DataDog/dd-trace-java · GitHub
    [go: up one dir, main page]

    Skip to content

    Using forEach to avoid Iterator allocation#10830

    Open
    dougqh wants to merge 4 commits intomasterfrom
    dougqh/coretracer-preprocessing
    Open

    Using forEach to avoid Iterator allocation#10830
    dougqh wants to merge 4 commits intomasterfrom
    dougqh/coretracer-preprocessing

    Conversation

    @dougqh
    Copy link
    Contributor
    @dougqh dougqh commented Mar 12, 2026

    What Does This Do

    Use forEach in CoreTracer.write to avoid ArrayList$Itr allocation

    Motivation

    In span creation stress test: 16 threads x 10,000,000 traces x 2 spans, saves 5 GiB of allocation

    Additional Notes

    Contributor Checklist

    Jira ticket: [PROJ-IDENT]

    Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

    @dougqh dougqh requested a review from a team as a code owner March 12, 2026 20:08
    @dougqh dougqh added type: enhancement Enhancements and improvements comp: core Tracer core labels Mar 12, 2026
    @dougqh dougqh requested a review from mhlidd March 12, 2026 20:08
    @dougqh dougqh added the tag: performance Performance related changes label Mar 12, 2026
    @pr-commenter
    Copy link
    pr-commenter bot commented Mar 12, 2026

    Benchmarks

    Startup

    Parameters

    Baseline Candidate
    baseline_or_candidate baseline candidate
    git_branch master dougqh/coretracer-preprocessing
    git_commit_date 1773405842 1773412886
    git_commit_sha 6162c82 8f5b32a
    release_version 1.61.0-SNAPSHOT~6162c82498 1.61.0-SNAPSHOT~8f5b32a3f3
    See matching parameters
    Baseline Candidate
    application insecure-bank insecure-bank
    ci_job_date 1773414638 1773414638
    ci_job_id 1504398966 1504398966
    ci_pipeline_id 102380088 102380088
    cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
    kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-hy5m4jh5 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-hy5m4jh5 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
    module Agent Agent
    parent None None

    Summary

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

    Startup time reports for petclinic
    gantt
        title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
    
        dateFormat X
        axisFormat %s
    section tracing
    Agent [baseline] (1.06 s) : 0, 1060166
    Total [baseline] (11.067 s) : 0, 11067173
    Agent [candidate] (1.057 s) : 0, 1056787
    Total [candidate] (11.077 s) : 0, 11077184
    section appsec
    Agent [baseline] (1.248 s) : 0, 1247984
    Total [baseline] (11.15 s) : 0, 11149664
    Agent [candidate] (1.243 s) : 0, 1243262
    Total [candidate] (11.112 s) : 0, 11111776
    section iast
    Agent [baseline] (1.224 s) : 0, 1223521
    Total [baseline] (11.271 s) : 0, 11270869
    Agent [candidate] (1.236 s) : 0, 1235509
    Total [candidate] (11.32 s) : 0, 11319845
    section profiling
    Agent [baseline] (1.18 s) : 0, 1180456
    Total [baseline] (10.989 s) : 0, 10989210
    Agent [candidate] (1.184 s) : 0, 1184176
    Total [candidate] (11.155 s) : 0, 11155465
    
    Loading
    • baseline results
    Module Variant Duration Δ tracing
    Agent tracing 1.06 s -
    Agent appsec 1.248 s 187.819 ms (17.7%)
    Agent iast 1.224 s 163.356 ms (15.4%)
    Agent profiling 1.18 s 120.29 ms (11.3%)
    Total tracing 11.067 s -
    Total appsec 11.15 s 82.49 ms (0.7%)
    Total iast 11.271 s 203.696 ms (1.8%)
    Total profiling 10.989 s -77.963 ms (-0.7%)
    • candidate results
    Module Variant Duration Δ tracing
    Agent tracing 1.057 s -
    Agent appsec 1.243 s 186.475 ms (17.6%)
    Agent iast 1.236 s 178.722 ms (16.9%)
    Agent profiling 1.184 s 127.389 ms (12.1%)
    Total tracing 11.077 s -
    Total appsec 11.112 s 34.592 ms (0.3%)
    Total iast 11.32 s 242.66 ms (2.2%)
    Total profiling 11.155 s 78.281 ms (0.7%)
    gantt
        title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
    
        dateFormat X
        axisFormat %s
    section tracing
    crashtracking [baseline] (1.19 ms) : 0, 1190
    crashtracking [candidate] (1.188 ms) : 0, 1188
    BytebuddyAgent [baseline] (628.522 ms) : 0, 628522
    BytebuddyAgent [candidate] (626.824 ms) : 0, 626824
    AgentMeter [baseline] (29.08 ms) : 0, 29080
    AgentMeter [candidate] (29.051 ms) : 0, 29051
    GlobalTracer [baseline] (257.211 ms) : 0, 257211
    GlobalTracer [candidate] (256.676 ms) : 0, 256676
    AppSec [baseline] (31.504 ms) : 0, 31504
    AppSec [candidate] (31.442 ms) : 0, 31442
    Debugger [baseline] (59.346 ms) : 0, 59346
    Debugger [candidate] (59.172 ms) : 0, 59172
    Remote Config [baseline] (614.704 µs) : 0, 615
    Remote Config [candidate] (615.769 µs) : 0, 616
    Telemetry [baseline] (8.702 ms) : 0, 8702
    Telemetry [candidate] (8.648 ms) : 0, 8648
    Flare Poller [baseline] (8.044 ms) : 0, 8044
    Flare Poller [candidate] (7.194 ms) : 0, 7194
    section appsec
    crashtracking [baseline] (1.199 ms) : 0, 1199
    crashtracking [candidate] (1.185 ms) : 0, 1185
    BytebuddyAgent [baseline] (658.785 ms) : 0, 658785
    BytebuddyAgent [candidate] (656.1 ms) : 0, 656100
    AgentMeter [baseline] (12.053 ms) : 0, 12053
    AgentMeter [candidate] (12.026 ms) : 0, 12026
    GlobalTracer [baseline] (258.856 ms) : 0, 258856
    GlobalTracer [candidate] (257.792 ms) : 0, 257792
    AppSec [baseline] (177.456 ms) : 0, 177456
    AppSec [candidate] (177.11 ms) : 0, 177110
    Debugger [baseline] (66.088 ms) : 0, 66088
    Debugger [candidate] (65.723 ms) : 0, 65723
    Remote Config [baseline] (571.671 µs) : 0, 572
    Remote Config [candidate] (562.148 µs) : 0, 562
    Telemetry [baseline] (9.053 ms) : 0, 9053
    Telemetry [candidate] (8.97 ms) : 0, 8970
    Flare Poller [baseline] (3.686 ms) : 0, 3686
    Flare Poller [candidate] (3.638 ms) : 0, 3638
    IAST [baseline] (24.007 ms) : 0, 24007
    IAST [candidate] (24.007 ms) : 0, 24007
    section iast
    crashtracking [baseline] (1.196 ms) : 0, 1196
    crashtracking [candidate] (1.2 ms) : 0, 1200
    BytebuddyAgent [baseline] (793.539 ms) : 0, 793539
    BytebuddyAgent [candidate] (801.402 ms) : 0, 801402
    AgentMeter [baseline] (11.318 ms) : 0, 11318
    AgentMeter [candidate] (11.618 ms) : 0, 11618
    GlobalTracer [baseline] (246.595 ms) : 0, 246595
    GlobalTracer [candidate] (248.882 ms) : 0, 248882
    AppSec [baseline] (26.346 ms) : 0, 26346
    AppSec [candidate] (26.693 ms) : 0, 26693
    Debugger [baseline] 
    8000
    (64.693 ms) : 0, 64693
    Debugger [candidate] (64.517 ms) : 0, 64517
    Remote Config [baseline] (520.113 µs) : 0, 520
    Remote Config [candidate] (509.493 µs) : 0, 509
    Telemetry [baseline] (13.823 ms) : 0, 13823
    Telemetry [candidate] (14.361 ms) : 0, 14361
    Flare Poller [baseline] (4.537 ms) : 0, 4537
    Flare Poller [candidate] (4.732 ms) : 0, 4732
    IAST [baseline] (25.05 ms) : 0, 25050
    IAST [candidate] (25.42 ms) : 0, 25420
    section profiling
    ProfilingAgent [baseline] (93.763 ms) : 0, 93763
    ProfilingAgent [candidate] (93.587 ms) : 0, 93587
    crashtracking [baseline] (1.174 ms) : 0, 1174
    crashtracking [candidate] (1.167 ms) : 0, 1167
    BytebuddyAgent [baseline] (681.193 ms) : 0, 681193
    BytebuddyAgent [candidate] (682.883 ms) : 0, 682883
    AgentMeter [baseline] (8.664 ms) : 0, 8664
    AgentMeter [candidate] (8.706 ms) : 0, 8706
    GlobalTracer [baseline] (215.313 ms) : 0, 215313
    GlobalTracer [candidate] (216.507 ms) : 0, 216507
    AppSec [baseline] (32.069 ms) : 0, 32069
    AppSec [candidate] (32.278 ms) : 0, 32278
    Debugger [baseline] (63.077 ms) : 0, 63077
    Debugger [candidate] (65.112 ms) : 0, 65112
    Remote Config [baseline] (587.705 µs) : 0, 588
    Remote Config [candidate] (594.189 µs) : 0, 594
    Telemetry [baseline] (10.519 ms) : 0, 10519
    Telemetry [candidate] (8.989 ms) : 0, 8989
    Flare Poller [baseline] (3.478 ms) : 0, 3478
    Flare Poller [candidate] (3.488 ms) : 0, 3488
    Profiling [baseline] (94.337 ms) : 0, 94337
    Profiling [candidate] (94.154 ms) : 0, 94154
    
    Loading
    Startup time reports for insecure-bank
    gantt
        title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
    
        dateFormat X
        axisFormat %s
    section tracing
    Agent [baseline] (1.057 s) : 0, 1057257
    Total [baseline] (8.9 s) : 0, 8900351
    Agent [candidate] (1.065 s) : 0, 1065385
    Total [candidate] (8.85 s) : 0, 8849929
    section iast
    Agent [baseline] (1.225 s) : 0, 1224500
    Total [baseline] (9.548 s) : 0, 9547571
    Agent [candidate] (1.225 s) : 0, 1224627
    Total [candidate] (9.544 s) : 0, 9544118
    
    Loading
    • baseline results
    Module Variant Duration Δ tracing
    Agent tracing 1.057 s -
    Agent iast 1.225 s 167.243 ms (15.8%)
    Total tracing 8.9 s -
    Total iast 9.548 s 647.219 ms (7.3%)
    • candidate results
    Module Variant Duration Δ tracing
    Agent tracing 1.065 s -
    Agent iast 1.225 s 159.242 ms (14.9%)
    Total tracing 8.85 s -
    Total iast 9.544 s 694.189 ms (7.8%)
    gantt
        title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
    
        dateFormat X
        axisFormat %s
    section tracing
    crashtracking [baseline] (1.194 ms) : 0, 1194
    crashtracking [candidate] (1.215 ms) : 0, 1215
    BytebuddyAgent [baseline] (627.378 ms) : 0, 627378
    BytebuddyAgent [candidate] (633.177 ms) : 0, 633177
    AgentMeter [baseline] (29.076 ms) : 0, 29076
    AgentMeter [candidate] (29.323 ms) : 0, 29323
    GlobalTracer [baseline] (256.925 ms) : 0, 256925
    GlobalTracer [candidate] (258.888 ms) : 0, 258888
    AppSec [baseline] (31.539 ms) : 0, 31539
    AppSec [candidate] (31.757 ms) : 0, 31757
    Debugger [baseline] (58.636 ms) : 0, 58636
    Debugger [candidate] (59.004 ms) : 0, 59004
    Remote Config [baseline] (611.616 µs) : 0, 612
    Remote Config [candidate] (620.306 µs) : 0, 620
    Telemetry [baseline] (8.629 ms) : 0, 8629
    Telemetry [candidate] (8.73 ms) : 0, 8730
    Flare Poller [baseline] (7.261 ms) : 0, 7261
    Flare Poller [candidate] (6.483 ms) : 0, 6483
    section iast
    crashtracking [baseline] (1.208 ms) : 0, 1208
    crashtracking [candidate] (1.211 ms) : 0, 1211
    BytebuddyAgent [baseline] (794.961 ms) : 0, 794961
    BytebuddyAgent [candidate] (794.18 ms) : 0, 794180
    AgentMeter [baseline] (11.308 ms) : 0, 11308
    AgentMeter [candidate] (11.318 ms) : 0, 11318
    GlobalTracer [baseline] (246.886 ms) : 0, 246886
    GlobalTracer [candidate] (247.296 ms) : 0, 247296
    IAST [baseline] (25.092 ms) : 0, 25092
    IAST [candidate] (25.164 ms) : 0, 25164
    AppSec [baseline] (27.322 ms) : 0, 27322
    AppSec [candidate] (26.358 ms) : 0, 26358
    Debugger [baseline] (61.579 ms) : 0, 61579
    Debugger [candidate] (62.962 ms) : 0, 62962
    Remote Config [baseline] (510.541 µs) : 0, 511
    Remote Config [candidate] (510.764 µs) : 0, 511
    Telemetry [baseline] (14.801 ms) : 0, 14801
    Telemetry [candidate] (14.736 ms) : 0, 14736
    Flare Poller [baseline] (4.899 ms) : 0, 4899
    Flare Poller [candidate] (4.866 ms) : 0, 4866
    
    Loading

    Load

    Parameters

    Baseline Candidate
    baseline_or_candidate baseline candidate
    git_branch master dougqh/coretracer-preprocessing
    git_commit_date 1773405842 1773412886
    git_commit_sha 6162c82 8f5b32a
    release_version 1.61.0-SNAPSHOT~6162c82498 1.61.0-SNAPSHOT~8f5b32a3f3
    See matching parameters
    Baseline Candidate
    application insecure-bank insecure-bank
    ci_job_date 1773415187 1773415187
    ci_job_id 1504398968 1504398968
    ci_pipeline_id 102380088 102380088
    cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
    kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-uy5fu842 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-uy5fu842 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

    Summary

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

    scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
    scenario:load:petclinic:code_origins:high_load worse
    [+0.691ms; +1.582ms] or [+3.967%; +9.085%]
    unsure
    [+0.297ms; +1.745ms] or [+1.032%; +6.059%]
    unstable
    [-39.345op/s; +11.720op/s] or [-15.017%; +4.473%]
    18.547ms 29.814ms 248.188op/s 17.411ms 28.793ms 262.000op/s
    Request duration reports for petclinic
    gantt
        title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
        dateFormat X
        axisFormat %s
    section baseline
    no_agent (18.368 ms) : 18179, 18558
    .   : milestone, 18368,
    appsec (18.39 ms) : 18206, 18573
    .   : milestone, 18390,
    code_origins (17.809 ms) : 17632, 17985
    .   : milestone, 17809,
    iast (17.658 ms) : 17480, 17835
    .   : milestone, 17658,
    profiling (18.888 ms) : 18698, 19077
    .   : milestone, 18888,
    tracing (17.85 ms) : 17673, 18026
    .   : milestone, 17850,
    section candidate
    no_agent (17.891 ms) : 17711, 18071
    .   : milestone, 17891,
    appsec (18.565 ms) : 18375, 18754
    .   : milestone, 18565,
    code_origins (18.805 ms) : 18614, 18995
    .   : milestone, 18805,
    iast (17.778 ms) : 17601, 17956
    .   : milestone, 17778,
    profiling (19.102 ms) : 18913, 19291
    .   : milestone, 19102,
    tracing (18.014 ms) : 17836, 18192
    .   : milestone, 18014,
    
    Loading
    • baseline results
    Variant Request duration [CI 0.99] Δ no_agent
    no_agent 18.368 ms [18.179 ms, 18.558 ms] -
    appsec 18.39 ms [18.206 ms, 18.573 ms] 21.476 µs (0.1%)
    code_origins 17.809 ms [17.632 ms, 17.985 ms] -559.506 µs (-3.0%)
    iast 17.658 ms [17.48 ms, 17.835 ms] -710.499 µs (-3.9%)
    profiling 18.888 ms [18.698 ms, 19.077 ms] 519.351 µs (2.8%)
    tracing 17.85 ms [17.673 ms, 18.026 ms] -518.529 µs (-2.8%)
    • candidate results
    Variant Request duration [CI 0.99] Δ no_agent
    no_agent 17.891 ms [17.711 ms, 18.071 ms] -
    appsec 18.565 ms [18.375 ms, 18.754 ms] 673.242 µs (3.8%)
    code_origins 18.805 ms [18.614 ms, 18.995 ms] 913.223 µs (5.1%)
    iast 17.778 ms [17.601 ms, 17.956 ms] -112.953 µs (-0.6%)
    profiling 19.102 ms [18.913 ms, 19.291 ms] 1.21 ms (6.8%)
    tracing 18.014 ms [17.836 ms, 18.192 ms] 122.7 µs (0.7%)
    Request duration reports for insecure-bank
    gantt
        title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
        dateFormat X
        axisFormat %s
    section baseline
    no_agent (1.211 ms) : 1198, 1223
    .   : milestone, 1211,
    iast (3.2 ms) : 3158, 3242
    .   : milestone, 3200,
    iast_FULL (5.861 ms) : 5801, 5920
    .   : milestone, 5861,
    iast_GLOBAL (3.569 ms) : 3512, 3626
    .   : milestone, 3569,
    profiling (2.081 ms) : 2062, 2100
    .   : milestone, 2081,
    tracing (1.847 ms) : 1832, 1862
    .   : milestone, 1847,
    section candidate
    no_agent (1.201 ms) : 1189, 1213
    .   : milestone, 1201,
    iast (3.23 ms) : 3187, 3273
    .   : milestone, 3230,
    iast_FULL (6.014 ms) : 5952, 6076
    .   : milestone, 6014,
    iast_GLOBAL (3.471 ms) : 3424, 3518
    .   : milestone, 3471,
    profiling (2.075 ms) : 2056, 2094
    .   : milestone, 2075,
    tracing (1.819 ms) : 1803, 1835
    .   : milestone, 1819,
    
    Loading
    • baseline results
    Variant Request duration [CI 0.99] Δ no_agent
    no_agent 1.211 ms [1.198 ms, 1.223 ms] -
    iast 3.2 ms [3.158 ms, 3.242 ms] 1.989 ms (164.3%)
    iast_FULL 5.861 ms [5.801 ms, 5.92 ms] 4.65 ms (384.1%)
    iast_GLOBAL 3.569 ms [3.512 ms, 3.626 ms] 2.358 ms (194.8%)
    profiling 2.081 ms [2.062 ms, 2.1 ms] 870.468 µs (71.9%)
    tracing 1.847 ms [1.832 ms, 1.862 ms] 636.426 µs (52.6%)
    • candidate results
    Variant Request duration [CI 0.99] Δ no_agent
    no_agent 1.201 ms [1.189 ms, 1.213 ms] -
    iast 3.23 ms [3.187 ms, 3.273 ms] 2.029 ms (168.9%)
    iast_FULL 6.014 ms [5.952 ms, 6.076 ms] 4.813 ms (400.7%)
    iast_GLOBAL 3.471 ms [3.424 ms, 3.518 ms] 2.27 ms (189.0%)
    profiling 2.075 ms [2.056 ms, 2.094 ms] 873.675 µs (72.7%)
    tracing 1.819 ms [1.803 ms, 1.835 ms] 617.962 µs (51.5%)

    Dacapo

    Parameters

    Baseline Candidate
    baseline_or_candidate baseline candidate
    git_branch master dougqh/coretracer-preprocessing
    git_commit_date 1773405842 1773412886
    git_commit_sha 6162c82 8f5b32a
    release_version 1.61.0-SNAPSHOT~6162c82498 1.61.0-SNAPSHOT~8f5b32a3f3
    See matching parameters
    Baseline Candidate
    application biojava biojava
    ci_job_date 1773414940 1773414940
    ci_job_id 1504398971 1504398971
    ci_pipeline_id 102380088 102380088
    cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
    kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-y2g5rr56 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-y2g5rr56 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

    Summary

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

    Execution time for biojava
    gantt
        title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
        dateFormat X
        axisFormat %s
    section baseline
    no_agent (15.44 s) : 15440000, 15440000
    .   : milestone, 15440000,
    appsec (15.053 s) : 15053000, 15053000
    .   : milestone, 15053000,
    iast (18.791 s) : 18791000, 18791000
    .   : milestone, 18791000,
    iast_GLOBAL (17.678 s) : 17678000, 17678000
    .   : milestone, 17678000,
    profiling (14.892 s) : 14892000, 14892000
    .   : milestone, 14892000,
    tracing (14.861 s) : 14861000, 14861000
    .   : milestone, 14861000,
    section candidate
    no_agent (15.08 s) : 15080000, 15080000
    .   : milestone, 15080000,
    appsec (14.896 s) : 14896000, 14896000
    .   : milestone, 14896000,
    iast (18.435 s) : 18435000, 18435000
    .   : milestone, 18435000,
    iast_GLOBAL (17.97 s) : 17970000, 17970000
    .   : milestone, 17970000,
    profiling (15.059 s) : 15059000, 15059000
    .   : milestone, 15059000,
    tracing (15.37 s) : 15370000, 15370000
    .   : milestone, 15370000,
    
    Loading
    • baseline results
    Variant Execution Time [CI 0.99] Δ no_agent
    no_agent 15.44 s [15.44 s, 15.44 s] -
    appsec 15.053 s [15.053 s, 15.053 s] -387.0 ms (-2.5%)
    iast 18.791 s [18.791 s, 18.791 s] 3.351 s (21.7%)
    iast_GLOBAL 17.678 s [17.678 s, 17.678 s] 2.238 s (14.5%)
    profiling 14.892 s [14.892 s, 14.892 s] -548.0 ms (-3.5%)
    tracing 14.861 s [14.861 s, 14.861 s] -579.0 ms (-3.8%)
    • candidate results
    Variant Execution Time [CI 0.99] Δ no_agent
    no_agent 15.08 s [15.08 s, 15.08 s] -
    appsec 14.896 s [14.896 s, 14.896 s] -184.0 ms (-1.2%)
    iast 18.435 s [18.435 s, 18.435 s] 3.355 s (22.2%)
    iast_GLOBAL 17.97 s [17.97 s, 17.97 s] 2.89 s (19.2%)
    profiling 15.059 s [15.059 s, 15.059 s] -21.0 ms (-0.1%)
    tracing 15.37 s [15.37 s, 15.37 s] 290.0 ms (1.9%)
    Execution time for tomcat
    gantt
        title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~8f5b32a3f3, baseline=1.61.0-SNAPSHOT~6162c82498
        dateFormat X
        axisFormat %s
    section baseline
    no_agent (1.472 ms) : 1460, 1483
    .   : milestone, 1472,
    appsec (3.799 ms) : 3578, 4020
    .   : milestone, 3799,
    iast (2.253 ms) : 2184, 2322
    .   : milestone, 2253,
    iast_GLOBAL (2.294 ms) : 2225, 2363
    .   : milestone, 2294,
    profiling (2.091 ms) : 2036, 2146
    .   : milestone, 2091,
    tracing (2.051 ms) : 1998, 2104
    .   : milestone, 2051,
    section candidate
    no_agent (1.472 ms) : 1461, 1484
    .   : milestone, 1472,
    appsec (3.764 ms) : 3547, 3982
    .   : milestone, 3764,
    iast (2.245 ms) : 2176, 2314
    .   : milestone, 2245,
    iast_GLOBAL (2.301 ms) : 2231, 2371
    .   : milestone, 2301,
    profiling (2.095 ms) : 2040, 2150
    .   : milestone, 2095,
    tracing (2.066 ms) : 2012, 2120
    .   : milestone, 2066,
    
    Loading
    • baseline results
    Variant Execution Time [CI 0.99] Δ no_agent
    no_agent 1.472 ms [1.46 ms, 1.483 ms] -
    appsec 3.799 ms [3.578 ms, 4.02 ms] 2.327 ms (158.1%)
    iast 2.253 ms [2.184 ms, 2.322 ms] 781.007 µs (53.1%)
    iast_GLOBAL 2.294 ms [2.225 ms, 2.363 ms] 821.97 µs (55.8%)
    profiling 2.091 ms [2.036 ms, 2.146 ms] 619.02 µs (42.1%)
    tracing 2.051 ms [1.998 ms, 2.104 ms] 579.053 µs (39.3%)
    • candidate results
    Variant Execution Time [CI 0.99] Δ no_agent
    no_agent 1.472 ms [1.461 ms, 1.484 ms] -
    appsec 3.764 ms [3.547 ms, 3.982 ms] 2.292 ms (155.7%)
    iast 2.245 ms [2.176 ms, 2.314 ms] 773.021 µs (52.5%)
    iast_GLOBAL 2.301 ms [2.231 ms, 2.371 ms] 828.563 µs (56.3%)
    profiling 2.095 ms [2.04 ms, 2.15 ms] 622.422 µs (42.3%)
    tracing 2.066 ms [2.012 ms, 2.12 ms] 593.668 µs (40.3%)

    @dougqh
    Copy link
    Contributor Author
    dougqh commented Mar 13, 2026

    In a separate PR, I'm going to try to create a benchmark to show why this happens.
    In this case, the profile pretty clearly shows that escape analysis failed and the Iterator was being allocated, but that doesn't always happen. I think the difference is not fully inlining the call inside the loop, but I'd like to prove it.

    @dougqh dougqh added this pull request to the merge queue Mar 13, 2026
    @dd-octo-sts
    Copy link
    C 8000 ontributor
    dd-octo-sts bot commented Mar 13, 2026

    /merge

    @gh-worker-devflow-routing-ef8351
    Copy link
    gh-worker-devflow-routing-ef8351 bot commented Mar 13, 2026

    View all feedbacks in Devflow UI.

    2026-03-13 12:58:37 UTC ℹ️ Start processing command /merge


    2026-03-13 12:58:43 UTC ℹ️ MergeQueue: pull request added to the queue

    The expected merge time in master is approximately 2h (p90).


    2026-03-13 14:00:12 UTCMergeQueue: This merge request is not mergeable, blocked by github

    PR can't be merged according to github policy

    @github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 13, 2026
    @dougqh dougqh enabled auto-merge March 13, 2026 19:11
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    comp: core Tracer core tag: performance Performance related changes type: enhancement Enhancements and improvements

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants

    0