Skip to content

Conversation

@mcculls
Copy link
Contributor

@mcculls mcculls commented Oct 13, 2025

Motivation

The keys used to lookup instances are always string literals, bounded in code by a fixed number of calls. These keys are never collected, so we don't need to use a weak map. The instance store is accessed when setting up helpers to guarantee the same instance is used by different instrumentations sharing a common type (via their parent class-loader.) Therefore each store just needs basic synchronization to guarantee it only creates one instance per-key.

Additional Notes

Making this change reduces the places we (indirectly) use com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap

Note that each instance store is maintained as a ClassValue of the class being implemented / extended.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@mcculls mcculls added type: enhancement Enhancements and improvements comp: core Tracer core labels Oct 13, 2025
@mcculls mcculls force-pushed the mcculls/simplify-instance-store branch from 5188fd4 to 3fea6c3 Compare October 13, 2025 11:48
@datadog-official
Copy link

datadog-official bot commented Oct 13, 2025

🎯 Code Coverage
Patch Coverage: 75.00%
Total Coverage: 63.37% (+3.46%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 08f91e1 | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Oct 13, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/simplify-instance-store
git_commit_date 1760368047 1760385081
git_commit_sha 6dc3f85 08f91e1
release_version 1.55.0-SNAPSHOT~6dc3f85c93 1.55.0-SNAPSHOT~08f91e1dfa
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1760388892 1760388892
ci_job_id 1177123150 1177123150
ci_pipeline_id 79179676 79179676
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-sot8hd4h 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-sot8hd4h 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 59 metrics, 6 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.017 s) : 0, 1016622
Total [baseline] (8.677 s) : 0, 8677126
Agent [candidate] (1.039 s) : 0, 1039342
Total [candidate] (8.685 s) : 0, 8685473
section iast
Agent [baseline] (1.16 s) : 0, 1159861
Total [baseline] (9.313 s) : 0, 9312627
Agent [candidate] (1.15 s) : 0, 1149883
Total [candidate] (9.261 s) : 0, 9261249
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.017 s -
Agent iast 1.16 s 143.239 ms (14.1%)
Total tracing 8.677 s -
Total iast 9.313 s 635.501 ms (7.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.039 s -
Agent iast 1.15 s 110.541 ms (10.6%)
Total tracing 8.685 s -
Total iast 9.261 s 575.776 ms (6.6%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.497 ms) : 0, 1497
BytebuddyAgent [baseline] (692.329 ms) : 0, 692329
BytebuddyAgent [candidate] (708.616 ms) : 0, 708616
GlobalTracer [baseline] (241.661 ms) : 0, 241661
GlobalTracer [candidate] (246.079 ms) : 0, 246079
AppSec [baseline] (32.755 ms) : 0, 32755
AppSec [candidate] (33.181 ms) : 0, 33181
Debugger [baseline] (6.435 ms) : 0, 6435
Debugger [candidate] (6.586 ms) : 0, 6586
Remote Config [baseline] (702.192 µs) : 0, 702
Remote Config [candidate] (709.215 µs) : 0, 709
Telemetry [baseline] (9.295 ms) : 0, 9295
Telemetry [candidate] (9.373 ms) : 0, 9373
Flare Poller [baseline] (10.916 ms) : 0, 10916
Flare Poller [candidate] (11.814 ms) : 0, 11814
section iast
crashtracking [baseline] (1.498 ms) : 0, 1498
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (823.083 ms) : 0, 823083
BytebuddyAgent [candidate] (814.787 ms) : 0, 814787
GlobalTracer [baseline] (232.341 ms) : 0, 232341
GlobalTracer [candidate] (230.973 ms) : 0, 230973
IAST [baseline] (26.576 ms) : 0, 26576
IAST [candidate] (26.701 ms) : 0, 26701
AppSec [baseline] (34.981 ms) : 0, 34981
AppSec [candidate] (34.748 ms) : 0, 34748
Debugger [baseline] (6.156 ms) : 0, 6156
Debugger [candidate] (6.135 ms) : 0, 6135
Remote Config [baseline] (619.781 µs) : 0, 620
Remote Config [candidate] (606.02 µs) : 0, 606
Telemetry [baseline] (8.747 ms) : 0, 8747
Telemetry [candidate] (8.708 ms) : 0, 8708
Flare Poller [baseline] (4.258 ms) : 0, 4258
Flare Poller [candidate] (4.214 ms) : 0, 4214
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.02 s) : 0, 1020471
Total [baseline] (10.789 s) : 0, 10788548
Agent [candidate] (1.024 s) : 0, 1024492
Total [candidate] (10.724 s) : 0, 10724496
section appsec
Agent [baseline] (1.201 s) : 0, 1201362
Total [baseline] (11.075 s) : 0, 11074840
Agent [candidate] (1.201 s) : 0, 1200827
Total [candidate] (11.047 s) : 0, 11046645
section iast
Agent [baseline] (1.153 s) : 0, 1153313
Total [baseline] (11.124 s) : 0, 11124077
Agent [candidate] (1.162 s) : 0, 1161922
Total [candidate] (11.026 s) : 0, 11025711
section profiling
Agent [baseline] (1.158 s) : 0, 1158077
Total [baseline] (11.055 s) : 0, 11055055
Agent [candidate] (1.172 s) : 0, 1171512
Total [candidate] (11.093 s) : 0, 11093094
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.02 s -
Agent appsec 1.201 s 180.89 ms (17.7%)
Agent iast 1.153 s 132.841 ms (13.0%)
Agent profiling 1.158 s 137.606 ms (13.5%)
Total tracing 10.789 s -
Total appsec 11.075 s 286.291 ms (2.7%)
Total iast 11.124 s 335.529 ms (3.1%)
Total profiling 11.055 s 266.507 ms (2.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.024 s -
Agent appsec 1.201 s 176.335 ms (17.2%)
Agent iast 1.162 s 137.43 ms (13.4%)
Agent profiling 1.172 s 147.02 ms (14.4%)
Total tracing 10.724 s -
Total appsec 11.047 s 322.149 ms (3.0%)
Total iast 11.026 s 301.215 ms (2.8%)
Total profiling 11.093 s 368.598 ms (3.4%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.454 ms) : 0, 1454
BytebuddyAgent [baseline] (696.849 ms) : 0, 696849
BytebuddyAgent [candidate] (698.728 ms) : 0, 698728
GlobalTracer [baseline] (241.807 ms) : 0, 241807
GlobalTracer [candidate] (243.214 ms) : 0, 243214
AppSec [baseline] (32.404 ms) : 0, 32404
AppSec [candidate] (32.43 ms) : 0, 32430
Debugger [baseline] (6.426 ms) : 0, 6426
Debugger [candidate] (6.535 ms) : 0, 6535
Remote Config [baseline] (717.114 µs) : 0, 717
Remote Config [candidate] (710.126 µs) : 0, 710
Telemetry [baseline] (9.33 ms) : 0, 9330
Telemetry [candidate] (9.368 ms) : 0, 9368
Flare Poller [baseline] (10.226 ms) : 0, 10226
Flare Poller [candidate] (10.783 ms) : 0, 10783
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.476 ms) : 0, 1476
BytebuddyAgent [baseline] (723.887 ms) : 0, 723887
BytebuddyAgent [candidate] (722.146 ms) : 0, 722146
GlobalTracer [baseline] (236.144 ms) : 0, 236144
GlobalTracer [candidate] (236.136 ms) : 0, 236136
IAST [baseline] (24.646 ms) : 0, 24646
IAST [candidate] (24.97 ms) : 0, 24970
AppSec [baseline] (174.694 ms) : 0, 174694
AppSec [candidate] (175.673 ms) : 0, 175673
Debugger [baseline] (6.147 ms) : 0, 6147
Debugger [candidate] (6.112 ms) : 0, 6112
Remote Config [baseline] (628.19 µs) : 0, 628
Remote Config [candidate] (628.025 µs) : 0, 628
Telemetry [baseline] (8.57 ms) : 0, 8570
Telemetry [candidate] (8.502 ms) : 0, 8502
Flare Poller [baseline] (3.976 ms) : 0, 3976
Flare Poller [candidate] (3.968 ms) : 0, 3968
section iast
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.456 ms) : 0, 1456
BytebuddyAgent [baseline] (816.867 ms) : 0, 816867
BytebuddyAgent [candidate] (822.24 ms) : 0, 822240
GlobalTracer [baseline] (231.823 ms) : 0, 231823
GlobalTracer [candidate] (233.883 ms) : 0, 233883
IAST [baseline] (26.765 ms) : 0, 26765
IAST [candidate] (27.126 ms) : 0, 27126
AppSec [baseline] (35.075 ms) : 0, 35075
AppSec [candidate] (35.549 ms) : 0, 35549
Debugger [baseline] (6.146 ms) : 0, 6146
Debugger [candidate] (6.246 ms) : 0, 6246
Remote Config [baseline] (626.999 µs) : 0, 627
Remote Config [candidate] (624.404 µs) : 0, 624
Telemetry [baseline] (8.69 ms) : 0, 8690
Telemetry [candidate] (8.855 ms) : 0, 8855
Flare Poller [baseline] (4.308 ms) : 0, 4308
Flare Poller [candidate] (4.285 ms) : 0, 4285
section profiling
crashtracking [baseline] (1.427 ms) : 0, 1427
crashtracking [candidate] (1.435 ms) : 0, 1435
BytebuddyAgent [baseline] (719.678 ms) : 0, 719678
BytebuddyAgent [candidate] (726.908 ms) : 0, 726908
GlobalTracer [baseline] (216.919 ms) : 0, 216919
GlobalTracer [candidate] (219.277 ms) : 0, 219277
AppSec [baseline] (32.204 ms) : 0, 32204
AppSec [candidate] (32.584 ms) : 0, 32584
Debugger [baseline] (6.459 ms) : 0, 6459
Debugger [candidate] (7.333 ms) : 0, 7333
Remote Config [baseline] (750.898 µs) : 0, 751
Remote Config [candidate] (837.244 µs) : 0, 837
Telemetry [baseline] (16.03 ms) : 0, 16030
Telemetry [candidate] (15.536 ms) : 0, 15536
Flare Poller [baseline] (4.163 ms) : 0, 4163
Flare Poller [candidate] (4.225 ms) : 0, 4225
ProfilingAgent [baseline] (107.506 ms) : 0, 107506
ProfilingAgent [candidate] (109.792 ms) : 0, 109792
Profiling [baseline] (108.646 ms) : 0, 108646
Profiling [candidate] (111.056 ms) : 0, 111056
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/simplify-instance-store
git_commit_date 1760368047 1760385081
git_commit_sha 6dc3f85 08f91e1
release_version 1.55.0-SNAPSHOT~6dc3f85c93 1.55.0-SNAPSHOT~08f91e1dfa
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1760388555 1760388555
ci_job_id 1177123151 1177123151
ci_pipeline_id 79179676 79179676
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-1-k4rem6o6 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-1-k4rem6o6 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 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:iast:high_load worse
[+203.934µs; +560.173µs] or [+2.110%; +5.795%]
unstable
[-74.284op/s; +38.471op/s] or [-15.467%; +8.010%]
10.049ms 462.375op/s 9.667ms 480.281op/s
scenario:load:insecure-bank:tracing:high_load better
[-411.231µs; -159.620µs] or [-5.169%; -2.006%]
unstable
[-52.436op/s; +95.186op/s] or [-9.004%; +16.344%]
7.670ms 603.750op/s 7.956ms 582.375op/s
scenario:load:petclinic:no_agent:high_load worse
[+1.181ms; +1.811ms] or [+3.276%; +5.024%]
unstable
[-14.338op/s; +4.088op/s] or [-11.060%; +3.154%]
37.548ms 124.513op/s 36.052ms 129.637op/s
scenario:load:petclinic:appsec:high_load better
[-1.916ms; -1.003ms] or [-3.854%; -2.017%]
unstable
[-4.084op/s; +9.784op/s] or [-4.338%; +10.392%]
48.245ms 97.000op/s 49.705ms 94.150op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.42 ms) : 4369, 4472
.   : milestone, 4420,
iast (9.667 ms) : 9503, 9830
.   : milestone, 9667,
iast_FULL (14.407 ms) : 14118, 14696
.   : milestone, 14407,
iast_GLOBAL (10.879 ms) : 10684, 11074
.   : milestone, 10879,
profiling (8.793 ms) : 8658, 8928
.   : milestone, 8793,
tracing (7.956 ms) : 7830, 8081
.   : milestone, 7956,
section candidate
no_agent (4.313 ms) : 4264, 4362
.   : milestone, 4313,
iast (10.049 ms) : 9881, 10216
.   : milestone, 10049,
iast_FULL (13.904 ms) : 13632, 14175
.   : milestone, 13904,
iast_GLOBAL (10.731 ms) : 10529, 10934
.   : milestone, 10731,
profiling (9.076 ms) : 8939, 9212
.   : milestone, 9076,
tracing (7.67 ms) : 7562, 7778
.   : milestone, 7670,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.42 ms [4.369 ms, 4.472 ms] -
iast 9.667 ms [9.503 ms, 9.83 ms] 5.246 ms (118.7%)
iast_FULL 14.407 ms [14.118 ms, 14.696 ms] 9.987 ms (225.9%)
iast_GLOBAL 10.879 ms [10.684 ms, 11.074 ms] 6.459 ms (146.1%)
profiling 8.793 ms [8.658 ms, 8.928 ms] 4.372 ms (98.9%)
tracing 7.956 ms [7.83 ms, 8.081 ms] 3.535 ms (80.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.313 ms [4.264 ms, 4.362 ms] -
iast 10.049 ms [9.881 ms, 10.216 ms] 5.736 ms (133.0%)
iast_FULL 13.904 ms [13.632 ms, 14.175 ms] 9.591 ms (222.4%)
iast_GLOBAL 10.731 ms [10.529 ms, 10.934 ms] 6.418 ms (148.8%)
profiling 9.076 ms [8.939 ms, 9.212 ms] 4.763 ms (110.4%)
tracing 7.67 ms [7.562 ms, 7.778 ms] 3.357 ms (77.8%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93
    dateFormat X
    axisFormat %s
section baseline
no_agent (36.052 ms) : 35760, 36343
.   : milestone, 36052,
appsec (49.705 ms) : 49266, 50143
.   : milestone, 49705,
code_origins (43.466 ms) : 43098, 43834
.   : milestone, 43466,
iast (45.992 ms) : 45580, 46404
.   : milestone, 45992,
profiling (49.764 ms) : 49294, 50234
.   : milestone, 49764,
tracing (44.863 ms) : 44484, 45242
.   : milestone, 44863,
section candidate
no_agent (37.548 ms) : 37253, 37842
.   : milestone, 37548,
appsec (48.245 ms) : 47836, 48655
.   : milestone, 48245,
code_origins (44.251 ms) : 43868, 44634
.   : milestone, 44251,
iast (45.138 ms) : 44750, 45525
.   : milestone, 45138,
profiling (49.63 ms) : 49129, 50130
.   : milestone, 49630,
tracing (44.43 ms) : 44058, 44803
.   : milestone, 44430,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.052 ms [35.76 ms, 36.343 ms] -
appsec 49.705 ms [49.266 ms, 50.143 ms] 13.653 ms (37.9%)
code_origins 43.466 ms [43.098 ms, 43.834 ms] 7.414 ms (20.6%)
iast 45.992 ms [45.58 ms, 46.404 ms] 9.941 ms (27.6%)
profiling 49.764 ms [49.294 ms, 50.234 ms] 13.713 ms (38.0%)
tracing 44.863 ms [44.484 ms, 45.242 ms] 8.811 ms (24.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.548 ms [37.253 ms, 37.842 ms] -
appsec 48.245 ms [47.836 ms, 48.655 ms] 10.698 ms (28.5%)
code_origins 44.251 ms [43.868 ms, 44.634 ms] 6.703 ms (17.9%)
iast 45.138 ms [44.75 ms, 45.525 ms] 7.59 ms (20.2%)
profiling 49.63 ms [49.129 ms, 50.13 ms] 12.082 ms (32.2%)
tracing 44.43 ms [44.058 ms, 44.803 ms] 6.883 ms (18.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/simplify-instance-store
git_commit_date 1760368047 1760385081
git_commit_sha 6dc3f85 08f91e1
release_version 1.55.0-SNAPSHOT~6dc3f85c93 1.55.0-SNAPSHOT~08f91e1dfa
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1760389087 1760389087
ci_job_id 1177123152 1177123152
ci_pipeline_id 79179676 79179676
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-p366ejo7 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-p366ejo7 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~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.471 ms) : 1459, 1482
.   : milestone, 1471,
appsec (3.658 ms) : 3444, 3873
.   : milestone, 3658,
iast (2.203 ms) : 2140, 2267
.   : milestone, 2203,
iast_GLOBAL (2.25 ms) : 2186, 2314
.   : milestone, 2250,
profiling (2.066 ms) : 2013, 2118
.   : milestone, 2066,
tracing (2.02 ms) : 1971, 2070
.   : milestone, 2020,
section candidate
no_agent (1.472 ms) : 1460, 1483
.   : milestone, 1472,
appsec (3.632 ms) : 3419, 3845
.   : milestone, 3632,
iast (2.2 ms) : 2136, 2263
.   : milestone, 2200,
iast_GLOBAL (2.252 ms) : 2187, 2316
.   : milestone, 2252,
profiling (2.047 ms) : 1996, 2099
.   : milestone, 2047,
tracing (2.025 ms) : 1976, 2075
.   : milestone, 2025,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.459 ms, 1.482 ms] -
appsec 3.658 ms [3.444 ms, 3.873 ms] 2.188 ms (148.8%)
iast 2.203 ms [2.14 ms, 2.267 ms] 732.828 µs (49.8%)
iast_GLOBAL 2.25 ms [2.186 ms, 2.314 ms] 779.436 µs (53.0%)
profiling 2.066 ms [2.013 ms, 2.118 ms] 595.054 µs (40.5%)
tracing 2.02 ms [1.971 ms, 2.07 ms] 549.7 µs (37.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.46 ms, 1.483 ms] -
appsec 3.632 ms [3.419 ms, 3.845 ms] 2.16 ms (146.8%)
iast 2.2 ms [2.136 ms, 2.263 ms] 728.06 µs (49.5%)
iast_GLOBAL 2.252 ms [2.187 ms, 2.316 ms] 780.272 µs (53.0%)
profiling 2.047 ms [1.996 ms, 2.099 ms] 575.923 µs (39.1%)
tracing 2.025 ms [1.976 ms, 2.075 ms] 553.965 µs (37.6%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~08f91e1dfa, baseline=1.55.0-SNAPSHOT~6dc3f85c93
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.959 s) : 14959000, 14959000
.   : milestone, 14959000,
appsec (15.286 s) : 15286000, 15286000
.   : milestone, 15286000,
iast (18.688 s) : 18688000, 18688000
.   : milestone, 18688000,
iast_GLOBAL (17.999 s) : 17999000, 17999000
.   : milestone, 17999000,
profiling (15.372 s) : 15372000, 15372000
.   : milestone, 15372000,
tracing (15.064 s) : 15064000, 15064000
.   : milestone, 15064000,
section candidate
no_agent (15.508 s) : 15508000, 15508000
.   : milestone, 15508000,
appsec (14.946 s) : 14946000, 14946000
.   : milestone, 14946000,
iast (18.679 s) : 18679000, 18679000
.   : milestone, 18679000,
iast_GLOBAL (17.763 s) : 17763000, 17763000
.   : milestone, 17763000,
profiling (15.427 s) : 15427000, 15427000
.   : milestone, 15427000,
tracing (15.211 s) : 15211000, 15211000
.   : milestone, 15211000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.959 s [14.959 s, 14.959 s] -
appsec 15.286 s [15.286 s, 15.286 s] 327.0 ms (2.2%)
iast 18.688 s [18.688 s, 18.688 s] 3.729 s (24.9%)
iast_GLOBAL 17.999 s [17.999 s, 17.999 s] 3.04 s (20.3%)
profiling 15.372 s [15.372 s, 15.372 s] 413.0 ms (2.8%)
tracing 15.064 s [15.064 s, 15.064 s] 105.0 ms (0.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.508 s [15.508 s, 15.508 s] -
appsec 14.946 s [14.946 s, 14.946 s] -562.0 ms (-3.6%)
iast 18.679 s [18.679 s, 18.679 s] 3.171 s (20.4%)
iast_GLOBAL 17.763 s [17.763 s, 17.763 s] 2.255 s (14.5%)
profiling 15.427 s [15.427 s, 15.427 s] -81.0 ms (-0.5%)
tracing 15.211 s [15.211 s, 15.211 s] -297.0 ms (-1.9%)

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.

❔ question: ‏The new implementation ends up looking very similar to @nikita-tkachenko-datadog ConcurrentHashMapContextStore -- the underlying map being ConcurrentHashMap instead of Collections.synchronizedMap(new HashMap<>())
Would there be a way to keep only one of them?

@mcculls
Copy link
Contributor Author

mcculls commented Oct 13, 2025

❔ question: ‏The new implementation ends up looking very similar to @nikita-tkachenko-datadog ConcurrentHashMapContextStore -- the underlying map being ConcurrentHashMap instead of Collections.synchronizedMap(new HashMap<>())
Would there be a way to keep only one of them?

They serve two different use-cases - attempting to merge them would introduce an undesirable coupling and limit how they could evolve going forwards.

@mcculls mcculls marked this pull request as ready for review October 13, 2025 13:41
@mcculls mcculls requested a review from a team as a code owner October 13, 2025 13:41
@mcculls mcculls requested review from amarziali and ygree October 13, 2025 13:41
@mcculls mcculls force-pushed the mcculls/simplify-instance-store branch from 3fea6c3 to b45eca2 Compare October 13, 2025 14:46
…hMaps

The keys used to lookup instances are always string literals, bounded in code
by a fixed number of calls. These keys are never collected, so we don't need
to use a weak map. The instance store is accessed when setting up helpers to
guarantee the same instance is used by different instrumentations sharing a
common type (via their parent class-loader.) Therefore each store just needs
basic synchronization to guarantee it only creates one instance per-key.
@mcculls mcculls force-pushed the mcculls/simplify-instance-store branch from b45eca2 to 08f91e1 Compare October 13, 2025 20:23
@mcculls mcculls merged commit 00bd02b into master Oct 14, 2025
530 checks passed
@mcculls mcculls deleted the mcculls/simplify-instance-store branch October 14, 2025 09:45
@github-actions github-actions bot added this to the 1.55.0 milestone Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants