8000 Use prefix trie for proxy ignores by amarziali · Pull Request #8678 · DataDog/dd-trace-java · GitHub
[go: up one dir, main page]

Skip to content

Use prefix trie for proxy ignores #8678

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

Merged
merged 4 commits into from
Apr 29, 2025
Merged

Conversation

amarziali
Copy link
Collaborator

What Does This Do

When loading a class we go through different check to know if ignore the class directly or go through the bytebuddy matchers.
One of the reason of ignoring a class is that is a generated proxy (see ProxyClassIgnored).
This class is running several String.contains in order to match possible prefixes. Since this list is subjected to grow, running String.contains is not looking performant also because we run this code for each inner class (containing $ that's loaded).
A possible optimization is to leverage our ClassNameTrie that we are already already using. The different, for the proxy, is that we need to match starting from a group of dollars since they are inner classes

This PR introduces hence the proxy_ignored_class_name.trie that can be used to drive this particular prefix matching for inner classes.
I also ran benchmarks showing that there is a significative perf boost using that approach. As well I put some tests to limit regressions

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added comp: core Tracer core tag: performance Performance related changes labels Apr 7, 2025
@amarziali amarziali requested a review from a team as a code owner April 7, 2025 14:27
@amarziali amarziali requested a review from smola April 7, 2025 14:27
Copy link
Contributor
github-actions bot commented Apr 7, 2025

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.

@pr-commenter
Copy link
pr-commenter bot commented Apr 7, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/proxy-improve
git_commit_date 1745843547 1745845402
git_commit_sha c55dc46 3937268
release_version 1.49.0-SNAPSHOT~c55dc46d28 1.49.0-SNAPSHOT~39372682bf
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1745848566 1745848566
ci_job_id 914855052 914855052
ci_pipeline_id 63486584 63486584
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-27faq39k 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-27faq39k 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 65 metrics, 6 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.49.0-SNAPSHOT~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.011 s) : 0, 1011394
Total [baseline] (8.619 s) : 0, 8619239
Agent [candidate] (1.007 s) : 0, 1007483
Total [candidate] (8.623 s) : 0, 8622595
section iast
Agent [baseline] (1.138 s) : 0, 1137903
Total [baseline] (9.187 s) : 0, 9187111
Agent [candidate] (1.141 s) : 0, 1141422
Total [candidate] (9.185 s) : 0, 9185323
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.148 s) : 0, 1147769
Total [baseline] (9.205 s) : 0, 9204796
Agent [candidate] (1.137 s) : 0, 1137448
Total [candidate] (9.189 s) : 0, 9188677
section iast_TELEMETRY_OFF
Agent [baseline] (1.134 s) : 0, 1133987
Total [baseline] (9.172 s) : 0, 9172163
Agent [candidate] (1.142 s) : 0, 1142192
Total [candidate] (9.159 s) : 0, 9159194
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.011 s -
Agent iast 1.138 s 126.509 ms (12.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.148 s 136.375 ms (13.5%)
Agent iast_TELEMETRY_OFF 1.134 s 122.593 ms (12.1%)
Total tracing 8.619 s -
Total iast 9.187 s 567.872 ms (6.6%)
Total iast_HARDCODED_SECRET_DISABLED 9.205 s 585.557 ms (6.8%)
Total iast_TELEMETRY_OFF 9.172 s 552.923 ms (6.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.007 s -
Agent iast 1.141 s 133.94 ms (13.3%)
Agent iast_HARDCODED_SECRET_DISABLED 1.137 s 129.965 ms (12.9%)
Agent iast_TELEMETRY_OFF 1.142 s 134.71 ms (13.4%)
Total tracing 8.623 s -
Total iast 9.185 s 562.728 ms (6.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.189 s 566.082 ms (6.6%)
Total iast_TELEMETRY_OFF 9.159 s 536.599 ms (6.2%)
gantt
    title insecure-bank - break down per module: candidate=1.49.0-SNAPSHOT~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (675.005 ms) : 0, 675005
BytebuddyAgent [candidate] (671.204 ms) : 0, 671204
GlobalTracer [baseline] (240.909 ms) : 0, 240909
GlobalTracer [candidate] (240.71 ms) : 0, 240710
AppSec [baseline] (54.957 ms) : 0, 54957
AppSec [candidate] (54.634 ms) : 0, 54634
Debugger [baseline] (6.927 ms) : 0, 6927
Debugger [candidate] (6.848 ms) : 0, 6848
Remote Config [baseline] (701.856 µs) : 0, 702
Remote Config [candidate] (708.148 µs) : 0, 708
Telemetry [baseline] (9.328 ms) : 0, 9328
Telemetry [candidate] (9.971 ms) : 0, 9971
section iast
BytebuddyAgent [baseline] (791.085 ms) : 0, 791085
BytebuddyAgent [candidate] (792.29 ms) : 0, 792290
GlobalTracer [baseline] (229.949 ms) : 0, 229949
GlobalTracer [candidate] (231.396 ms) : 0, 231396
IAST [baseline] (22.667 ms) : 0, 22667
IAST [candidate] (23.19 ms) : 0, 23190
AppSec [baseline] (56.445 ms) : 0, 56445
AppSec [candidate] (56.589 ms) : 0, 56589
Debugger [baseline] (5.891 ms) : 0, 5891
Debugger [candidate] (5.977 ms) : 0, 5977
Remote Config [baseline] (589.296 µs) : 0, 589
Remote Config [candidate] (602.994 µs) : 0, 603
Telemetry [baseline] (7.896 ms) : 0, 7896
Telemetry [candidate] (7.919 ms) : 0, 7919
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (797.793 ms) : 0, 797793
BytebuddyAgent [candidate] (790.583 ms) : 0, 790583
GlobalTracer [baseline] (231.898 ms) : 0, 231898
GlobalTracer [candidate] (229.911 ms) : 0, 229911
IAST [baseline] (23.111 ms) : 0, 23111
IAST [candidate] (22.782 ms) : 0, 22782
AppSec [baseline] (56.772 ms) : 0, 56772
AppSec [candidate] (56.391 ms) : 0, 56391
Debugger [baseline] (5.933 ms) : 0, 5933
Debugger [candidate] (5.859 ms) : 0, 5859
Remote Config [baseline] (593.991 µs) : 0, 594
Remote Config [candidate] (569.921 µs) : 0, 570
Telemetry [baseline] (8.01 ms) : 0, 8010
Telemetry [candidate] (7.904 ms) : 0, 7904
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (787.727 ms) : 0, 787727
BytebuddyAgent [candidate] (792.96 ms) : 0, 792960
GlobalTracer [baseline] (230.196 ms) : 0, 230196
GlobalTracer [candidate] (232.225 ms) : 0, 232225
IAST [baseline] (22.461 ms) : 0, 22461
IAST [candidate] (22.582 ms) : 0, 22582
AppSec [baseline] (56.049 ms) : 0, 56049
AppSec [candidate] (56.634 ms) : 0, 56634
Debugger [baseline] (5.861 ms) : 0, 5861
Debugger [candidate] (5.942 ms) : 0, 5942
Remote Config [baseline] (586.51 µs) : 0, 587
Remote Config [candidate] (604.038 µs) : 0, 604
Telemetry [baseline] (7.718 ms) : 0, 7718
Telemetry [candidate] (7.721 ms) : 0, 7721
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.49.0-SNAPSHOT~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.008 s) : 0, 1008311
Total [baseline] (10.501 s) : 0, 10501073
Agent [candidate] (1.009 s) : 0, 1009236
Total [candidate] (10.506 s) : 0, 10506421
section appsec
Agent [baseline] (1.151 s) : 0, 1151165
Total [baseline] (10.635 s) : 0, 10635462
Agent [candidate] (1.156 s) : 0, 1155973
Total [candidate] (10.673 s) : 0, 10672953
section iast
Agent [baseline] (1.144 s) : 0, 1144456
Total [baseline] (10.769 s) : 0, 10768825
Agent [candidate] (1.147 s) : 0, 1146773
Total [candidate] (10.864 s) : 0, 10864290
section profiling
Agent [baseline] (1.26 s) : 0, 1259885
Total [baseline] (10.841 s) : 0, 10840594
Agent [candidate] (1.265 s) : 0, 1265174
Total [candidate] (10.819 s) : 0, 10819389
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.008 s -
Agent appsec 1.151 s 142.853 ms (14.2%)
Agent iast 1.144 s 136.145 ms (13.5%)
Agent profiling 1.26 s 251.574 ms (24.9%)
Total tracing 10.501 s -
Total appsec 10.635 s 134.388 ms (1.3%)
Total iast 10.769 s 267.751 ms (2.5%)
Total profiling 10.841 s 339.521 ms (3.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.009 s -
Agent appsec 1.156 s 146.737 ms (14.5%)
Agent iast 1.147 s 137.537 ms (13.6%)
Agent profiling 1.265 s 255.938 ms (25.4%)
Total tracing 10.506 s -
Total appsec 10.673 s 166.532 ms (1.6%)
Total iast 10.864 s 357.87 ms (3.4%)
Total profiling 10.819 s 312.968 ms (3.0%)
gantt
    title petclinic - break down per module: candidate=1.49.0-SNAPSHOT~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.24 ms) : 0, 672240
BytebuddyAgent [candidate] (671.556 ms) : 0, 671556
GlobalTracer [baseline] (241.252 ms) : 0, 241252
GlobalTracer [candidate] (240.541 ms) : 0, 240541
AppSec [baseline] (54.595 ms) : 0, 54595
AppSec [candidate] (54.685 ms) : 0, 54685
Debugger [baseline] (6.19 ms) : 0, 6190
Debugger [candidate] (6.123 ms) : 0, 6123
Remote Config [baseline] (716.637 µs) : 0, 717
Remote Config [candidate] (693.112 µs) : 0, 693
Telemetry [baseline] (9.908 ms) : 0, 9908
Telemetry [candidate] (12.178 ms) : 0, 12178
section appsec
BytebuddyAgent [baseline] (689.523 ms) : 0, 689523
BytebuddyAgent [candidate] (693.693 ms) : 0, 693693
GlobalTracer [baseline] (236.872 ms) : 0, 236872
GlobalTracer [candidate] (237.912 ms) : 0, 237912
AppSec [baseline] (175.655 ms) : 0, 175655
AppSec [candidate] (175.752 ms) : 0, 175752
Debugger [baseline] (5.932 ms) : 0, 5932
Debugger [candidate] (5.843 ms) : 0, 5843
Remote Config [baseline] (641.728 µs) : 0, 642
Remote Config [candidate] (631.631 µs) : 0, 632
Telemetry [baseline] (8.216 ms) : 0, 8216
Telemetry [candidate] (7.709 ms) : 0, 7709
IAST [baseline] (21.888 ms) : 0, 21888
IAST [candidate] (21.694 ms) : 0, 21694
section iast
BytebuddyAgent [baseline] (795.554 ms) : 0, 795554
BytebuddyAgent [candidate] (796.977 ms) : 0, 796977
GlobalTracer [baseline] (231.453 ms) : 0, 231453
GlobalTracer [candidate] (231.913 ms) : 0, 231913
AppSec [baseline] (56.392 ms) : 0, 56392
AppSec [candidate] (56.82 ms) : 0, 56820
Debugger [baseline] (5.925 ms) : 0, 5925
Debugger [candidate] (5.922 ms) : 0, 5922
Remote Config [baseline] (601.759 µs) : 0, 602
Remote Config [candidate] (576.495 µs) : 0, 576
Telemetry [baseline] (7.972 ms) : 0, 7972
Telemetry [candidate] (7.883 ms) : 0, 7883
IAST [baseline] (23.053 ms) : 0, 23053
IAST [candidate] (23.077 ms) : 0, 23077
section profiling
ProfilingAgent [baseline] (97.883 ms) : 0, 97883
ProfilingAgent [candidate] (96.831 ms) : 0, 96831
BytebuddyAgent [baseline] (664.728 ms) : 0, 664728
BytebuddyAgent [candidate] (670.894 ms) : 0, 670894
GlobalTracer [baseline] (377.421 ms) : 0, 377421
GlobalTracer [candidate] (378.174 ms) : 0, 378174
AppSec [baseline] (54.603 ms) : 0, 54603
AppSec [candidate] (53.507 ms) : 0, 53507
Debugger [baseline] (6.149 ms) : 0, 6149
Debugger [candidate] (6.133 ms) : 0, 6133
Remote Config [baseline] (662.066 µs) : 0, 662
Remote Config [candidate] (653.321 µs) : 0, 653
Telemetry [baseline] (8.21 ms) : 0, 8210
Telemetry [candidate] (8.171 ms) : 0, 8171
Profiling [baseline] (97.907 ms) : 0, 97907
Profiling [candidate] (96.855 ms) : 0, 96855
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-04-28T13:26:36 2025-04-28T13:34:17
git_branch master andrea.marziali/proxy-improve
git_commit_date 1745843547 1745845402
git_commit_sha c55dc46 3937268
release_version 1.49.0-SNAPSHOT~c55dc46d28 1.49.0-SNAPSHOT~39372682bf
start_time 2025-04-28T13:26:22 2025-04-28T13:34:03
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1745847652 1745847652
ci_job_id 914855053 914855053
ci_pipeline_id 63486584 63486584
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-fyot57la 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-fyot57la 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~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28
    dateFormat X
    axisFormat %s
section baseline
no_agent (375.796 µs) : 355, 396
.   : milestone, 376,
iast (521.987 µs) : 499, 545
.   : milestone, 522,
iast_FULL (731.196 µs) : 708, 754
.   : milestone, 731,
iast_GLOBAL (555.959 µs) : 533, 579
.   : milestone, 556,
iast_HARDCODED_SECRET_DISABLED (509.487 µs) : 487, 532
.   : milestone, 509,
iast_INACTIVE (462.91 µs) : 440, 485
.   : milestone, 463,
iast_TELEMETRY_OFF (497.94 µs) : 475, 521
.   : milestone, 498,
tracing (457.669 µs) : 435, 480
.   : milestone, 458,
section candidate
no_agent (384.503 µs) : 364, 405
.   : milestone, 385,
iast (510.056 µs) : 487, 533
.   : milestone, 510,
iast_FULL (731.695 µs) : 708, 755
.   : milestone, 732,
iast_GLOBAL (562.784 µs) : 540, 586
.   : milestone, 563,
iast_HARDCODED_SECRET_DISABLED (506.58 µs) : 484, 529
.   : milestone, 507,
iast_INACTIVE (467.404 µs) : 444, 490
.   : milestone, 467,
iast_TELEMETRY_OFF (508.206 µs) : 486, 531
.   : milestone, 508,
tracing (458.605 µs) : 437, 480
.   : milestone, 459,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.796 µs [355.307 µs, 396.284 µs] -
iast 521.987 µs [498.737 µs, 545.237 µs] 146.192 µs (38.9%)
iast_FULL 731.196 µs [707.96 µs, 754.432 µs] 355.4 µs (94.6%)
iast_GLOBAL 555.959 µs [533.2 µs, 578.718 µs] 180.163 µs (47.9%)
iast_HARDCODED_SECRET_DISABLED 509.487 µs [486.695 µs, 532.28 µs] 133.692 µs (35.6%)
iast_INACTIVE 462.91 µs [440.361 µs, 485.458 µs] 87.114 µs (23.2%)
iast_TELEMETRY_OFF 497.94 µs [474.929 µs, 520.95 µs] 122.144 µs (32.5%)
tracing 457.669 µs [435.033 µs, 480.304 µs] 81.873 µs (21.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 384.503 µs [363.802 µs, 405.203 µs] -
iast 510.056 µs [487.326 µs, 532.786 µs] 125.553 µs (32.7%)
iast_FULL 731.695 µs [708.383 µs, 755.007 µs] 347.192 µs (90.3%)
iast_GLOBAL 562.784 µs [539.882 µs, 585.686 µs] 178.281 µs (46.4%)
iast_HARDCODED_SECRET_DISABLED 506.58 µs [484.132 µs, 529.029 µs] 122.078 µs (31.7%)
iast_INACTIVE 467.404 µs [444.361 µs, 490.448 µs] 82.902 µs (21.6%)
iast_TELEMETRY_OFF 508.206 µs [485.84 µs, 530.571 µs] 123.703 µs (32.2%)
tracing 458.605 µs [436.875 µs, 480.335 µs] 74.102 µs (19.3%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.36 ms) : 1341, 1380
.   : milestone, 1360,
appsec (1.729 ms) : 1705, 1753
.   : milestone, 1729,
appsec_no_iast (1.715 ms) : 1692, 1739
.   : milestone, 1715,
code_origins (1.675 ms) : 1648, 1701
.   : milestone, 1675,
iast (1.505 ms) : 1480, 1529
.   : milestone, 1505,
profiling (1.52 ms) : 1496, 1543
.   : milestone, 1520,
tracing (1.487 ms) : 1461, 1512
.   : milestone, 1487,
section candidate
no_agent (1.351 ms) : 1331, 1371
.   : milestone, 1351,
appsec (1.729 ms) : 1706, 1752
.   : milestone, 1729,
appsec_no_iast (1.708 ms) : 1684, 1732
.   : milestone, 1708,
code_origins (1.673 ms) : 1646, 1701
.   : milestone, 1673,
iast (1.489 ms) : 1464, 1514
.   : milestone, 1489,
profiling (1.496 ms) : 1473, 1519
.   : milestone, 1496,
tracing (1.487 ms) : 1463, 1511
.   : milestone, 1487,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.36 ms [1.341 ms, 1.38 ms] -
appsec 1.729 ms [1.705 ms, 1.753 ms] 368.254 µs (27.1%)
appsec_no_iast 1.715 ms [1.692 ms, 1.739 ms] 355.002 µs (26.1%)
code_origins 1.675 ms [1.648 ms, 1.701 ms] 314.231 µs (23.1%)
iast 1.505 ms [1.48 ms, 1.529 ms] 144.339 µs (10.6%)
profiling 1.52 ms [1.496 ms, 1.543 ms] 159.269 µs (11.7%)
tracing 1.487 ms [1.461 ms, 1.512 ms] 126.606 µs (9.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.351 ms [1.331 ms, 1.371 ms] -
appsec 1.729 ms [1.706 ms, 1.752 ms] 378.16 µs (28.0%)
appsec_no_iast 1.708 ms [1.684 ms, 1.732 ms] 357.594 µs (26.5%)
code_origins 1.673 ms [1.646 ms, 1.701 ms] 322.613 µs (23.9%)
iast 1.489 ms [1.464 ms, 1.514 ms] 138.703 µs (10.3%)
profiling 1.496 ms [1.473 ms, 1.519 ms] 145.374 µs (10.8%)
tracing 1.487 ms [1.463 ms, 1.511 ms] 136.67 µs (10.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/proxy-improve
git_commit_date 1745843547 1745845402
git_commit_sha c55dc46 3937268
release_version 1.49.0-SNAPSHOT~c55dc46d28 1.49.0-SNAPSHOT~39372682bf
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1745848137 1745848137
ci_job_id 914855055 914855055
ci_pipeline_id 63486584 63486584
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-1udog4un 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-1udog4un 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~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.709 s) : 14709000, 14709000
.   : milestone, 14709000,
appsec (15.047 s) : 15047000, 15047000
.   : milestone, 15047000,
iast (18.654 s) : 18654000, 18654000
.   : milestone, 18654000,
iast_GLOBAL (18.036 s) : 18036000, 18036000
.   : milestone, 18036000,
profiling (15.091 s) : 15091000, 15091000
.   : milestone, 15091000,
tracing (15.056 s) : 15056000, 15056000
.   : milestone, 15056000,
section candidate
no_agent (15.534 s) : 15534000, 15534000
.   : milestone, 15534000,
appsec (15.232 s) : 15232000, 15232000
.   : milestone, 15232000,
iast (18.365 s) : 18365000, 18365000
.   : milestone, 18365000,
iast_GLOBAL (18.112 s) : 18112000, 18112000
.   : milestone, 18112000,
profiling (15.754 s) : 15754000, 15754000
.   : milestone, 15754000,
tracing (14.823 s) : 14823000, 14823000
.   : milestone, 14823000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.709 s [14.709 s, 14.709 s] -
appsec 15.047 s [15.047 s, 15.047 s] 338.0 ms (2.3%)
iast 18.654 s [18.654 s, 18.654 s] 3.945 s (26.8%)
iast_GLOBAL 18.036 s [18.036 s, 18.036 s] 3.327 s (22.6%)
profiling 15.091 s [15.091 s, 15.091 s] 382.0 ms (2.6%)
tracing 15.056 s [15.056 s, 15.056 s] 347.0 ms (2.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.534 s [15.534 s, 15.534 s] -
appsec 15.232 s [15.232 s, 15.232 s] -302.0 ms (-1.9%)
iast 18.365 s [18.365 s, 18.365 s] 2.831 s (18.2%)
iast_GLOBAL 18.112 s [18.112 s, 18.112 s] 2.578 s (16.6%)
profiling 15.754 s [15.754 s, 15.754 s] 220.0 ms (1.4%)
tracing 14.823 s [14.823 s, 14.823 s] -711.0 ms (-4.6%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~39372682bf, baseline=1.49.0-SNAPSHOT~c55dc46d28
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.477 ms) : 1466, 1489
.   : milestone, 1477,
appsec (2.38 ms) : 2334, 2427
.   : milestone, 2380,
iast (2.147 ms) : 2089, 2206
.   : milestone, 2147,
iast_GLOBAL (2.208 ms) : 2148, 2267
.   : milestone, 2208,
profiling (1.993 ms) : 1947, 2040
.   : milestone, 1993,
tracing (1.972 ms) : 1926, 2017
.   : milestone, 1972,
section candidate
no_agent (1.476 ms) : 1465, 1488
.   : milestone, 1476,
appsec (2.375 ms) : 2328, 2422
.   : milestone, 2375,
iast (2.156 ms) : 2097, 2215
.   : milestone, 2156,
iast_GLOBAL (2.207 ms) : 2148, 2267
.   : milestone, 2207,
profiling (2.014 ms) : 1967, 2062
.   : milestone, 2014,
tracing (1.98 ms) : 1934, 2025
.   : milestone, 1980,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.477 ms [1.466 ms, 1.489 ms] -
appsec 2.38 ms [2.334 ms, 2.427 ms] 903.093 µs (61.1%)
iast 2.147 ms [2.089 ms, 2.206 ms] 670.138 µs (45.4%)
iast_GLOBAL 2.208 ms [2.148 ms, 2.267 ms] 730.445 µs (49.4%)
profiling 1.993 ms [1.947 ms, 2.04 ms] 516.092 µs (34.9%)
tracing 1.972 ms [1.926 ms, 2.017 ms] 494.22 µs (33.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.465 ms, 1.488 ms] -
appsec 2.375 ms [2.328 ms, 2.422 ms] 899.317 µs (60.9%)
iast 2.156 ms [2.097 ms, 2.215 ms] 680.118 µs (46.1%)
iast_GLOBAL 2.207 ms [2.148 ms, 2.267 ms] 731.017 µs (49.5%)
profiling 2.014 ms [1.967 ms, 2.062 ms] 538.132 µs (36.5%)
tracing 1.98 ms [1.934 ms, 2.025 ms] 503.378 µs (34.1%)

@amarziali amarziali requested a review from mcculls April 18, 2025 13:39
@amarziali amarziali removed the tag: do not merge Do not merge changes label Apr 18, 2025
@amarziali amarziali requested review from mcculls, bric3 and dougqh April 28, 2025 07:30
Copy link
Contributor
@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Left minor comments

Comment on lines +63 to +84
int last = -1;
int idx;
while (true) {
idx = className.indexOf('$', last + 1);
if (idx < 0) {
break;
}
if (last < 0 && className.contains("CGLIB$$")) {
break;
}
if (idx == last + 1) {
// skip the trie if consecutive $$ since, to be efficient, we can match prefixes from the
// first dollar
last = idx;
continue;
}
last = idx;
if (ProxyIgnoredClassNameTrie.apply(className, idx) >= 0) {
return;
}
}
bh.consume(true);
8000 Copy link
Contributor

Choose a reason for hiding this comment

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

What about calling the isIgnored() method and consume this result instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wanted to have it clearly copied to that specifc bench since thing can change

amarziali and others added 3 commits April 28, 2025 14:41
…gent/tooling/bytebuddy/matcher/proxy_ignored_class_name.trie

Co-authored-by: Stuart McCulloch <stuart.mcculloch@datadoghq.com>
@amarziali amarziali force-pushed the andrea.marziali/proxy-improve branch from b7ade6d to 444f285 Compare April 28, 2025 12:48
Copy link
Contributor
@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Looking good so far. I will let @mcculls have the final word / review about it 😉

Copy link
Contributor
@bric3 bric3 left a comment

Choose a reason for hiding this comment

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

LGTM, same as @PerfectSlayer

@smola smola removed their request for review April 29, 2025 08:01
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.

Nice improvement!

@amarziali amarziali merged commit 0698839 into master Apr 29, 2025
459 checks passed
@amarziali amarziali deleted the andrea.marziali/proxy-improve branch April 29, 2025 09:39
@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
comp: core Tracer core tag: performance Performance related changes type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0