Skip to content

Move JSON generation to sender thread to improve startup time. #9197

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AlexeyKuznetsov-DD
Copy link
Contributor

What Does This Do

Move JSON generation to sender thread to improve startup time.

Motivation

Improve agent startup time by offloading JSON generation to separate thread.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Jul 17, 2025
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: enhancement Enhancements and improvements comp: core Tracer core labels Jul 17, 2025
@pr-commenter
Copy link

pr-commenter bot commented Jul 17, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/move-json-to-thread
git_commit_date 1753128983 1753130431
git_commit_sha e82c8b5 7dc3e05
release_version 1.52.0-SNAPSHOT~e82c8b5e17 1.52.0-SNAPSHOT~7dc3e05f7a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1753132107 1753132107
ci_job_id 1039945239 1039945239
ci_pipeline_id 71243791 71243791
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-862m8hwt 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-862m8hwt 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 49 metrics, 10 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.038 s) : 0, 1038001
Total [baseline] (8.615 s) : 0, 8615368
Agent [candidate] (1.039 s) : 0, 1038858
Total [candidate] (8.637 s) : 0, 8637324
section iast
Agent [baseline] (1.174 s) : 0, 1173955
Total [baseline] (9.279 s) : 0, 9279009
Agent [candidate] (1.179 s) : 0, 1179099
Total [candidate] (9.286 s) : 0, 9286186
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.038 s -
Agent iast 1.174 s 135.954 ms (13.1%)
Total tracing 8.615 s -
Total iast 9.279 s 663.641 ms (7.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.039 s -
Agent iast 1.179 s 140.241 ms (13.5%)
Total tracing 8.637 s -
Total iast 9.286 s 648.861 ms (7.5%)
gantt
    title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.435 ms) : 0, 1435
crashtracking [candidate] (1.43 ms) : 0, 1430
BytebuddyAgent [baseline] (729.181 ms) : 0, 729181
BytebuddyAgent [candidate] (729.296 ms) : 0, 729296
GlobalTracer [baseline] (241.084 ms) : 0, 241084
GlobalTracer [candidate] (241.965 ms) : 0, 241965
AppSec [baseline] (30.441 ms) : 0, 30441
AppSec [candidate] (30.309 ms) : 0, 30309
Debugger [baseline] (6.007 ms) : 0, 6007
Debugger [candidate] (5.999 ms) : 0, 5999
Remote Config [baseline] (648.291 µs) : 0, 648
Remote Config [candidate] (641.249 µs) : 0, 641
Telemetry [baseline] (8.216 ms) : 0, 8216
Telemetry [candidate] (8.235 ms) : 0, 8235
section iast
crashtracking [baseline] (1.441 ms) : 0, 1441
crashtracking [candidate] (1.446 ms) : 0, 1446
BytebuddyAgent [baseline] (848.301 ms) : 0, 848301
BytebuddyAgent [candidate] (852.959 ms) : 0, 852959
GlobalTracer [baseline] (231.077 ms) : 0, 231077
GlobalTracer [candidate] (231.296 ms) : 0, 231296
IAST [baseline] (31.48 ms) : 0, 31480
IAST [candidate] (29.926 ms) : 0, 29926
AppSec [baseline] (25.665 ms) : 0, 25665
AppSec [candidate] (27.292 ms) : 0, 27292
Debugger [baseline] (6.61 ms) : 0, 6610
Debugger [candidate] (6.627 ms) : 0, 6627
Remote Config [baseline] (589.402 µs) : 0, 589
Remote Config [candidate] (585.728 µs) : 0, 586
Telemetry [baseline] (7.808 ms) : 0, 7808
Telemetry [candidate] (7.972 ms) : 0, 7972
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1044757
Total [baseline] (10.745 s) : 0, 10744743
Agent [candidate] (1.037 s) : 0, 1037151
Total [candidate] (10.721 s) : 0, 10720682
section appsec
Agent [baseline] (1.228 s) : 0, 1227799
Total [baseline] (10.824 s) : 0, 10824118
Agent [candidate] (1.222 s) : 0, 1222494
Total [candidate] (10.749 s) : 0, 10749396
section iast
Agent [baseline] (1.18 s) : 0, 1180112
Total [baseline] (10.919 s) : 0, 10918878
Agent [candidate] (1.17 s) : 0, 1170451
Total [candidate] (10.876 s) : 0, 10875767
section profiling
Agent [baseline] (1.191 s) : 0, 1191290
Total [baseline] (10.821 s) : 0, 10821410
Agent [candidate] (1.193 s) : 0, 1192713
Total [candidate] (10.885 s) : 0, 10885146
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.045 s -
Agent appsec 1.228 s 183.043 ms (17.5%)
Agent iast 1.18 s 135.356 ms (13.0%)
Agent profiling 1.191 s 146.534 ms (14.0%)
Total tracing 10.745 s -
Total appsec 10.824 s 79.374 ms (0.7%)
Total iast 10.919 s 174.135 ms (1.6%)
Total profiling 10.821 s 76.667 ms (0.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.037 s -
Agent appsec 1.222 s 185.342 ms (17.9%)
Agent iast 1.17 s 133.299 ms (12.9%)
Agent profiling 1.193 s 155.562 ms (15.0%)
Total tracing 10.721 s -
Total appsec 10.749 s 28.714 ms (0.3%)
Total iast 10.876 s 155.085 ms (1.4%)
Total profiling 10.885 s 164.464 ms (1.5%)
gantt
    title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.444 ms) : 0, 1444
crashtracking [candidate] (1.427 ms) : 0, 1427
BytebuddyAgent [baseline] (735.158 ms) : 0, 735158
BytebuddyAgent [candidate] (728.337 ms) : 0, 728337
GlobalTracer [baseline] (241.502 ms) : 0, 241502
GlobalTracer [candidate] (241.154 ms) : 0, 241154
AppSec [baseline] (30.563 ms) : 0, 30563
AppSec [candidate] (30.384 ms) : 0, 30384
Debugger [baseline] (6.046 ms) : 0, 6046
Debugger [candidate] (6.025 ms) : 0, 6025
Remote Config [baseline] (650.432 µs) : 0, 650
Remote Config [candidate] (643.191 µs) : 0, 643
Telemetry [baseline] (8.257 ms) : 0, 8257
Telemetry [candidate] (8.204 ms) : 0, 8204
section appsec
crashtracking [baseline] (1.453 ms) : 0, 1453
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (758.103 ms) : 0, 758103
BytebuddyAgent [candidate] (754.732 ms) : 0, 754732
GlobalTracer [baseline] (236.185 ms) : 0, 236185
GlobalTracer [candidate] (235.422 ms) : 0, 235422
IAST [baseline] (23.895 ms) : 0, 23895
IAST [candidate] (23.795 ms) : 0, 23795
AppSec [baseline] (169.812 ms) : 0, 169812
AppSec [candidate] (170.655 ms) : 0, 170655
Debugger [baseline] (8.012 ms) : 0, 8012
Debugger [candidate] (5.621 ms) : 0, 5621
Remote Config [baseline] (617.834 µs) : 0, 618
Remote Config [candidate] (602.821 µs) : 0, 603
Telemetry [baseline] (8.283 ms) : 0, 8283
Telemetry [candidate] (8.869 ms) : 0, 8869
section iast
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.426 ms) : 0, 1426
BytebuddyAgent [baseline] (852.3 ms) : 0, 852300
BytebuddyAgent [candidate] (844.574 ms) : 0, 844574
GlobalTracer [baseline] (232.5 ms) : 0, 232500
GlobalTracer [candidate] (231.084 ms) : 0, 231084
IAST [baseline] (29.946 ms) : 0, 29946
IAST [candidate] (28.482 ms) : 0, 28482
AppSec [baseline] (27.599 ms) : 0, 27599
AppSec [candidate] (28.003 ms) : 0, 28003
Debugger [baseline] (6.712 ms) : 0, 6712
Debugger [candidate] (7.496 ms) : 0, 7496
Remote Config [baseline] (610.727 µs) : 0, 611
Remote Config [candidate] (584.983 µs) : 0, 585
Telemetry [baseline] (7.942 ms) : 0, 7942
Telemetry [candidate] (7.923 ms) : 0, 7923
section profiling
crashtracking [baseline] (1.408 ms) : 0, 1408
crashtracking [candidate] (1.405 ms) : 0, 1405
BytebuddyAgent [baseline] (763.978 ms) : 0, 763978
BytebuddyAgent [candidate] (764.495 ms) : 0, 764495
GlobalTracer [baseline] (221.955 ms) : 0, 221955
GlobalTracer [candidate] (221.763 ms) : 0, 221763
AppSec [baseline] (30.394 ms) : 0, 30394
AppSec [candidate] (30.502 ms) : 0, 30502
Debugger [baseline] (6.319 ms) : 0, 6319
Debugger [candidate] (6.348 ms) : 0, 6348
Remote Config [baseline] (695.312 µs) : 0, 695
Remote Config [candidate] (673.091 µs) : 0, 673
Telemetry [baseline] (12.619 ms) : 0, 12619
Telemetry [candidate] (11.887 ms) : 0, 11887
ProfilingAgent [baseline] (105.219 ms) : 0, 105219
ProfilingAgent [candidate] (106.811 ms) : 0, 106811
Profiling [baseline] (105.242 ms) : 0, 105242
Profiling [candidate] (106.835 ms) : 0, 106835
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/move-json-to-thread
git_commit_date 1753128983 1753130431
git_commit_sha e82c8b5 7dc3e05
release_version 1.52.0-SNAPSHOT~e82c8b5e17 1.52.0-SNAPSHOT~7dc3e05f7a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1753131780 1753131780
ci_job_id 1039945241 1039945241
ci_pipeline_id 71243791 71243791
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-0em91aut 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-0em91aut 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 2 performance regressions! Performance is the same for 10 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.876µs; +534.976µs] or [+2.220%; +5.827%]
unstable
[-77.308op/s; +38.495op/s] or [-15.293%; +7.615%]
9.551ms 486.094op/s 9.182ms 505.500op/s
scenario:load:petclinic:no_agent:high_load worse
[+1.032ms; +1.682ms] or [+2.791%; +4.551%]
unstable
[-12.978op/s; +4.028op/s] or [-10.262%; +3.185%]
38.320ms 122.000op/s 36.963ms 126.475op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17
    dateFormat X
    axisFormat %s
section baseline
no_agent (36.963 ms) : 36666, 37261
.   : milestone, 36963,
appsec (48.03 ms) : 47605, 48454
.   : milestone, 48030,
code_origins (45.098 ms) : 44700, 45497
.   : milestone, 45098,
iast (45.605 ms) : 45205, 46005
.   : milestone, 45605,
profiling (49.131 ms) : 48683, 49579
.   : milestone, 49131,
tracing (44.554 ms) : 44170, 44939
.   : milestone, 44554,
section candidate
no_agent (38.32 ms) : 38013, 38627
.   : milestone, 38320,
appsec (47.859 ms) : 47443, 48275
.   : milestone, 47859,
code_origins (44.659 ms) : 44258, 45059
.   : milestone, 44659,
iast (45.288 ms) : 44899, 45678
.   : milestone, 45288,
profiling (49.358 ms) : 48918, 49798
.   : milestone, 49358,
tracing (44.954 ms) : 44590, 45318
.   : milestone, 44954,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.963 ms [36.666 ms, 37.261 ms] -
appsec 48.03 ms [47.605 ms, 48.454 ms] 11.066 ms (29.9%)
code_origins 45.098 ms [44.7 ms, 45.497 ms] 8.135 ms (22.0%)
iast 45.605 ms [45.205 ms, 46.005 ms] 8.641 ms (23.4%)
profiling 49.131 ms [48.683 ms, 49.579 ms] 12.168 ms (32.9%)
tracing 44.554 ms [44.17 ms, 44.939 ms] 7.591 ms (20.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 38.32 ms [38.013 ms, 38.627 ms] -
appsec 47.859 ms [47.443 ms, 48.275 ms] 9.538 ms (24.9%)
code_origins 44.659 ms [44.258 ms, 45.059 ms] 6.338 ms (16.5%)
iast 45.288 ms [44.899 ms, 45.678 ms] 6.968 ms (18.2%)
profiling 49.358 ms [48.918 ms, 49.798 ms] 11.038 ms (28.8%)
tracing 44.954 ms [44.59 ms, 45.318 ms] 6.634 ms (17.3%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.303 ms) : 4254, 4351
.   : milestone, 4303,
iast (9.182 ms) : 9033, 9331
.   : milestone, 9182,
iast_FULL (14.052 ms) : 13772, 14333
.   : milestone, 14052,
iast_GLOBAL (9.995 ms) : 9808, 10181
.   : milestone, 9995,
profiling (8.814 ms) : 8672, 8955
.   : milestone, 8814,
tracing (7.535 ms) : 7420, 7649
.   : milestone, 7535,
section candidate
no_agent (4.162 ms) : 4108, 4215
.   : milestone, 4162,
iast (9.551 ms) : 9393, 9710
.   : milestone, 9551,
iast_FULL (14.157 ms) : 13877, 14438
.   : milestone, 14157,
iast_GLOBAL (10.256 ms) : 10073, 10439
.   : milestone, 10256,
profiling (8.836 ms) : 8691, 8981
.   : milestone, 8836,
tracing (7.468 ms) : 7358, 7578
.   : milestone, 7468,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.303 ms [4.254 ms, 4.351 ms] -
iast 9.182 ms [9.033 ms, 9.331 ms] 4.879 ms (113.4%)
iast_FULL 14.052 ms [13.772 ms, 14.333 ms] 9.75 ms (226.6%)
iast_GLOBAL 9.995 ms [9.808 ms, 10.181 ms] 5.692 ms (132.3%)
profiling 8.814 ms [8.672 ms, 8.955 ms] 4.511 ms (104.8%)
tracing 7.535 ms [7.42 ms, 7.649 ms] 3.232 ms (75.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.162 ms [4.108 ms, 4.215 ms] -
iast 9.551 ms [9.393 ms, 9.71 ms] 5.389 ms (129.5%)
iast_FULL 14.157 ms [13.877 ms, 14.438 ms] 9.995 ms (240.2%)
iast_GLOBAL 10.256 ms [10.073 ms, 10.439 ms] 6.094 ms (146.4%)
profiling 8.836 ms [8.691 ms, 8.981 ms] 4.674 ms (112.3%)
tracing 7.468 ms [7.358 ms, 7.578 ms] 3.306 ms (79.4%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master alexeyk/move-json-to-thread
git_commit_date 1753128983 1753130431
git_commit_sha e82c8b5 7dc3e05
release_version 1.52.0-SNAPSHOT~e82c8b5e17 1.52.0-SNAPSHOT~7dc3e05f7a
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1753132239 1753132239
ci_job_id 1039945243 1039945243
ci_pipeline_id 71243791 71243791
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-xz2rudo3 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-xz2rudo3 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 biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.079 s) : 15079000, 15079000
.   : milestone, 15079000,
appsec (14.809 s) : 14809000, 14809000
.   : milestone, 14809000,
iast (18.296 s) : 18296000, 18296000
.   : milestone, 18296000,
iast_GLOBAL (18.321 s) : 18321000, 18321000
.   : milestone, 18321000,
profiling (15.31 s) : 15310000, 15310000
.   : milestone, 15310000,
tracing (14.871 s) : 14871000, 14871000
.   : milestone, 14871000,
section candidate
no_agent (15.285 s) : 15285000, 15285000
.   : milestone, 15285000,
appsec (14.796 s) : 14796000, 14796000
.   : milestone, 14796000,
iast (18.624 s) : 18624000, 18624000
.   : milestone, 18624000,
iast_GLOBAL (17.833 s) : 17833000, 17833000
.   : milestone, 17833000,
profiling (15.427 s) : 15427000, 15427000
.   : milestone, 15427000,
tracing (14.805 s) : 14805000, 14805000
.   : milestone, 14805000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.079 s [15.079 s, 15.079 s] -
appsec 14.809 s [14.809 s, 14.809 s] -270.0 ms (-1.8%)
iast 18.296 s [18.296 s, 18.296 s] 3.217 s (21.3%)
iast_GLOBAL 18.321 s [18.321 s, 18.321 s] 3.242 s (21.5%)
profiling 15.31 s [15.31 s, 15.31 s] 231.0 ms (1.5%)
tracing 14.871 s [14.871 s, 14.871 s] -208.0 ms (-1.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.285 s [15.285 s, 15.285 s] -
appsec 14.796 s [14.796 s, 14.796 s] -489.0 ms (-3.2%)
iast 18.624 s [18.624 s, 18.624 s] 3.339 s (21.8%)
iast_GLOBAL 17.833 s [17.833 s, 17.833 s] 2.548 s (16.7%)
profiling 15.427 s [15.427 s, 15.427 s] 142.0 ms (0.9%)
tracing 14.805 s [14.805 s, 14.805 s] -480.0 ms (-3.1%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~7dc3e05f7a, baseline=1.52.0-SNAPSHOT~e82c8b5e17
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.485 ms) : 1474, 1497
.   : milestone, 1485,
appsec (3.674 ms) : 3455, 3892
.   : milestone, 3674,
iast (2.213 ms) : 2150, 2275
.   : milestone, 2213,
iast_GLOBAL (2.264 ms) : 2200, 2327
.   : milestone, 2264,
profiling (2.055 ms) : 2004, 2105
.   : milestone, 2055,
tracing (2.027 ms) : 1978, 2075
.   : milestone, 2027,
section candidate
no_agent (1.489 ms) : 1477, 1501
.   : milestone, 1489,
appsec (3.618 ms) : 3404, 3831
.   : milestone, 3618,
iast (2.212 ms) : 2149, 2275
.   : milestone, 2212,
iast_GLOBAL (2.258 ms) : 2195, 2321
.   : milestone, 2258,
profiling (2.041 ms) : 1991, 2091
.   : milestone, 2041,
tracing (2.025 ms) : 1977, 2074
.   : milestone, 2025,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.485 ms [1.474 ms, 1.497 ms] -
appsec 3.674 ms [3.455 ms, 3.892 ms] 2.188 ms (147.3%)
iast 2.213 ms [2.15 ms, 2.275 ms] 727.24 µs (49.0%)
iast_GLOBAL 2.264 ms [2.2 ms, 2.327 ms] 778.311 µs (52.4%)
profiling 2.055 ms [2.004 ms, 2.105 ms] 569.154 µs (38.3%)
tracing 2.027 ms [1.978 ms, 2.075 ms] 541.369 µs (36.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.489 ms [1.477 ms, 1.501 ms] -
appsec 3.618 ms [3.404 ms, 3.831 ms] 2.129 ms (143.0%)
iast 2.212 ms [2.149 ms, 2.275 ms] 722.934 µs (48.5%)
iast_GLOBAL 2.258 ms [2.195 ms, 2.321 ms] 768.916 µs (51.6%)
profiling 2.041 ms [1.991 ms, 2.091 ms] 551.927 µs (37.1%)
tracing 2.025 ms [1.977 ms, 2.074 ms] 535.939 µs (36.0%)

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD marked this pull request as ready for review July 17, 2025 21:03
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested a review from a team as a code owner July 17, 2025 21:03
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.

Good improvement idea!
I left minor comments. I also wonder if we should start creating a dedicated class for meta and points and enjoy it to create a dedicated setResult() and toJson() method.

this.points = new LinkedHashMap<>();

setMetaInfo("success", "success", "Successfully configured ddtrace package");
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting improvement about storing result state in directly in meta rather using duplicate flag.

nitpick: Renaming setMetaInfo to setResultMeta would help to understand readers that result will be overridden later on error.

}

private void onPoint(String name, List<String> tags) {
private void onPoint(String name, String... tags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what's best here 🤷
Varargs will create an implicit array, that Arrays.asList will project as list. While the original code only do projection using Collections.singletonList() without allocating an array for single value.

That's minimal change, not in the hot path. One thing I wonder if we use varargs, we might update meta to List<String, String[]> to avoid projecting as list. But in the meantime, you now have to convert causes from List<String> to String[](that later then wrapped withArrays.asList()` 🤔

@AlexeyKuznetsov-DD
Copy link
Contributor Author

Good improvement idea! I left minor comments. I also wonder if we should start creating a dedicated class for meta and points and enjoy it to create a dedicated setResult() and toJson() method.

Yes, I have the same feeling. Will work on this idea.

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.

2 participants