Skip to content

Conversation

@dougqh
Copy link
Contributor

@dougqh dougqh commented Nov 5, 2025

What Does This Do

Adds listener support throughout NativeLoader, so calling code be informed of...

  • resolution success / failure
  • load success / failure
  • temp file creation success / failure & clean-up

Motivation

Primarily so calling code can log library loading activity

Additional Notes

Listeners can be added via NativeLoader.Builder to listen to all library loading

Listeners can also be added as 1-off to a resolveDynamic or load call and are scoped to that one library
The intention of the 1-off capability is to allow each component to just log activity for its library

Contributor Checklist

Jira ticket: [PROJ-IDENT]

dougqh added 11 commits November 4, 2025 15:01
- adding test to CompositeLibraryLoadingListener
- adding test of NativeLoader.Builder listener related methods
- adding end-to-end test for preloading listener support
- checking platformSpec overrides
- checking component support
- added tests for temporary file creation
- exposed a problem with TestLibraryLoadingListener errors getting swallowed in CompositeLibraryLoadingListener
- adding failure tracking into TestLibraryLoadingListener that is checked in assertDone
@dougqh dougqh requested a review from a team as a code owner November 5, 2025 21:44
@dougqh dougqh requested review from PerfectSlayer and removed request for a team November 5, 2025 21:44
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 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.

@dougqh dougqh assigned dougqh and unassigned dougqh and AlexeyKuznetsov-DD Nov 5, 2025
@dougqh dougqh added comp: core Tracer core type: enhancement Enhancements and improvements labels Nov 5, 2025
this.loadImpl(null, libName, EMPTY_LISTENERS);
}

public void load(String libName, LibraryLoadingListener... scopedListeners)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably the most questionable part.

I decided it would be nice for each caller to listen to just its libraries, so I added the ability to tack on a listener that is scoped to a single library.

