Skip to content

Protocol v1#10801

Open
AlexeyKuznetsov-DD wants to merge 75 commits intomasterfrom
alexeyk/protocol-v1-1
Open

Protocol v1#10801
AlexeyKuznetsov-DD wants to merge 75 commits intomasterfrom
alexeyk/protocol-v1-1

Conversation

@AlexeyKuznetsov-DD
Copy link
Copy Markdown
Contributor

What Does This Do

Java implementation for protocol v1.

Motivation

Additional Notes

DO NOT MERGE, WIP.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Mar 10, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added tag: do not merge Do not merge changes comp: core Tracer core labels Mar 10, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 11, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/protocol-v1-1
git_commit_date 1776348692 1776356046
git_commit_sha 81e2294 2cb195d
release_version 1.62.0-SNAPSHOT~81e22942d7 1.61.0-SNAPSHOT~2cb195db57
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1776357814 1776357814
ci_job_id 1602428376 1602428376
ci_pipeline_id 108056740 108056740
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-ountqazv 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-ountqazv 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 63 metrics, 8 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1065526
Total [baseline] (11.152 s) : 0, 11151916
Agent [candidate] (1.06 s) : 0, 1060201
Total [candidate] (11.093 s) : 0, 11092560
section appsec
Agent [baseline] (1.25 s) : 0, 1250164
Total [baseline] (11.044 s) : 0, 11043649
Agent [candidate] (1.25 s) : 0, 1249852
Total [candidate] (11.156 s) : 0, 11156167
section iast
Agent [baseline] (1.226 s) : 0, 1225831
Total [baseline] (11.356 s) : 0, 11355610
Agent [candidate] (1.225 s) : 0, 1225146
Total [candidate] (11.349 s) : 0, 11349376
section profiling
Agent [baseline] (1.189 s) : 0, 1189176
Total [baseline] (11.076 s) : 0, 11076256
Agent [candidate] (1.184 s) : 0, 1183504
Total [candidate] (11.037 s) : 0, 11036740
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.066 s -
Agent appsec 1.25 s 184.638 ms (17.3%)
Agent iast 1.226 s 160.305 ms (15.0%)
Agent profiling 1.189 s 123.649 ms (11.6%)
Total tracing 11.152 s -
Total appsec 11.044 s -108.266 ms (-1.0%)
Total iast 11.356 s 203.695 ms (1.8%)
Total profiling 11.076 s -75.659 ms (-0.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.06 s -
Agent appsec 1.25 s 189.651 ms (17.9%)
Agent iast 1.225 s 164.945 ms (15.6%)
Agent profiling 1.184 s 123.303 ms (11.6%)
Total tracing 11.093 s -
Total appsec 11.156 s 63.607 ms (0.6%)
Total iast 11.349 s 256.815 ms (2.3%)
Total profiling 11.037 s -55.82 ms (-0.5%)
gantt
    title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.254 ms) : 0, 1254
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (638.253 ms) : 0, 638253
BytebuddyAgent [candidate] (634.43 ms) : 0, 634430
AgentMeter [baseline] (29.737 ms) : 0, 29737
AgentMeter [candidate] (29.186 ms) : 0, 29186
GlobalTracer [baseline] (249.414 ms) : 0, 249414
GlobalTracer [candidate] (248.914 ms) : 0, 248914
AppSec [baseline] (32.488 ms) : 0, 32488
AppSec [candidate] (32.418 ms) : 0, 32418
Debugger [baseline] (60.187 ms) : 0, 60187
Debugger [candidate] (60.0 ms) : 0, 60000
Remote Config [baseline] (595.747 µs) : 0, 596
Remote Config [candidate] (599.167 µs) : 0, 599
Telemetry [baseline] (8.124 ms) : 0, 8124
Telemetry [candidate] (8.214 ms) : 0, 8214
Flare Poller [baseline] (9.074 ms) : 0, 9074
Flare Poller [candidate] (8.957 ms) : 0, 8957
section appsec
crashtracking [baseline] (1.24 ms) : 0, 1240
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (663.298 ms) : 0, 663298
BytebuddyAgent [candidate] (662.161 ms) : 0, 662161
AgentMeter [baseline] (12.05 ms) : 0, 12050
AgentMeter [candidate] (12.038 ms) : 0, 12038
GlobalTracer [baseline] (248.846 ms) : 0, 248846
GlobalTracer [candidate] (248.943 ms) : 0, 248943
AppSec [baseline] (185.248 ms) : 0, 185248
AppSec [candidate] (185.333 ms) : 0, 185333
Debugger [baseline] (66.057 ms) : 0, 66057
Debugger [candidate] (66.367 ms) : 0, 66367
Remote Config [baseline] (616.719 µs) : 0, 617
Remote Config [candidate] (629.082 µs) : 0, 629
Telemetry [baseline] (8.315 ms) : 0, 8315
Telemetry [candidate] (8.596 ms) : 0, 8596
Flare Poller [baseline] (3.495 ms) : 0, 3495
Flare Poller [candidate] (3.615 ms) : 0, 3615
IAST [baseline] (24.511 ms) : 0, 24511
IAST [candidate] (24.533 ms) : 0, 24533
section iast
crashtracking [baseline] (1.232 ms) : 0, 1232
crashtracking [candidate] (1.228 ms) : 0, 1228
BytebuddyAgent [baseline] (800.456 ms) : 0, 800456
BytebuddyAgent [candidate] (799.922 ms) : 0, 799922
AgentMeter [baseline] (11.441 ms) : 0, 11441
AgentMeter [candidate] (11.503 ms) : 0, 11503
GlobalTracer [baseline] (239.301 ms) : 0, 239301
GlobalTracer [candidate] (239.598 ms) : 0, 239598
AppSec [baseline] (29.851 ms) : 0, 29851
AppSec [candidate] (29.854 ms) : 0, 29854
Debugger [baseline] (67.853 ms) : 0, 67853
Debugger [candidate] (67.067 ms) : 0, 67067
Remote Config [baseline] (554.163 µs) : 0, 554
Remote Config [candidate] (544.501 µs) : 0, 545
Telemetry [baseline] (9.488 ms) : 0, 9488
Telemetry [candidate] (9.73 ms) : 0, 9730
Flare Poller [baseline] (3.526 ms) : 0, 3526
Flare Poller [candidate] (3.527 ms) : 0, 3527
IAST [baseline] (25.862 ms) : 0, 25862
IAST [candidate] (25.887 ms) : 0, 25887
section profiling
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (694.368 ms) : 0, 694368
BytebuddyAgent [candidate] (690.735 ms) : 0, 690735
AgentMeter [baseline] (9.132 ms) : 0, 9132
AgentMeter [candidate] (9.109 ms) : 0, 9109
GlobalTracer [baseline] (207.814 ms) : 0, 207814
GlobalTracer [candidate] (207.116 ms) : 0, 207116
AppSec [baseline] (32.891 ms) : 0, 32891
AppSec [candidate] (32.669 ms) : 0, 32669
Debugger [baseline] (65.791 ms) : 0, 65791
Debugger [candidate] (65.357 ms) : 0, 65357
Remote Config [baseline] (584.748 µs) : 0, 585
Remote Config [candidate] (601.316 µs) : 0, 601
Telemetry [baseline] (7.821 ms) : 0, 7821
Telemetry [candidate] (7.787 ms) : 0, 7787
Flare Poller [baseline] (3.55 ms) : 0, 3550
Flare Poller [candidate] (3.575 ms) : 0, 3575
ProfilingAgent [baseline] (94.445 ms) : 0, 94445
ProfilingAgent [candidate] (93.78 ms) : 0, 93780
Profiling [baseline] (95.003 ms) : 0, 95003
Profiling [candidate] (94.35 ms) : 0, 94350
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.069 s) : 0, 1069184
Total [baseline] (8.869 s) : 0, 8868813
Agent [candidate] (1.059 s) : 0, 1058569
Total [candidate] (8.85 s) : 0, 8849998
section iast
Agent [baseline] (1.234 s) : 0, 1233984
Total [baseline] (9.585 s) : 0, 9584940
Agent [candidate] (1.234 s) : 0, 1234267
Total [candidate] (9.602 s) : 0, 9601736
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.069 s -
Agent iast 1.234 s 164.8 ms (15.4%)
Total tracing 8.869 s -
Total iast 9.585 s 716.127 ms (8.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent iast 1.234 s 175.698 ms (16.6%)
Total tracing 8.85 s -
Total iast 9.602 s 751.738 ms (8.5%)
gantt
    title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.249 ms) : 0, 1249
crashtracking [candidate] (1.24 ms) : 0, 1240
BytebuddyAgent [baseline] (640.401 ms) : 0, 640401
BytebuddyAgent [candidate] (633.946 ms) : 0, 633946
AgentMeter [baseline] (29.889 ms) : 0, 29889
AgentMeter [candidate] (29.243 ms) : 0, 29243
GlobalTracer [baseline] (252.049 ms) : 0, 252049
GlobalTracer [candidate] (249.12 ms) : 0, 249120
AppSec [baseline] (32.849 ms) : 0, 32849
AppSec [candidate] (32.455 ms) : 0, 32455
Debugger [baseline] (59.991 ms) : 0, 59991
Debugger [candidate] (59.114 ms) : 0, 59114
Remote Config [baseline] (604.675 µs) : 0, 605
Remote Config [candidate] (611.125 µs) : 0, 611
Telemetry [baseline] (8.148 ms) : 0, 8148
Telemetry [candidate] (8.215 ms) : 0, 8215
Flare Poller [baseline] (7.55 ms) : 0, 7550
Flare Poller [candidate] (8.293 ms) : 0, 8293
section iast
crashtracking [baseline] (1.252 ms) : 0, 1252
crashtracking [candidate] (1.251 ms) : 0, 1251
BytebuddyAgent [baseline] (808.297 ms) : 0, 808297
BytebuddyAgent [candidate] (806.812 ms) : 0, 806812
AgentMeter [baseline] (11.529 ms) : 0, 11529
AgentMeter [candidate] (11.577 ms) : 0, 11577
GlobalTracer [baseline] (240.499 ms) : 0, 240499
GlobalTracer [candidate] (241.861 ms) : 0, 241861
AppSec [baseline] (31.596 ms) : 0, 31596
AppSec [candidate] (31.798 ms) : 0, 31798
Debugger [baseline] (64.876 ms) : 0, 64876
Debugger [candidate] (64.816 ms) : 0, 64816
Remote Config [baseline] (547.515 µs) : 0, 548
Remote Config [candidate] (545.98 µs) : 0, 546
Telemetry [baseline] (9.5 ms) : 0, 9500
Telemetry [candidate] (9.399 ms) : 0, 9399
Flare Poller [baseline] (3.521 ms) : 0, 3521
Flare Poller [candidate] (3.543 ms) : 0, 3543
IAST [baseline] (25.986 ms) : 0, 25986
IAST [candidate] (26.231 ms) : 0, 26231
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/protocol-v1-1
git_commit_date 1776348692 1776356046
git_commit_sha 81e2294 2cb195d
release_version 1.62.0-SNAPSHOT~81e22942d7 1.61.0-SNAPSHOT~2cb195db57
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1776358538 1776358538
ci_job_id 1602428384 1602428384
ci_pipeline_id 108056740 108056740
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-py8106gr 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-py8106gr 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 1 performance regressions! Performance is the same for 17 metrics, 16 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:high_load worse
[+97.489µs; +169.457µs] or [+3.888%; +6.759%]
unsure
[+89.475µs; +589.525µs] or [+1.218%; +8.025%]
unstable
[-209.487op/s; +80.674op/s] or [-14.756%; +5.683%]
2.641ms 7.686ms 1355.250op/s 2.507ms 7.346ms 1419.656op/s
scenario:load:petclinic:appsec:high_load better
[-2.044ms; -1.223ms] or [-10.214%; -6.112%]
better
[-2.466ms; -1.132ms] or [-7.765%; -3.565%]
unstable
[-5.893op/s; +39.643op/s] or [-2.534%; +17.044%]
18.383ms 29.955ms 249.469op/s 20.017ms 31.754ms 232.594op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.085 ms) : 18891, 19279
.   : milestone, 19085,
appsec (20.071 ms) : 19864, 20277
.   : milestone, 20071,
code_origins (17.888 ms) : 17710, 18065
.   : milestone, 17888,
iast (17.79 ms) : 17610, 17971
.   : milestone, 17790,
profiling (18.261 ms) : 18081, 18440
.   : milestone, 18261,
tracing (17.981 ms) : 17805, 18157
.   : milestone, 17981,
section candidate
no_agent (19.087 ms) : 18898, 19277
.   : milestone, 19087,
appsec (18.707 ms) : 18519, 18895
.   : milestone, 18707,
code_origins (18.119 ms) : 17941, 18298
.   : milestone, 18119,
iast (17.772 ms) : 17594, 17949
.   : milestone, 17772,
profiling (18.295 ms) : 18116, 18475
.   : milestone, 18295,
tracing (17.979 ms) : 17800, 18157
.   : milestone, 17979,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.085 ms [18.891 ms, 19.279 ms] -
appsec 20.071 ms [19.864 ms, 20.277 ms] 985.668 µs (5.2%)
code_origins 17.888 ms [17.71 ms, 18.065 ms] -1.197 ms (-6.3%)
iast 17.79 ms [17.61 ms, 17.971 ms] -1.295 ms (-6.8%)
profiling 18.261 ms [18.081 ms, 18.44 ms] -824.284 µs (-4.3%)
tracing 17.981 ms [17.805 ms, 18.157 ms] -1.104 ms (-5.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.087 ms [18.898 ms, 19.277 ms] -
appsec 18.707 ms [18.519 ms, 18.895 ms] -380.344 µs (-2.0%)
code_origins 18.119 ms [17.941 ms, 18.298 ms] -967.897 µs (-5.1%)
iast 17.772 ms [17.594 ms, 17.949 ms] -1.316 ms (-6.9%)
profiling 18.295 ms [18.116 ms, 18.475 ms] -792.349 µs (-4.2%)
tracing 17.979 ms [17.8 ms, 18.157 ms] -1.109 ms (-5.8%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.265 ms) : 1252, 1277
.   : milestone, 1265,
iast (3.221 ms) : 3180, 3263
.   : milestone, 3221,
iast_FULL (6.044 ms) : 5983, 6106
.   : milestone, 6044,
iast_GLOBAL (3.639 ms) : 3576, 3701
.   : milestone, 3639,
profiling (2.219 ms) : 2199, 2239
.   : milestone, 2219,
tracing (1.857 ms) : 1842, 1872
.   : milestone, 1857,
section candidate
no_agent (1.248 ms) : 1236, 1260
.   : milestone, 1248,
iast (3.378 ms) : 3328, 3428
.   : milestone, 3378,
iast_FULL (6.195 ms) : 6130, 6260
.   : milestone, 6195,
iast_GLOBAL (3.727 ms) : 3666, 3788
.   : milestone, 3727,
profiling (2.22 ms) : 2200, 2240
.   : milestone, 2220,
tracing (1.882 ms) : 1864, 1900
.   : milestone, 1882,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.265 ms [1.252 ms, 1.277 ms] -
iast 3.221 ms [3.18 ms, 3.263 ms] 1.956 ms (154.7%)
iast_FULL 6.044 ms [5.983 ms, 6.106 ms] 4.78 ms (377.9%)
iast_GLOBAL 3.639 ms [3.576 ms, 3.701 ms] 2.374 ms (187.7%)
profiling 2.219 ms [2.199 ms, 2.239 ms] 954.153 µs (75.4%)
tracing 1.857 ms [1.842 ms, 1.872 ms] 591.726 µs (46.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.248 ms [1.236 ms, 1.26 ms] -
iast 3.378 ms [3.328 ms, 3.428 ms] 2.13 ms (170.7%)
iast_FULL 6.195 ms [6.13 ms, 6.26 ms] 4.947 ms (396.4%)
iast_GLOBAL 3.727 ms [3.666 ms, 3.788 ms] 2.479 ms (198.6%)
profiling 2.22 ms [2.2 ms, 2.24 ms] 971.994 µs (77.9%)
tracing 1.882 ms [1.864 ms, 1.9 ms] 634.377 µs (50.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/protocol-v1-1
git_commit_date 1776348692 1776356046
git_commit_sha 81e2294 2cb195d
release_version 1.62.0-SNAPSHOT~81e22942d7 1.61.0-SNAPSHOT~2cb195db57
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1776358026 1776358026
ci_job_id 1602428390 1602428390
ci_pipeline_id 108056740 108056740
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-zpf68noa 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-zpf68noa 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 1 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 1 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:dacapo:tomcat:appsec better
[-1.458ms; -1.109ms] or [-38.134%; -29.012%]
2.540ms 3.824ms
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.2 s) : 15200000, 15200000
.   : milestone, 15200000,
appsec (14.714 s) : 14714000, 14714000
.   : milestone, 14714000,
iast (18.729 s) : 18729000, 18729000
.   : milestone, 18729000,
iast_GLOBAL (18.208 s) : 18208000, 18208000
.   : milestone, 18208000,
profiling (15.144 s) : 15144000, 15144000
.   : milestone, 15144000,
tracing (14.909 s) : 14909000, 14909000
.   : milestone, 14909000,
section candidate
no_agent (15.292 s) : 15292000, 15292000
.   : milestone, 15292000,
appsec (14.926 s) : 14926000, 14926000
.   : milestone, 14926000,
iast (18.338 s) : 18338000, 18338000
.   : milestone, 18338000,
iast_GLOBAL (17.931 s) : 17931000, 17931000
.   : milestone, 17931000,
profiling (15.212 s) : 15212000, 15212000
.   : milestone, 15212000,
tracing (14.932 s) : 14932000, 14932000
.   : milestone, 14932000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.2 s [15.2 s, 15.2 s] -
appsec 14.714 s [14.714 s, 14.714 s] -486.0 ms (-3.2%)
iast 18.729 s [18.729 s, 18.729 s] 3.529 s (23.2%)
iast_GLOBAL 18.208 s [18.208 s, 18.208 s] 3.008 s (19.8%)
profiling 15.144 s [15.144 s, 15.144 s] -56.0 ms (-0.4%)
tracing 14.909 s [14.909 s, 14.909 s] -291.0 ms (-1.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.292 s [15.292 s, 15.292 s] -
appsec 14.926 s [14.926 s, 14.926 s] -366.0 ms (-2.4%)
iast 18.338 s [18.338 s, 18.338 s] 3.046 s (19.9%)
iast_GLOBAL 17.931 s [17.931 s, 17.931 s] 2.639 s (17.3%)
profiling 15.212 s [15.212 s, 15.212 s] -80.0 ms (-0.5%)
tracing 14.932 s [14.932 s, 14.932 s] -360.0 ms (-2.4%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~2cb195db57, baseline=1.62.0-SNAPSHOT~81e22942d7
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.491 ms) : 1480, 1503
.   : milestone, 1491,
appsec (3.824 ms) : 3601, 4046
.   : milestone, 3824,
iast (2.289 ms) : 2219, 2359
.   : milestone, 2289,
iast_GLOBAL (2.323 ms) : 2253, 2393
.   : milestone, 2323,
profiling (2.539 ms) : 2375, 2704
.   : milestone, 2539,
tracing (2.089 ms) : 2035, 2144
.   : milestone, 2089,
section candidate
no_agent (1.491 ms) : 1479, 1502
.   : milestone, 1491,
appsec (2.54 ms) : 2485, 2595
.   : milestone, 2540,
iast (2.278 ms) : 2208, 2348
.   : milestone, 2278,
iast_GLOBAL (2.333 ms) : 2263, 2403
.   : milestone, 2333,
profiling (2.122 ms) : 2066, 2178
.   : milestone, 2122,
tracing (2.086 ms) : 2032, 2140
.   : milestone, 2086,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.491 ms [1.48 ms, 1.503 ms] -
appsec 3.824 ms [3.601 ms, 4.046 ms] 2.332 ms (156.4%)
iast 2.289 ms [2.219 ms, 2.359 ms] 797.76 µs (53.5%)
iast_GLOBAL 2.323 ms [2.253 ms, 2.393 ms] 831.508 µs (55.8%)
profiling 2.539 ms [2.375 ms, 2.704 ms] 1.048 ms (70.3%)
tracing 2.089 ms [2.035 ms, 2.144 ms] 598.011 µs (40.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.491 ms [1.479 ms, 1.502 ms] -
appsec 2.54 ms [2.485 ms, 2.595 ms] 1.049 ms (70.4%)
iast 2.278 ms [2.208 ms, 2.348 ms] 787.439 µs (52.8%)
iast_GLOBAL 2.333 ms [2.263 ms, 2.403 ms] 842.734 µs (56.5%)
profiling 2.122 ms [2.066 ms, 2.178 ms] 631.533 µs (42.4%)
tracing 2.086 ms [2.032 ms, 2.14 ms] 595.567 µs (40.0%)

# Conflicts:
#	dd-trace-core/src/main/java/datadog/trace/core/DDSpan.java
#	dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
@github-actions
Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

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

If you need help, please check our contributing guidelines.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

⚠️ New Groovy Test Files Added

The following files add Groovy tests to modules that are candidates for migration to Java / JUnit 5:

  • dd-trace-core/src/test/groovy/datadog/trace/common/writer/ddagent/TraceMapperV1PayloadTest.groovy (module: dd-trace-core)

Consider writing these tests in Java / JUnit 5 instead to help with the ongoing migration effort.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added the type: enhancement Enhancements and improvements label Mar 31, 2026
@dougqh
Copy link
Copy Markdown
Contributor

dougqh commented Apr 13, 2026

Besides just reviewing the code, I wanted to see how this change impacts our overhead.
Overall, the results are quite good...

  • throughput is mostly unchanged -- maybe slightly better in intermediate heap sizes
  • allocation is up, but only slightly -- this looks be from UTF-8 byte[] which can be solved with a bit of caching

I suspect throughput will improve once this branch is synchronized with master.
And we can easily add the caching later, since this protocol uses a de-duplicated string table, the increase is only 1%.

The cache will just help a little more by de-duplicating across payloads.

@AlexeyKuznetsov-DD
Copy link
Copy Markdown
Contributor Author

Besides just reviewing the code, I wanted to see how this change impacts our overhead. Overall, the results are quite good...

  • throughput is mostly unchanged -- maybe slightly better in intermediate heap sizes
  • allocation is up, but only slightly -- this looks be from UTF-8 byte[] which can be solved with a bit of caching

I suspect throughput will improve once this branch is synchronized with master. And we can easily add the caching later, since this protocol uses a de-duplicated string table, the increase is only 1%.

The cache will just help a little more by de-duplicating across payloads.

Yep, totally agree on caching, we can improve in follow up PRs.
PR is already too big, so I would prefer to merge it if there no obvious issues and continue to work in smaller PRs.
Thanks for feedback!

Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

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

I have mostly left small comments that I've put throughout. Nothing critical in my view.
I do think getting one more review from someone familiar with the core would be good.

Comment thread dd-trace-api/src/main/java/datadog/trace/api/ProtocolVersion.java
if (DDTags.SPAN_EVENTS.equals(entry.tag())) {
continue;
}
writeFlattenedTagAttribute(writable, entry.tag(), entry.objectValue());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd like to try to avoid boxing primitives here.

I think making a variant of writeFlattenedTagAttribute that takes writable, entryReader might make sense.

Then we check if the TagMap.EntryReader is holding a primitive before calling objectValue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Refactored.

static final int SPAN_KIND_CONSUMER = 5;

// Decision maker tag key
private static final String KEY_DECISION_MAKER = "_dd.p.dm";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably want to use Utf8BytesString for these. It caches the UTF8 representation, so we don't keep paying the encoding cost.

Admittedly, I didn't double check where KEY_DECISION_MAKER is used, so I'll let you make the final decision on that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I double checked the code and I can see that KEY_DECISION_MAKER used for lookup only, so not sure how UTF8 can be applied here. I think the we can do one more round of optimizations for UTF8 cached values in follow up PRs, but probably v1 should be good as-is as it is maintaining string table with all unique strings already, that can be considered as a cache already.

writable.writeInt(fieldId);
writable.startArray(spansCount);

for (int i = 0; i < spansCount; i++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the c-style for loop, so we can access the index?
As an alternative, we could use a ListIterator.

I've typically found Iterators to be better than c-style for loops, but I'll admit it can be situational. We probably just need to benchmark with v1 and see.

I can share my stress test if you like.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Refactored.

Comment thread dd-trace-core/src/main/java/datadog/trace/core/DDSpan.java Outdated
Comment thread dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
Comment thread dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java
Comment thread dd-trace-core/src/main/java/datadog/trace/core/Metadata.java Outdated
Comment thread dd-trace-core/src/main/java/datadog/trace/core/CoreSpan.java
/**
* @return High-order and low-order bits as bytes array.
*/
public byte[] to128BitBytes() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On second look (along with Claude), I wonder if this is the source of the extra byte[] allocation.
I'd thought about whether we could optimize this, but stopped short of proposing doing so previously.
NOTE: I'm also fine with doing this optimization later.

But this is the approach Claude proposed...

  1. DDTraceId.to128BitBytes() allocates two objects per span and per link — DDTraceId.java:105-113
    ByteBuffer buffer = ByteBuffer.allocate(16);
    buffer.putLong(toHighOrderLong());
    buffer.putLong(toLong());
    return buffer.array();
    Called once per span (TraceMapperV1.java:1264) and once per span link (:1351). The ByteBuffer wrapper is overhead — ByteBuffer.allocate allocates both the
    buffer object and the backing byte[]. The returned byte[] is then handed to writable.writeBinary(bytes) and discarded. Two better options:
  • Use byte[] bytes = new byte[16]; ByteBuffer.wrap(bytes).putLong(hi).putLong(lo); return bytes; — halves allocation.
  • Better: add Writable.writeBinaryTraceId(long hi, long lo) so the mapper writes 16 bytes directly into the existing target buffer with zero allocation.

Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

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

One other performance suggestion from Claude...

  1. StringTable lookups force String materialization and Integer boxing — TraceMapperV1.java:1695-1706, :1832-1866
    Every tag name, tag value, service name, operation name, resource, component, etc. goes through:
    String str = value == null ? "" : value.toString();
    Integer index = stringTable.get(str);
    Two issues:
  • value.toString() allocates a new String for every UTF8BytesString / non-String CharSequence. Given V1 is a streaming string table design intended to amortize
    string cost, this re-materializes on every lookup and defeats part of the win.
  • HashMap<String,Integer>.get() autoboxes the returned index.

Consider a CharSequence-keyed open-addressed primitive int map (dd-trace already has UTF8ByteStringMap-like structures; verify). Even dropping to Eclipse
Collections' ObjectIntHashMap gets rid of boxing.

I'm guess StringTable is pre-existing. I agree with Claude that it would be nice to reduce the allocation especially the boxing.

But again, I'm fine with leaving this to a later PR.

Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I added a couple comments based on asking Claude to do a perf review.
I do think optimizing might the ID to byte conversion would be good.
I suspect that is where some (most?) of the extra 2GiB of byte[] were coming from.

But I'm fine with doing that in a separate pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: do not merge Do not merge changes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants