Skip to content
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

Add pending traces to tracer flare #8053

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft

Conversation

mhlidd
Copy link
Contributor

@mhlidd mhlidd commented Dec 4, 2024

What Does This Do

Motivation

Additional Notes

Contributor Checklist

Jira ticket: APMAPI-906

@pr-commenter
Copy link

pr-commenter bot commented Dec 4, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/pending_traces
git_commit_date 1737020324 1737020273
git_commit_sha 148aef9 e6ad777
release_version 1.46.0-SNAPSHOT~148aef92ab 1.45.0-SNAPSHOT~e6ad777dc5
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737022650 1737022650
ci_job_id 768585946 768585946
ci_pipeline_id 53158813 53158813
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

Found 11 performance improvements and 14 performance regressions! Performance is the same for 31 metrics, 7 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:Agent.start worse
[+34.427ms; +41.837ms] or [+2.907%; +3.533%]
1.222s 1.184s
scenario:startup:insecure-bank:iast:GlobalTracer worse
[+60.001ms; +61.771ms] or [+24.294%; +25.011%]
307.864ms 246.978ms
scenario:startup:insecure-bank:iast:Remote Config better
[-77.114µs; -40.195µs] or [-11.424%; -5.955%]
616.352µs 675.006µs
scenario:startup:insecure-bank:iast:Telemetry better
[-1.481ms; -1.217ms] or [-16.756%; -13.769%]
7.487ms 8.836ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:GlobalTracer worse
[+56.557ms; +62.757ms] or [+22.769%; +25.265%]
308.048ms 248.391ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Remote Config better
[-78.231µs; -25.841µs] or [-11.738%; -3.877%]
614.455µs 666.490µs
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Telemetry better
[-1.641ms; -1.102ms] or [-18.527%; -12.445%]
7.485ms 8.856ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:GlobalTracer worse
[+59.703ms; +61.145ms] or [+24.173%; +24.757%]
307.402ms 246.978ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Telemetry better
[-1.297ms; -1.102ms] or [-15.071%; -12.808%]
7.407ms 8.606ms
scenario:startup:insecure-bank:tracing:Agent.start worse
[+29.725ms; +38.820ms] or [+2.811%; +3.671%]
1.092s 1.057s
scenario:startup:insecure-bank:tracing:BytebuddyAgent better
[-21.935ms; -16.310ms] or [-3.069%; -2.282%]
695.621ms 714.744ms
scenario:startup:insecure-bank:tracing:GlobalTracer worse
[+61.817ms; +64.477ms] or [+24.156%; +25.196%]
319.050ms 255.903ms
scenario:startup:insecure-bank:tracing:Remote Config better
[-53.165µs; -22.340µs] or [-7.407%; -3.112%]
680.006µs 717.758µs
scenario:startup:petclinic:appsec:Agent.start worse
[+35.792ms; +58.840ms] or [+3.010%; +4.948%]
1.237s 1.189s
scenario:startup:petclinic:appsec:GlobalTracer worse
[+61.542ms; +69.094ms] or [+24.315%; +27.299%]
318.416ms 253.098ms
scenario:startup:petclinic:iast:Agent.start worse
[+34.348ms; +42.779ms] or [+2.898%; +3.610%]
1.224s 1.185s
scenario:startup:petclinic:iast:GlobalTracer worse
[+59.988ms; +62.171ms] or [+24.277%; +25.160%]
308.182ms 247.103ms
scenario:startup:petclinic:iast:Remote Config better
[-81.293µs; -41.041µs] or [-11.862%; -5.989%]
624.134µs 685.301µs
scenario:startup:petclinic:iast:Telemetry better
[-1.641ms; -1.208ms] or [-18.501%; -13.619%]
7.447ms 8.872ms
scenario:startup:petclinic:profiling:Agent.start worse
[+38.858ms; +80.302ms] or [+3.073%; +6.350%]
1.324s 1.265s
scenario:startup:petclinic:profiling:GlobalTracer worse
[+78.305ms; +91.592ms] or [+22.319%; +26.106%]
435.796ms 350.848ms
scenario:startup:petclinic:profiling:Telemetry better
[-1.469ms; -1.040ms] or [-16.317%; -11.549%]
7.747ms 9.001ms
scenario:startup:petclinic:tracing:Agent.start worse
[+40.874ms; +47.964ms] or [+3.879%; +4.552%]
1.098s 1.054s
scenario:startup:petclinic:tracing:GlobalTracer worse
[+63.698ms; +65.473ms] or [+24.962%; +25.657%]
319.768ms 255.183ms
scenario:startup:petclinic:tracing:Remote Config better
[-61.095µs; -18.565µs] or [-8.404%; -2.554%]
687.142µs 726.973µs
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1053643
Total [baseline] (10.432 s) : 0, 10431520
Agent [candidate] (1.098 s) : 0, 1098062
Total [candidate] (10.439 s) : 0, 10438897
section appsec
Agent [baseline] (1.189 s) : 0, 1189224
Total [baseline] (10.702 s) : 0, 10702024
Agent [candidate] (1.237 s) : 0, 1236540
Total [candidate] (10.729 s) : 0, 10729477
section iast
Agent [baseline] (1.185 s) : 0, 1185183
Total [baseline] (10.969 s) : 0, 10968584
Agent [candidate] (1.224 s) : 0, 1223747
Total [candidate] (10.985 s) : 0, 10985166
section profiling
Agent [baseline] (1.265 s) : 0, 1264559
Total [baseline] (10.882 s) : 0, 10881718
Agent [candidate] (1.324 s) : 0, 1324139
Total [candidate] (10.869 s) : 0, 10869096
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.054 s -
Agent appsec 1.189 s 135.581 ms (12.9%)
Agent iast 1.185 s 131.54 ms (12.5%)
Agent profiling 1.265 s 210.916 ms (20.0%)
Total tracing 10.432 s -
Total appsec 10.702 s 270.504 ms (2.6%)
Total iast 10.969 s 537.064 ms (5.1%)
Total profiling 10.882 s 450.198 ms (4.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.098 s -
Agent appsec 1.237 s 138.478 ms (12.6%)
Agent iast 1.224 s 125.685 ms (11.4%)
Agent profiling 1.324 s 226.077 ms (20.6%)
Total tracing 10.439 s -
Total appsec 10.729 s 290.58 ms (2.8%)
Total iast 10.985 s 546.269 ms (5.2%)
Total profiling 10.869 s 430.199 ms (4.1%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.545 ms) : 0, 713545
BytebuddyAgent [candidate] (697.402 ms) : 0, 697402
GlobalTracer [baseline] (255.183 ms) : 0, 255183
GlobalTracer [candidate] (319.768 ms) : 0, 319768
AppSec [baseline] (56.189 ms) : 0, 56189
AppSec [candidate] (55.026 ms) : 0, 55026
Remote Config [baseline] (726.973 µs) : 0, 727
Remote Config [candidate] (687.142 µs) : 0, 687
Telemetry [baseline] (13.096 ms) : 0, 13096
Telemetry [candidate] (11.39 ms) : 0, 11390
section appsec
BytebuddyAgent [baseline] (731.857 ms) : 0, 731857
BytebuddyAgent [candidate] (718.485 ms) : 0, 718485
GlobalTracer [baseline] (253.098 ms) : 0, 253098
GlobalTracer [candidate] (318.416 ms) : 0, 318416
AppSec [baseline] (170.691 ms) : 0, 170691
AppSec [candidate] (167.436 ms) : 0, 167436
IAST [baseline] (19.381 ms) : 0, 19381
IAST [candidate] (19.152 ms) : 0, 19152
Remote Config [baseline] (666.698 µs) : 0, 667
Remote Config [candidate] (644.316 µs) : 0, 644
Telemetry [baseline] (8.235 ms) : 0, 8235
Telemetry [candidate] (8.126 ms) : 0, 8126
section iast
BytebuddyAgent [baseline] (833.672 ms) : 0, 833672
BytebuddyAgent [candidate] (814.875 ms) : 0, 814875
GlobalTracer [baseline] (247.103 ms) : 0, 247103
GlobalTracer [candidate] (308.182 ms) : 0, 308182
AppSec [baseline] (58.157 ms) : 0, 58157
AppSec [candidate] (57.056 ms) : 0, 57056
IAST [baseline] (21.653 ms) : 0, 21653
IAST [candidate] (21.746 ms) : 0, 21746
Remote Config [baseline] (685.301 µs) : 0, 685
Remote Config [candidate] (624.134 µs) : 0, 624
Telemetry [baseline] (8.872 ms) : 0, 8872
Telemetry [candidate] (7.447 ms) : 0, 7447
section profiling
BytebuddyAgent [baseline] (709.07 ms) : 0, 709070
BytebuddyAgent [candidate] (693.075 ms) : 0, 693075
GlobalTracer [baseline] (350.848 ms) : 0, 350848
GlobalTracer [candidate] (435.796 ms) : 0, 435796
AppSec [baseline] (55.6 ms) : 0, 55600
AppSec [candidate] (53.823 ms) : 0, 53823
Remote Config [baseline] (669.373 µs) : 0, 669
Remote Config [candidate] (651.81 µs) : 0, 652
Telemetry [baseline] (9.001 ms) : 0, 9001
Telemetry [candidate] (7.747 ms) : 0, 7747
ProfilingAgent [baseline] (96.984 ms) : 0, 96984
ProfilingAgent [candidate] (93.666 ms) : 0, 93666
Profiling [baseline] (97.008 ms) : 0, 97008
Profiling [candidate] (93.69 ms) : 0, 93690
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1057499
Total [baseline] (8.652 s) : 0, 8652278
Agent [candidate] (1.092 s) : 0, 1091772
Total [candidate] (8.634 s) : 0, 8634152
section iast
Agent [baseline] (1.184 s) : 0, 1184212
Total [baseline] (9.265 s) : 0, 9264867
Agent [candidate] (1.222 s) : 0, 1222344
Total [candidate] (9.181 s) : 0, 9181325
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.191 s) : 0, 1191182
Total [baseline] (9.189 s) : 0, 9189252
Agent [candidate] (1.224 s) : 0, 1223792
Total [candidate] (9.179 s) : 0, 9178628
section iast_TELEMETRY_OFF
Agent [baseline] (1.186 s) : 0, 1185742
Total [baseline] (9.191 s) : 0, 9191066
Agent [candidate] (1.218 s) : 0, 1218380
Total [candidate] (9.194 s) : 0, 9194085
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent iast 1.184 s 126.712 ms (12.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.191 s 133.682 ms (12.6%)
Agent iast_TELEMETRY_OFF 1.186 s 128.243 ms (12.1%)
Total tracing 8.652 s -
Total iast 9.265 s 612.589 ms (7.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.189 s 536.974 ms (6.2%)
Total iast_TELEMETRY_OFF 9.191 s 538.788 ms (6.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.092 s -
Agent iast 1.222 s 130.572 ms (12.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.224 s 132.02 ms (12.1%)
Agent iast_TELEMETRY_OFF 1.218 s 126.608 ms (11.6%)
Total tracing 8.634 s -
Total iast 9.181 s 547.173 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.179 s 544.476 ms (6.3%)
Total iast_TELEMETRY_OFF 9.194 s 559.934 ms (6.5%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.744 ms) : 0, 714744
BytebuddyAgent [candidate] (695.621 ms) : 0, 695621
GlobalTracer [baseline] (255.903 ms) : 0, 255903
GlobalTracer [candidate] (319.05 ms) : 0, 319050
AppSec [baseline] (56.171 ms) : 0, 56171
AppSec [candidate] (54.249 ms) : 0, 54249
Remote Config [baseline] (717.758 µs) : 0, 718
Remote Config [candidate] (680.006 µs) : 0, 680
Telemetry [baseline] (15.071 ms) : 0, 15071
Telemetry [candidate] (8.434 ms) : 0, 8434
section iast
BytebuddyAgent [baseline] (833.027 ms) : 0, 833027
BytebuddyAgent [candidate] (814.024 ms) : 0, 814024
GlobalTracer [baseline] (246.978 ms) : 0, 246978
GlobalTracer [candidate] (307.864 ms) : 0, 307864
AppSec [baseline] (58.14 ms) : 0, 58140
AppSec [candidate] (56.861 ms) : 0, 56861
IAST [baseline] (21.514 ms) : 0, 21514
IAST [candidate] (21.736 ms) : 0, 21736
Remote Config [baseline] (675.006 µs) : 0, 675
Remote Config [candidate] (616.352 µs) : 0, 616
Telemetry [baseline] (8.836 ms) : 0, 8836
Telemetry [candidate] (7.487 ms) : 0, 7487
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (837.611 ms) : 0, 837611
BytebuddyAgent [candidate] (814.522 ms) : 0, 814522
GlobalTracer [baseline] (248.391 ms) : 0, 248391
GlobalTracer [candidate] (308.048 ms) : 0, 308048
AppSec [baseline] (58.581 ms) : 0, 58581
AppSec [candidate] (57.305 ms) : 0, 57305
IAST [baseline] (22.002 ms) : 0, 22002
IAST [candidate] (22.057 ms) : 0, 22057
Remote Config [baseline] (666.49 µs) : 0, 666
Remote Config [candidate] (614.455 µs) : 0, 614
Telemetry [baseline] (8.856 ms) : 0, 8856
Telemetry [candidate] (7.485 ms) : 0, 7485
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (835.622 ms) : 0, 835622
BytebuddyAgent [candidate] (810.748 ms) : 0, 810748
GlobalTracer [baseline] (246.978 ms) : 0, 246978
GlobalTracer [candidate] (307.402 ms) : 0, 307402
AppSec [baseline] (57.899 ms) : 0, 57899
AppSec [candidate] (57.818 ms) : 0, 57818
IAST [baseline] (20.849 ms) : 0, 20849
IAST [candidate] (20.612 ms) : 0, 20612
Remote Config [baseline] (659.19 µs) : 0, 659
Remote Config [candidate] (630.319 µs) : 0, 630
Telemetry [baseline] (8.606 ms) : 0, 8606
Telemetry [candidate] (7.407 ms) : 0, 7407
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-16T09:47:33 2025-01-16T09:54:38
git_branch master mhlidd/pending_traces
git_commit_date 1737020324 1737020273
git_commit_sha 148aef9 e6ad777
release_version 1.46.0-SNAPSHOT~148aef92ab 1.45.0-SNAPSHOT~e6ad777dc5
start_time 2025-01-16T09:47:19 2025-01-16T09:54:24
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737021633 1737021633
ci_job_id 768585947 768585947
ci_pipeline_id 53158813 53158813
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

Found 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 16 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_FULL better
[-104.344µs; -57.489µs] or [-14.019%; -7.724%]
unstable
[-367.024op/s; +2271.786op/s] or [-6.423%; +39.756%]
663.409µs 6666.667op/s 744.325µs 5714.286op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab
    dateFormat X
    axisFormat %s
section baseline
no_agent (380.402 µs) : 361, 400
.   : milestone, 380,
iast (508.747 µs) : 487, 530
.   : milestone, 509,
iast_FULL (744.325 µs) : 722, 766
.   : milestone, 744,
iast_GLOBAL (560.425 µs) : 537, 583
.   : milestone, 560,
iast_HARDCODED_SECRET_DISABLED (505.03 µs) : 484, 526
.   : milestone, 505,
iast_INACTIVE (461.732 µs) : 440, 483
.   : milestone, 462,
iast_TELEMETRY_OFF (505.801 µs) : 484, 527
.   : milestone, 506,
tracing (451.692 µs) : 431, 473
.   : milestone, 452,
section candidate
no_agent (371.751 µs) : 352, 391
.   : milestone, 372,
iast (494.589 µs) : 473, 516
.   : milestone, 495,
iast_FULL (663.409 µs) : 642, 685
.   : milestone, 663,
iast_GLOBAL (526.964 µs) : 505, 549
.   : milestone, 527,
iast_HARDCODED_SECRET_DISABLED (497.746 µs) : 476, 519
.   : milestone, 498,
iast_INACTIVE (457.976 µs) : 437, 479
.   : milestone, 458,
iast_TELEMETRY_OFF (490.671 µs) : 469, 512
.   : milestone, 491,
tracing (457.474 µs) : 436, 479
.   : milestone, 457,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 380.402 µs [360.803 µs, 400.0 µs] -
iast 508.747 µs [487.212 µs, 530.282 µs] 128.345 µs (33.7%)
iast_FULL 744.325 µs [722.201 µs, 766.448 µs] 363.923 µs (95.7%)
iast_GLOBAL 560.425 µs [537.433 µs, 583.416 µs] 180.023 µs (47.3%)
iast_HARDCODED_SECRET_DISABLED 505.03 µs [483.566 µs, 526.493 µs] 124.628 µs (32.8%)
iast_INACTIVE 461.732 µs [440.232 µs, 483.232 µs] 81.33 µs (21.4%)
iast_TELEMETRY_OFF 505.801 µs [484.272 µs, 527.33 µs] 125.4 µs (33.0%)
tracing 451.692 µs [430.55 µs, 472.833 µs] 71.29 µs (18.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 371.751 µs [352.194 µs, 391.308 µs] -
iast 494.589 µs [472.735 µs, 516.443 µs] 122.838 µs (33.0%)
iast_FULL 663.409 µs [641.995 µs, 684.822 µs] 291.658 µs (78.5%)
iast_GLOBAL 526.964 µs [505.32 µs, 548.609 µs] 155.213 µs (41.8%)
iast_HARDCODED_SECRET_DISABLED 497.746 µs [476.055 µs, 519.438 µs] 125.996 µs (33.9%)
iast_INACTIVE 457.976 µs [436.837 µs, 479.114 µs] 86.225 µs (23.2%)
iast_TELEMETRY_OFF 490.671 µs [469.193 µs, 512.15 µs] 118.921 µs (32.0%)
tracing 457.474 µs [436.155 µs, 478.794 µs] 85.723 µs (23.1%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.367 ms) : 1347, 1387
.   : milestone, 1367,
appsec (1.76 ms) : 1736, 1784
.   : milestone, 1760,
appsec_no_iast (1.761 ms) : 1735, 1786
.   : milestone, 1761,
iast (1.512 ms) : 1488, 1537
.   : milestone, 1512,
profiling (1.551 ms) : 1526, 1576
.   : milestone, 1551,
tracing (1.499 ms) : 1474, 1524
.   : milestone, 1499,
section candidate
no_agent (1.352 ms) : 1332, 1371
.   : milestone, 1352,
appsec (1.77 ms) : 1747, 1794
.   : milestone, 1770,
appsec_no_iast (1.741 ms) : 1717, 1766
.   : milestone, 1741,
iast (1.509 ms) : 1486, 1533
.   : milestone, 1509,
profiling (1.533 ms) : 1509, 1556
.   : milestone, 1533,
tracing (1.496 ms) : 1470, 1521
.   : milestone, 1496,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.367 ms [1.347 ms, 1.387 ms] -
appsec 1.76 ms [1.736 ms, 1.784 ms] 392.808 µs (28.7%)
appsec_no_iast 1.761 ms [1.735 ms, 1.786 ms] 393.594 µs (28.8%)
iast 1.512 ms [1.488 ms, 1.537 ms] 145.276 µs (10.6%)
profiling 1.551 ms [1.526 ms, 1.576 ms] 184.088 µs (13.5%)
tracing 1.499 ms [1.474 ms, 1.524 ms] 131.952 µs (9.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.352 ms [1.332 ms, 1.371 ms] -
appsec 1.77 ms [1.747 ms, 1.794 ms] 418.803 µs (31.0%)
appsec_no_iast 1.741 ms [1.717 ms, 1.766 ms] 389.706 µs (28.8%)
iast 1.509 ms [1.486 ms, 1.533 ms] 157.73 µs (11.7%)
profiling 1.533 ms [1.509 ms, 1.556 ms] 181.147 µs (13.4%)
tracing 1.496 ms [1.47 ms, 1.521 ms] 143.95 µs (10.7%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/pending_traces
git_commit_date 1737020324 1737020273
git_commit_sha 148aef9 e6ad777
release_version 1.46.0-SNAPSHOT~148aef92ab 1.45.0-SNAPSHOT~e6ad777dc5
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1737022258 1737022258
ci_job_id 768585948 768585948
ci_pipeline_id 53158813 53158813
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.467 ms) : 1455, 1478
.   : milestone, 1467,
appsec (2.347 ms) : 2304, 2389
.   : milestone, 2347,
iast (2.094 ms) : 2040, 2148
.   : milestone, 2094,
iast_GLOBAL (2.142 ms) : 2087, 2197
.   : milestone, 2142,
profiling (1.975 ms) : 1931, 2019
.   : milestone, 1975,
tracing (1.932 ms) : 1890, 1974
.   : milestone, 1932,
section candidate
no_agent (1.465 ms) : 1453, 1476
.   : milestone, 1465,
appsec (2.335 ms) : 2293, 2376
.   : milestone, 2335,
iast (2.08 ms) : 2028, 2133
.   : milestone, 2080,
iast_GLOBAL (2.129 ms) : 2076, 2182
.   : milestone, 2129,
profiling (1.959 ms) : 1917, 2002
.   : milestone, 1959,
tracing (1.924 ms) : 1884, 1964
.   : milestone, 1924,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.455 ms, 1.478 ms] -
appsec 2.347 ms [2.304 ms, 2.389 ms] 879.622 µs (60.0%)
iast 2.094 ms [2.04 ms, 2.148 ms] 627.18 µs (42.8%)
iast_GLOBAL 2.142 ms [2.087 ms, 2.197 ms] 674.984 µs (46.0%)
profiling 1.975 ms [1.931 ms, 2.019 ms] 508.106 µs (34.6%)
tracing 1.932 ms [1.89 ms, 1.974 ms] 465.127 µs (31.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.465 ms [1.453 ms, 1.476 ms] -
appsec 2.335 ms [2.293 ms, 2.376 ms] 869.716 µs (59.4%)
iast 2.08 ms [2.028 ms, 2.133 ms] 615.588 µs (42.0%)
iast_GLOBAL 2.129 ms [2.076 ms, 2.182 ms] 664.384 µs (45.4%)
profiling 1.959 ms [1.917 ms, 2.002 ms] 494.523 µs (33.8%)
tracing 1.924 ms [1.884 ms, 1.964 ms] 459.225 µs (31.3%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~e6ad777dc5, baseline=1.46.0-SNAPSHOT~148aef92ab
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.977 s) : 14977000, 14977000
.   : milestone, 14977000,
appsec (28.576 s) : 28576000, 28576000
.   : milestone, 28576000,
iast (19.047 s) : 19047000, 19047000
.   : milestone, 19047000,
iast_GLOBAL (18.042 s) : 18042000, 18042000
.   : milestone, 18042000,
profiling (15.218 s) : 15218000, 15218000
.   : milestone, 15218000,
tracing (14.888 s) : 14888000, 14888000
.   : milestone, 14888000,
section candidate
no_agent (15.257 s) : 15257000, 15257000
.   : milestone, 15257000,
appsec (15.214 s) : 15214000, 15214000
.   : milestone, 15214000,
iast (18.809 s) : 18809000, 18809000
.   : milestone, 18809000,
iast_GLOBAL (18.191 s) : 18191000, 18191000
.   : milestone, 18191000,
profiling (15.15 s) : 15150000, 15150000
.   : milestone, 15150000,
tracing (14.999 s) : 14999000, 14999000
.   : milestone, 14999000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.977 s [14.977 s, 14.977 s] -
appsec 28.576 s [28.576 s, 28.576 s] 13.599 s (90.8%)
iast 19.047 s [19.047 s, 19.047 s] 4.07 s (27.2%)
iast_GLOBAL 18.042 s [18.042 s, 18.042 s] 3.065 s (20.5%)
profiling 15.218 s [15.218 s, 15.218 s] 241.0 ms (1.6%)
tracing 14.888 s [14.888 s, 14.888 s] -89.0 ms (-0.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.257 s [15.257 s, 15.257 s] -
appsec 15.214 s [15.214 s, 15.214 s] -43.0 ms (-0.3%)
iast 18.809 s [18.809 s, 18.809 s] 3.552 s (23.3%)
iast_GLOBAL 18.191 s [18.191 s, 18.191 s] 2.934 s (19.2%)
profiling 15.15 s [15.15 s, 15.15 s] -107.0 ms (-0.7%)
tracing 14.999 s [14.999 s, 14.999 s] -258.0 ms (-1.7%)

@mhlidd mhlidd requested a review from PerfectSlayer December 9, 2024 15:13
@PerfectSlayer PerfectSlayer changed the title adding tracerflare.addtext Add pending traces to tracer flare Dec 11, 2024
@mcculls
Copy link
Contributor

mcculls commented Dec 12, 2024

Have you considered tackling this another way, by adding the reporting to DelayingPendingTraceBuffer ? That has all the unfinished (pending) traces not yet sent to the agent. Rather than maintaining a parallel collection of weak references you could just peek into what's in the buffer and write that out - using some limits to avoid sending a massive flare which may be rejected due to its size.

@mhlidd mhlidd force-pushed the mhlidd/pending_traces branch from 4be2999 to 3e4955a Compare December 16, 2024 21:01
}

DumpSupplier supplier = new DumpSupplier(DumpDrain.data);
buffer.queue.fill(supplier, supplier.data.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if filling the queue back with the original element can't be done when handling the dump element.
It would limit having new element inserted in the same time and messing with the queue order. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

If so, does it make sense having the same object implement both Consummer and Supplier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add this in the new commit!

if (e instanceof PendingTrace) {
PendingTrace trace = (PendingTrace) e;
for (DDSpan span : trace.getSpans()) {
dumpText.append(span.toString()).append("\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

'\n' for single char (instead of using a String object)

@mhlidd mhlidd requested a review from PerfectSlayer December 20, 2024 03:54
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.

Have drain and fill together feels way better! 🙌

Now, about using the collected elements:

  • You can declare your comparator as a private final Comparator<List<Span>> TRACE_BY_START_DATE field so its meaning will be clear and it will only be allocated once
  • You will need to figure out how to filter, limit, and map your elements. I would recommend having a look at the Java Stream API
  • Now you get most of the part in place, try building some tests / triggering your code. You should be able to find some NPE by yourself 😉

@@ -182,11 +242,18 @@ public void run() {

if (pendingTrace instanceof FlushElement) {
// Since this is an MPSC queue, the drain needs to be called on the consumer thread
queue.drain(WriteDrain.WRITE_DRAIN);
queue.drain(WriteDrain.WRITE_DRAIN, 50);
Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm I was trying to use the MPSC drain method that takes in a limit to the number of elements that get drained. Do you think that I should avoid doing this and using the Java stream API instead?

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

Successfully merging this pull request may close these issues.

3 participants