String optionalComponent,
String libName,
LibraryLoadException optionalCause) {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll probably end up tweaking the methods for temp file notification if/when we add in pluggable temp file managers.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 5, 2025

🎯 Code Coverage
Patch Coverage: 96.18%
Total Coverage: 97.22% (+37.61%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5fff446 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Nov 5, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/native-loader-listener
git_commit_date 1763047590 1763052120
git_commit_sha 640a4bd 5fff446
release_version 1.56.0-SNAPSHOT~640a4bd02b 1.55.0-SNAPSHOT~5fff446671
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1763054176 1763054176
ci_job_id 1233235792 1233235792
ci_pipeline_id 82288531 82288531
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-ayefb2yc 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-ayefb2yc 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 58 metrics, 7 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.11 s) : 0, 1110461
Total [baseline] (10.789 s) : 0, 10789124
Agent [candidate] (1.101 s) : 0, 1100591
Total [candidate] (10.72 s) : 0, 10720116
section appsec
Agent [baseline] (1.29 s) : 0, 1289605
Total [baseline] (11.151 s) : 0, 11150560
Agent [candidate] (1.285 s) : 0, 1285130
Total [candidate] (11.238 s) : 0, 11238258
section iast
Agent [baseline] (1.24 s) : 0, 1239740
Total [baseline] (11.203 s) : 0, 11203428
Agent [candidate] (1.235 s) : 0, 1235163
Total [candidate] (11.143 s) : 0, 11142703
section profiling
Agent [baseline] (1.228 s) : 0, 1227941
Total [baseline] (11.098 s) : 0, 11097537
Agent [candidate] (1.227 s) : 0, 1227272
Total [candidate] (11.041 s) : 0, 11040794
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.11 s -
Agent appsec 1.29 s 179.144 ms (16.1%)
Agent iast 1.24 s 129.279 ms (11.6%)
Agent profiling 1.228 s 117.48 ms (10.6%)
Total tracing 10.789 s -
Total appsec 11.151 s 361.436 ms (3.3%)
Total iast 11.203 s 414.303 ms (3.8%)
Total profiling 11.098 s 308.413 ms (2.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.101 s -
Agent appsec 1.285 s 184.539 ms (16.8%)
Agent iast 1.235 s 134.573 ms (12.2%)
Agent profiling 1.227 s 126.681 ms (11.5%)
Total tracing 10.72 s -
Total appsec 11.238 s 518.142 ms (4.8%)
Total iast 11.143 s 422.587 ms (3.9%)
Total profiling 11.041 s 320.678 ms (3.0%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.473 ms) : 0, 1473
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (713.136 ms) : 0, 713136
BytebuddyAgent [candidate] (706.607 ms) : 0, 706607
GlobalTracer [baseline] (250.516 ms) : 0, 250516
GlobalTracer [candidate] (248.687 ms) : 0, 248687
AppSec [baseline] (32.817 ms) : 0, 32817
AppSec [candidate] (32.318 ms) : 0, 32318
Debugger [baseline] (64.961 ms) : 0, 64961
Debugger [candidate] (64.422 ms) : 0, 64422
Remote Config [baseline] (651.511 µs) : 0, 652
Remote Config [candidate] (634.224 µs) : 0, 634
Telemetry [baseline] (8.257 ms) : 0, 8257
Telemetry [candidate] (8.169 ms) : 0, 8169
Flare Poller [baseline] (3.772 ms) : 0, 3772
Flare Poller [candidate] (3.682 ms) : 0, 3682
section appsec
crashtracking [baseline] (1.457 ms) : 0, 1457
crashtracking [candidate] (1.451 ms) : 0, 1451
BytebuddyAgent [baseline] (735.916 ms) : 0, 735916
BytebuddyAgent [candidate] (731.27 ms) : 0, 731270
GlobalTracer [baseline] (242.595 ms) : 0, 242595
GlobalTracer [candidate] (242.007 ms) : 0, 242007
IAST [baseline] (25.387 ms) : 0, 25387
IAST [candidate] (25.118 ms) : 0, 25118
AppSec [baseline] (175.168 ms) : 0, 175168
AppSec [candidate] (174.425 ms) : 0, 174425
Debugger [baseline] (61.379 ms) : 0, 61379
Debugger [candidate] (62.766 ms) : 0, 62766
Remote Config [baseline] (653.58 µs) : 0, 654
Remote Config [candidate] (663.466 µs) : 0, 663
Telemetry [baseline] (8.367 ms) : 0, 8367
Telemetry [candidate] (8.534 ms) : 0, 8534
Flare Poller [baseline] (3.852 ms) : 0, 3852
Flare Poller [candidate] (4.028 ms) : 0, 4028
section iast
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.446 ms) : 0, 1446
BytebuddyAgent [baseline] (831.001 ms) : 0, 831001
BytebuddyAgent [candidate] (827.287 ms) : 0, 827287
GlobalTracer [baseline] (238.078 ms) : 0, 238078
GlobalTracer [candidate] (237.411 ms) : 0, 237411
IAST [baseline] (30.12 ms) : 0, 30120
IAST [candidate] (30.194 ms) : 0, 30194
AppSec [baseline] (31.726 ms) : 0, 31726
AppSec [candidate] (31.399 ms) : 0, 31399
Debugger [baseline] (60.986 ms) : 0, 60986
Debugger [candidate] (61.214 ms) : 0, 61214
Remote Config [baseline] (553.755 µs) : 0, 554
Remote Config [candidate] (543.558 µs) : 0, 544
Telemetry [baseline] (7.638 ms) : 0, 7638
Telemetry [candidate] (7.617 ms) : 0, 7617
Flare Poller [baseline] (3.465 ms) : 0, 3465
Flare Poller [candidate] (3.443 ms) : 0, 3443
section profiling
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.432 ms) : 0, 1432
BytebuddyAgent [baseline] (730.692 ms) : 0, 730692
BytebuddyAgent [candidate] (729.957 ms) : 0, 729957
GlobalTracer [baseline] (222.122 ms) : 0, 222122
GlobalTracer [candidate] (221.623 ms) : 0, 221623
AppSec [baseline] (32.294 ms) : 0, 32294
AppSec [candidate] (32.219 ms) : 0, 32219
Debugger [baseline] (62.651 ms) : 0, 62651
Debugger [candidate] (63.169 ms) : 0, 63169
Remote Config [baseline] (637.65 µs) : 0, 638
Remote Config [candidate] (646.785 µs) : 0, 647
Telemetry [baseline] (7.913 ms) : 0, 7913
Telemetry [candidate] (7.95 ms) : 0, 7950
Flare Poller [baseline] (3.746 ms) : 0, 3746
Flare Poller [candidate] (3.692 ms) : 0, 3692
ProfilingAgent [baseline] (96.834 ms) : 0, 96834
ProfilingAgent [candidate] (96.921 ms) : 0, 96921
Profiling [baseline] (97.408 ms) : 0, 97408
Profiling [candidate] (97.499 ms) : 0, 97499
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.098 s) : 0, 1097632
Total [baseline] (8.819 s) : 0, 8818740
Agent [candidate] (1.105 s) : 0, 1105475
Total [candidate] (8.854 s) : 0, 8853879
section iast
Agent [baseline] (1.237 s) : 0, 1237341
Total [baseline] (9.539 s) : 0, 9539297
Agent [candidate] (1.239 s) : 0, 1238848
Total [candidate] (9.552 s) : 0, 9551786
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.098 s -
Agent iast 1.237 s 139.71 ms (12.7%)
Total tracing 8.819 s -
Total iast 9.539 s 720.556 ms (8.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.105 s -
Agent iast 1.239 s 133.372 ms (12.1%)
Total tracing 8.854 s -
Total iast 9.552 s 697.908 ms (7.9%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.451 ms) : 0, 1451
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (705.255 ms) : 0, 705255
BytebuddyAgent [candidate] (710.379 ms) : 0, 710379
GlobalTracer [baseline] (247.419 ms) : 0, 247419
GlobalTracer [candidate] (250.051 ms) : 0, 250051
AppSec [baseline] (32.577 ms) : 0, 32577
AppSec [candidate] (32.72 ms) : 0, 32720
Debugger [baseline] (63.881 ms) : 0, 63881
Debugger [candidate] (63.371 ms) : 0, 63371
Remote Config [baseline] (656.05 µs) : 0, 656
Remote Config [candidate] (702.861 µs) : 0, 703
Telemetry [baseline] (8.093 ms) : 0, 8093
Telemetry [candidate] (8.267 ms) : 0, 8267
Flare Poller [baseline] (3.644 ms) : 0, 3644
Flare Poller [candidate] (3.725 ms) : 0, 3725
section iast
crashtracking [baseline] (1.451 ms) : 0, 1451
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (829.756 ms) : 0, 829756
BytebuddyAgent [candidate] (830.614 ms) : 0, 830614
GlobalTracer [baseline] (237.332 ms) : 0, 237332
GlobalTracer [candidate] (238.405 ms) : 0, 238405
IAST [baseline] (27.421 ms) : 0, 27421
IAST [candidate] (30.892 ms) : 0, 30892
AppSec [baseline] (34.245 ms) : 0, 34245
AppSec [candidate] (30.56 ms) : 0, 30560
Debugger [baseline] (60.58 ms) : 0, 60580
Debugger [candidate] (60.338 ms) : 0, 60338
Remote Config [baseline] (556.292 µs) : 0, 556
Remote Config [candidate] (547.075 µs) : 0, 547
Telemetry [baseline] (7.706 ms) : 0, 7706
Telemetry [candidate] (7.741 ms) : 0, 7741
Flare Poller [baseline] (3.48 ms) : 0, 3480
Flare Poller [candidate] (3.488 ms) : 0, 3488
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/native-loader-listener
git_commit_date 1763047590 1763052120
git_commit_sha 640a4bd 5fff446
release_version 1.56.0-SNAPSHOT~640a4bd02b 1.55.0-SNAPSHOT~5fff446671
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1763055204 1763055204
ci_job_id 1233235794 1233235794
ci_pipeline_id 82288531 82288531
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-3oee9jqi 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-3oee9jqi 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 6 performance improvements and 2 performance regressions! Performance is the same for 13 metrics, 15 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:insecure-bank:iast_GLOBAL:high_load better
[-362.569µs; -241.110µs] or [-11.853%; -7.882%]
better
[-765.113µs; -352.461µs] or [-9.126%; -4.204%]
unstable
[-56.693op/s; +218.318op/s] or [-4.706%; +18.122%]
2.757ms 7.825ms 1285.500op/s 3.059ms 8.384ms 1204.688op/s
scenario:load:insecure-bank:iast_FULL:high_load worse
[+282.888µs; +580.027µs] or [+5.703%; +11.693%]
worse
[+476.042µs; +1250.113µs] or [+4.011%; +10.533%]
unstable
[-142.607op/s; +19.794op/s] or [-17.299%; +2.401%]
5.392ms 12.731ms 762.938op/s 4.960ms 11.868ms 824.344op/s
scenario:load:petclinic:profiling:high_load better
[-1.865ms; -0.596ms] or [-9.535%; -3.045%]
better
[-2.052ms; -0.781ms] or [-6.621%; -2.519%]
unstable
[-11.295op/s; +39.232op/s] or [-4.768%; +16.562%]
18.331ms 29.574ms 250.844op/s 19.561ms 30.990ms 236.875op/s
scenario:load:petclinic:appsec:high_load better
[-1.835ms; -1.013ms] or [-9.279%; -5.123%]
better
[-1.919ms; -0.703ms] or [-6.057%; -2.219%]
unstable
[-10.164op/s; +39.664op/s] or [-4.358%; +17.007%]
18.351ms 30.374ms 247.969op/s 19.775ms 31.685ms 233.219op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.185 ms) : 1173, 1196
.   : milestone, 1185,
iast (3.25 ms) : 3203, 3296
.   : milestone, 3250,
iast_FULL (5.606 ms) : 5551, 5661
.   : milestone, 5606,
iast_GLOBAL (3.812 ms) : 3750, 3873
.   : milestone, 3812,
profiling (2.124 ms) : 2105, 2143
.   : milestone, 2124,
tracing (1.797 ms) : 1783, 1812
.   : milestone, 1797,
section candidate
no_agent (1.213 ms) : 1201, 1225
.   : milestone, 1213,
iast (3.197 ms) : 3115, 3280
.   : milestone, 3197,
iast_FULL (6.065 ms) : 6003, 6126
.   : milestone, 6065,
iast_GLOBAL (3.568 ms) : 3478, 3658
.   : milestone, 3568,
profiling (1.981 ms) : 1964, 1998
.   : milestone, 1981,
tracing (1.838 ms) : 1823, 1854
.   : milestone, 1838,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.185 ms [1.173 ms, 1.196 ms] -
iast 3.25 ms [3.203 ms, 3.296 ms] 2.065 ms (174.3%)
iast_FULL 5.606 ms [5.551 ms, 5.661 ms] 4.421 ms (373.1%)
iast_GLOBAL 3.812 ms [3.75 ms, 3.873 ms] 2.627 ms (221.7%)
profiling 2.124 ms [2.105 ms, 2.143 ms] 939.167 µs (79.3%)
tracing 1.797 ms [1.783 ms, 1.812 ms] 612.21 µs (51.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.213 ms [1.201 ms, 1.225 ms] -
iast 3.197 ms [3.115 ms, 3.28 ms] 1.984 ms (163.6%)
iast_FULL 6.065 ms [6.003 ms, 6.126 ms] 4.852 ms (400.0%)
iast_GLOBAL 3.568 ms [3.478 ms, 3.658 ms] 2.355 ms (194.2%)
profiling 1.981 ms [1.964 ms, 1.998 ms] 767.966 µs (63.3%)
tracing 1.838 ms [1.823 ms, 1.854 ms] 625.475 µs (51.6%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b
    dateFormat X
    axisFormat %s
section baseline
no_agent (17.874 ms) : 17692, 18056
.   : milestone, 17874,
appsec (20.021 ms) : 19815, 20227
.   : milestone, 20021,
code_origins (17.929 ms) : 17753, 18104
.   : milestone, 17929,
iast (17.588 ms) : 17412, 17763
.   : milestone, 17588,
profiling (19.707 ms) : 19510, 19904
.   : milestone, 19707,
tracing (17.552 ms) : 17376, 17727
.   : milestone, 17552,
section candidate
no_agent (17.112 ms) : 16941, 17284
.   : milestone, 17112,
appsec (18.82 ms) : 18628, 19012
.   : milestone, 18820,
code_origins (17.702 ms) : 17528, 17877
.   : milestone, 17702,
iast (17.729 ms) : 17553, 17904
.   : milestone, 17729,
profiling (18.606 ms) : 18420, 18791
.   : milestone, 18606,
tracing (17.67 ms) : 17491, 17848
.   : milestone, 17670,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.874 ms [17.692 ms, 18.056 ms] -
appsec 20.021 ms [19.815 ms, 20.227 ms] 2.147 ms (12.0%)
code_origins 17.929 ms [17.753 ms, 18.104 ms] 54.902 µs (0.3%)
iast 17.588 ms [17.412 ms, 17.763 ms] -286.1 µs (-1.6%)
profiling 19.707 ms [19.51 ms, 19.904 ms] 1.833 ms (10.3%)
tracing 17.552 ms [17.376 ms, 17.727 ms] -322.227 µs (-1.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.112 ms [16.941 ms, 17.284 ms] -
appsec 18.82 ms [18.628 ms, 19.012 ms] 1.708 ms (10.0%)
code_origins 17.702 ms [17.528 ms, 17.877 ms] 590.143 µs (3.4%)
iast 17.729 ms [17.553 ms, 17.904 ms] 616.21 µs (3.6%)
profiling 18.606 ms [18.42 ms, 18.791 ms] 1.493 ms (8.7%)
tracing 17.67 ms [17.491 ms, 17.848 ms] 557.189 µs (3.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/native-loader-listener
git_commit_date 1763047590 1763052120
git_commit_sha 640a4bd 5fff446
release_version 1.56.0-SNAPSHOT~640a4bd02b 1.55.0-SNAPSHOT~5fff446671
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1763054418 1763054418
ci_job_id 1233235796 1233235796
ci_pipeline_id 82288531 82288531
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-ohqlbq6v 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-ohqlbq6v 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 regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.481 ms) : 1470, 1493
.   : milestone, 1481,
appsec (3.693 ms) : 3479, 3906
.   : milestone, 3693,
iast (2.232 ms) : 2168, 2297
.   : milestone, 2232,
iast_GLOBAL (2.28 ms) : 2215, 2344
.   : milestone, 2280,
profiling (2.09 ms) : 2036, 2143
.   : milestone, 2090,
tracing (2.042 ms) : 1992, 2092
.   : milestone, 2042,
section candidate
no_agent (1.48 ms) : 1469, 1492
.   : milestone, 1480,
appsec (3.671 ms) : 3456, 3886
.   : milestone, 3671,
iast (2.226 ms) : 2161, 2290
.   : milestone, 2226,
iast_GLOBAL (2.262 ms) : 2198, 2326
.   : milestone, 2262,
profiling (2.09 ms) : 2036, 2144
.   : milestone, 2090,
tracing (2.061 ms) : 2010, 2112
.   : milestone, 2061,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.47 ms, 1.493 ms] -
appsec 3.693 ms [3.479 ms, 3.906 ms] 2.212 ms (149.3%)
iast 2.232 ms [2.168 ms, 2.297 ms] 751.144 µs (50.7%)
iast_GLOBAL 2.28 ms [2.215 ms, 2.344 ms] 798.289 µs (53.9%)
profiling 2.09 ms [2.036 ms, 2.143 ms] 608.313 µs (41.1%)
tracing 2.042 ms [1.992 ms, 2.092 ms] 560.442 µs (37.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.48 ms [1.469 ms, 1.492 ms] -
appsec 3.671 ms [3.456 ms, 3.886 ms] 2.191 ms (148.0%)
iast 2.226 ms [2.161 ms, 2.29 ms] 745.41 µs (50.4%)
iast_GLOBAL 2.262 ms [2.198 ms, 2.326 ms] 781.374 µs (52.8%)
profiling 2.09 ms [2.036 ms, 2.144 ms] 609.766 µs (41.2%)
tracing 2.061 ms [2.01 ms, 2.112 ms] 580.68 µs (39.2%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~5fff446671, baseline=1.56.0-SNAPSHOT~640a4bd02b
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.022 s) : 15022000, 15022000
.   : milestone, 15022000,
appsec (14.629 s) : 14629000, 14629000
.   : milestone, 14629000,
iast (18.624 s) : 18624000, 18624000
.   : milestone, 18624000,
iast_GLOBAL (17.969 s) : 17969000, 17969000
.   : milestone, 17969000,
profiling (15.002 s) : 15002000, 15002000
.   : milestone, 15002000,
tracing (14.713 s) : 14713000, 14713000
.   : milestone, 14713000,
section candidate
no_agent (15.292 s) : 15292000, 15292000
.   : milestone, 15292000,
appsec (14.702 s) : 14702000, 14702000
.   : milestone, 14702000,
iast (18.164 s) : 18164000, 18164000
.   : milestone, 18164000,
iast_GLOBAL (18.188 s) : 18188000, 18188000
.   : milestone, 18188000,
profiling (15.012 s) : 15012000, 15012000
.   : milestone, 15012000,
tracing (14.722 s) : 14722000, 14722000
.   : milestone, 14722000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.022 s [15.022 s, 15.022 s] -
appsec 14.629 s [14.629 s, 14.629 s] -393.0 ms (-2.6%)
iast 18.624 s [18.624 s, 18.624 s] 3.602 s (24.0%)
iast_GLOBAL 17.969 s [17.969 s, 17.969 s] 2.947 s (19.6%)
profiling 15.002 s [15.002 s, 15.002 s] -20.0 ms (-0.1%)
tracing 14.713 s [14.713 s, 14.713 s] -309.0 ms (-2.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.292 s [15.292 s, 15.292 s] -
appsec 14.702 s [14.702 s, 14.702 s] -590.0 ms (-3.9%)
iast 18.164 s [18.164 s, 18.164 s] 2.872 s (18.8%)
iast_GLOBAL 18.188 s [18.188 s, 18.188 s] 2.896 s (18.9%)
profiling 15.012 s [15.012 s, 15.012 s] -280.0 ms (-1.8%)
tracing 14.722 s [14.722 s, 14.722 s] -570.0 ms (-3.7%)

- passing underlying cause rather than LibraryLoadException
- adding more implied assertions to TestLibraryLoadingListener
- using LibCheck throughout TestLibraryLoadingListener
- adding temp file creation failure test
- checking temp file creation failure
try (URLClassLoader classLoader = createClassLoader(jar)) {
NativeLoader loader =
NativeLoader.builder().fromClassLoader(classLoader).tempDir(noWriteDir).build();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I like the listener callbacks here.
Right now...

  • you get a successful resolution because the source URL was found
  • then you get a failed temp file creation

I feel both those make sense, but there's not a listener call back to indicate that the overall resolveDynamic call still failed. I think it might be nice to have one; thoughts?

@dougqh dougqh changed the title Dougqh/native loader listener NativeLoader Listener Support Nov 6, 2025
dougqh added 11 commits November 6, 2025 14:41
- exposed oversight in CompositeLibraryLoadingListener not implementing onLoadFailure
- added loading failure tests
- exposed missing / incomplete load variants in NativeLoader
…-trace-java into dougqh/native-loader-listener
Made order of PlatformSpec, component, libName consistent
Changed component -> optionalComponent for clarity
component -> optionalComponent
Adding coverage for exceptions in LibraryResolver and PathLocator
- checking that proper exceptions are passed to listener
- covering NativeLoader.isPlatformSupported
- removed unused parameter in onTempFileCreationFailure
- fixed oversight in Composite listener coverage
  - intended to use a shuffled set of listeners with errant & nop listeners injected
  - also provides full coverage of default methods on LibraryLoadingListener
@dougqh dougqh enabled auto-merge (squash) November 13, 2025 16:42
@dougqh dougqh merged commit 0933194 into master Nov 13, 2025
539 of 540 checks passed
@dougqh dougqh deleted the dougqh/native-loader-listener branch November 13, 2025 17:44
@github-actions github-actions bot added this to the 1.56.0 milestone Nov 13, 2025
@PerfectSlayer PerfectSlayer changed the title NativeLoader Listener Support Add NativeLoader listener support Nov 20, 2025
@PerfectSlayer PerfectSlayer added comp: platform Platform and removed comp: core Tracer core labels Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: platform Platform type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants