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 11 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 1734714029 1734722486
git_commit_sha e8e9292 7504373
release_version 1.45.0-SNAPSHOT~e8e9292d06 1.45.0-SNAPSHOT~7504373a0c
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1734724958 1734724958
ci_job_id 747427061 747427061
ci_pipeline_id 51675965 51675965
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 6 performance improvements and 16 performance regressions! Performance is the same for 33 metrics, 8 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:Agent.start worse
[+45.372ms; +53.629ms] or [+3.862%; +4.564%]
1.224s 1.175s
scenario:startup:insecure-bank:iast:GlobalTracer worse
[+61.636ms; +63.919ms] or [+25.067%; +25.996%]
308.663ms 245.885ms
scenario:startup:insecure-bank:iast:Telemetry better
[-1095.067µs; -810.045µs] or [-12.999%; -9.616%]
7.472ms 8.424ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Agent.start worse
[+44.961ms; +54.219ms] or [+3.829%; +4.617%]
1.224s 1.174s
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:GlobalTracer worse
[+60.710ms; +63.355ms] or [+24.701%; +25.778%]
307.808ms 245.776ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Telemetry better
[-1115.181µs; -785.415µs] or [-13.273%; -9.348%]
7.452ms 8.402ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Agent.start worse
[+47.862ms; +56.746ms] or [+4.090%; +4.849%]
1.222s 1.170s
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:GlobalTracer worse
[+61.098ms; +63.401ms] or [+24.863%; +25.801%]
307.986ms 245.736ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Telemetry better
[-1037.500µs; -703.961µs] or [-12.404%; -8.416%]
7.493ms 8.364ms
scenario:startup:insecure-bank:tracing:Agent.start worse
[+22.267ms; +50.035ms] or [+2.104%; +4.728%]
1.094s 1.058s
scenario:startup:insecure-bank:tracing:GlobalTracer worse
[+59.196ms; +65.707ms] or [+23.072%; +25.610%]
319.017ms 256.565ms
scenario:startup:insecure-bank:tracing:AppSec better
[-6.200ms; -2.124ms] or [-10.568%; -3.621%]
54.507ms 58.669ms
scenario:startup:petclinic:appsec:Agent.start worse
[+33.618ms; +58.692ms] or [+2.831%; +4.942%]
1.234s 1.188s
scenario:startup:petclinic:appsec:GlobalTracer worse
[+61.020ms; +68.463ms] or [+24.091%; +27.029%]
318.032ms 253.290ms
scenario:startup:petclinic:iast:Agent.start worse
[+44.611ms; +83.775ms] or [+3.799%; +7.135%]
1.238s 1.174s
scenario:startup:petclinic:iast:GlobalTracer worse
[+61.393ms; +70.410ms] or [+25.018%; +28.693%]
311.290ms 245.389ms
scenario:startup:petclinic:iast:Telemetry better
[-1006.973µs; -580.282µs] or [-11.989%; -6.909%]
7.605ms 8.399ms
scenario:startup:petclinic:profiling:Agent.start worse
[+43.799ms; +54.736ms] or [+3.452%; +4.315%]
1.318s 1.269s
scenario:startup:petclinic:profiling:GlobalTracer worse
[+61.051ms; +66.515ms] or [+16.505%; +17.982%]
433.684ms 369.901ms
scenario:startup:petclinic:tracing:Agent.start worse
[+33.014ms; +41.984ms] or [+3.127%; +3.977%]
1.093s 1.056s
scenario:startup:petclinic:tracing:BytebuddyAgent better
[-20.268ms; -15.716ms] or [-2.840%; -2.202%]
695.682ms 713.674ms
scenario:startup:petclinic:tracing:GlobalTracer worse
[+61.292ms; +64.561ms] or [+23.950%; +25.227%]
318.847ms 255.920ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058304
Total [baseline] (8.666 s) : 0, 8665540
Agent [candidate] (1.094 s) : 0, 1094455
Total [candidate] (8.649 s) : 0, 8648938
section iast
Agent [baseline] (1.175 s) : 0, 1174972
Total [baseline] (9.186 s) : 0, 9185947
Agent [candidate] (1.224 s) : 0, 1224472
Total [candidate] (9.213 s) : 0, 9213074
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.174 s) : 0, 1174210
Total [baseline] (9.168 s) : 0, 9168336
Agent [candidate] (1.224 s) : 0, 1223800
Total [candidate] (9.195 s) : 0, 9194581
section iast_TELEMETRY_OFF
Agent [baseline] (1.17 s) : 0, 1170156
Total [baseline] (9.187 s) : 0, 9187326
Agent [candidate] (1.222 s) : 0, 1222460
Total [candidate] (9.213 s) : 0, 9213460
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.058 s -
Agent iast 1.175 s 116.667 ms (11.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.174 s 115.906 ms (11.0%)
Agent iast_TELEMETRY_OFF 1.17 s 111.852 ms (10.6%)
Total tracing 8.666 s -
Total iast 9.186 s 520.407 ms (6.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.168 s 502.796 ms (5.8%)
Total iast_TELEMETRY_OFF 9.187 s 521.787 ms (6.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.094 s -
Agent iast 1.224 s 130.017 ms (11.9%)
Agent iast_HARDCODED_SECRET_DISABLED 1.224 s 129.345 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.222 s 128.005 ms (11.7%)
Total tracing 8.649 s -
Total iast 9.213 s 564.135 ms (6.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.195 s 545.642 ms (6.3%)
Total iast_TELEMETRY_OFF 9.213 s 564.522 ms (6.5%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (716.226 ms) : 0, 716226
BytebuddyAgent [candidate] (695.937 ms) : 0, 695937
GlobalTracer [baseline] (256.565 ms) : 0, 256565
GlobalTracer [candidate] (319.017 ms) : 0, 319017
AppSec [baseline] (58.669 ms) : 0, 58669
AppSec [candidate] (54.507 ms) : 0, 54507
Remote Config [baseline] (691.391 µs) : 0, 691
Remote Config [candidate] (676.888 µs) : 0, 677
Telemetry [baseline] (11.113 ms) : 0, 11113
Telemetry [candidate] (10.582 ms) : 0, 10582
section iast
BytebuddyAgent [baseline] (826.704 ms) : 0, 826704
BytebuddyAgent [candidate] (815.147 ms) : 0, 815147
GlobalTracer [baseline] (245.885 ms) : 0, 245885
GlobalTracer [candidate] (308.663 ms) : 0, 308663
AppSec [baseline] (57.419 ms) : 0, 57419
AppSec [candidate] (56.987 ms) : 0, 56987
Remote Config [baseline] (646.28 µs) : 0, 646
Remote Config [candidate] (617.364 µs) : 0, 617
Telemetry [baseline] (8.424 ms) : 0, 8424
Telemetry [candidate] (7.472 ms) : 0, 7472
IAST [baseline] (20.991 ms) : 0, 20991
IAST [candidate] (21.771 ms) : 0, 21771
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (825.935 ms) : 0, 825935
BytebuddyAgent [candidate] (815.349 ms) : 0, 815349
GlobalTracer [baseline] (245.776 ms) : 0, 245776
GlobalTracer [candidate] (307.808 ms) : 0, 307808
AppSec [baseline] (57.475 ms) : 0, 57475
AppSec [candidate] (57.69 ms) : 0, 57690
Remote Config [baseline] (644.853 µs) : 0, 645
Remote Config [candidate] (612.527 µs) : 0, 613
Telemetry [baseline] (8.402 ms) : 0, 8402
Telemetry [candidate] (7.452 ms) : 0, 7452
IAST [baseline] (21.089 ms) : 0, 21089
IAST [candidate] (21.096 ms) : 0, 21096
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (822.213 ms) : 0, 822213
BytebuddyAgent [candidate] (813.223 ms) : 0, 813223
GlobalTracer [baseline] (245.736 ms) : 0, 245736
GlobalTracer [candidate] (307.986 ms) : 0, 307986
AppSec [baseline] (57.66 ms) : 0, 57660
AppSec [candidate] (57.482 ms) : 0, 57482
Remote Config [baseline] (649.15 µs) : 0, 649
Remote Config [candidate] (623.568 µs) : 0, 624
Telemetry [baseline] (8.364 ms) : 0, 8364
Telemetry [candidate] (7.493 ms) : 0, 7493
IAST [baseline] (20.695 ms) : 0, 20695
IAST [candidate] (21.854 ms) : 0, 21854
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055676
Total [baseline] (10.487 s) : 0, 10486704
Agent [candidate] (1.093 s) : 0, 1093175
Total [candidate] (10.466 s) : 0, 10465667
section appsec
Agent [baseline] (1.188 s) : 0, 1187583
Total [baseline] (10.713 s) : 0, 10712895
Agent [candidate] (1.234 s) : 0, 1233738
Total [candidate] (10.671 s) : 0, 10671416
section iast
Agent [baseline] (1.174 s) : 0, 1174208
Total [baseline] (10.941 s) : 0, 10941392
Agent [candidate] (1.238 s) : 0, 1238401
Total [candidate] (11.024 s) : 0, 11024253
section profiling
Agent [baseline] (1.269 s) : 0, 1268615
Total [baseline] (10.788 s) : 0, 10787607
Agent [candidate] (1.318 s) : 0, 1317882
Total [candidate] (10.854 s) : 0, 10854419
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent appsec 1.188 s 131.907 ms (12.5%)
Agent iast 1.174 s 118.532 ms (11.2%)
Agent profiling 1.269 s 212.939 ms (20.2%)
Total tracing 10.487 s -
Total appsec 10.713 s 226.191 ms (2.2%)
Total iast 10.941 s 454.688 ms (4.3%)
Total profiling 10.788 s 300.903 ms (2.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.093 s -
Agent appsec 1.234 s 140.563 ms (12.9%)
Agent iast 1.238 s 145.227 ms (13.3%)
Agent profiling 1.318 s 224.708 ms (20.6%)
Total tracing 10.466 s -
Total appsec 10.671 s 205.749 ms (2.0%)
Total iast 11.024 s 558.585 ms (5.3%)
Total profiling 10.854 s 388.752 ms (3.7%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.674 ms) : 0, 713674
BytebuddyAgent [candidate] (695.682 ms) : 0, 695682
GlobalTracer [baseline] (255.92 ms) : 0, 255920
GlobalTracer [candidate] (318.847 ms) : 0, 318847
AppSec [baseline] (57.906 ms) : 0, 57906
AppSec [candidate] (54.323 ms) : 0, 54323
Remote Config [baseline] (695.258 µs) : 0, 695
Remote Config [candidate] (675.988 µs) : 0, 676
Telemetry [baseline] (12.539 ms) : 0, 12539
Telemetry [candidate] (9.906 ms) : 0, 9906
section appsec
BytebuddyAgent [baseline] (730.054 ms) : 0, 730054
BytebuddyAgent [candidate] (716.115 ms) : 0, 716115
GlobalTracer [baseline] (253.29 ms) : 0, 253290
GlobalTracer [candidate] (318.032 ms) : 0, 318032
AppSec [baseline] (170.332 ms) : 0, 170332
AppSec [candidate] (167.01 ms) : 0, 167010
Remote Config [baseline] (649.731 µs) : 0, 650
Remote Config [candidate] (647.896 µs) : 0, 648
Telemetry [baseline] (8.634 ms) : 0, 8634
Telemetry [candidate] (8.182 ms) : 0, 8182
IAST [baseline] (19.196 ms) : 0, 19196
IAST [candidate] (19.96 ms) : 0, 19960
section iast
BytebuddyAgent [baseline] (826.213 ms) : 0, 826213
BytebuddyAgent [candidate] (824.864 ms) : 0, 824864
GlobalTracer [baseline] (245.389 ms) : 0, 245389
GlobalTracer [candidate] (311.29 ms) : 0, 311290
AppSec [baseline] (57.755 ms) : 0, 57755
AppSec [candidate] (58.572 ms) : 0, 58572
Remote Config [baseline] (643.02 µs) : 0, 643
Remote Config [candidate] (628.034 µs) : 0, 628
Telemetry [baseline] (8.399 ms) : 0, 8399
Telemetry [candidate] (7.605 ms) : 0, 7605
IAST [baseline] (20.949 ms) : 0, 20949
IAST [candidate] (21.38 ms) : 0, 21380
section profiling
BytebuddyAgent [baseline] (699.479 ms) : 0, 699479
BytebuddyAgent [candidate] (690.306 ms) : 0, 690306
GlobalTracer [baseline] (369.901 ms) : 0, 369901
GlobalTracer [candidate] (433.684 ms) : 0, 433684
AppSec [baseline] (53.941 ms) : 0, 53941
AppSec [candidate] (53.115 ms) : 0, 53115
Remote Config [baseline] (655.066 µs) : 0, 655
Remote Config [candidate] (657.854 µs) : 0, 658
Telemetry [baseline] (7.806 ms) : 0, 7806
Telemetry [candidate] (7.698 ms) : 0, 7698
ProfilingAgent [baseline] (95.29 ms) : 0, 95290
ProfilingAgent [candidate] (93.202 ms) : 0, 93202
Profiling [baseline] (95.315 ms) : 0, 95315
Profiling [candidate] (93.226 ms) : 0, 93226
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-12-20T19:32:52 2024-12-20T19:39:50
git_branch master mhlidd/pending_traces
git_commit_date 1734714029 1734722486
git_commit_sha e8e9292 7504373
release_version 1.45.0-SNAPSHOT~e8e9292d06 1.45.0-SNAPSHOT~7504373a0c
start_time 2024-12-20T19:32:39 2024-12-20T19:39:37
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1734723943 1734723943
ci_job_id 747427062 747427062
ci_pipeline_id 51675965 51675965
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 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics.

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06
    dateFormat X
    axisFormat %s
section baseline
no_agent (370.861 µs) : 351, 390
.   : milestone, 371,
iast (494.079 µs) : 472, 516
.   : milestone, 494,
iast_FULL (650.186 µs) : 629, 672
.   : milestone, 650,
iast_GLOBAL (527.907 µs) : 505, 551
.   : milestone, 528,
iast_HARDCODED_SECRET_DISABLED (491.176 µs) : 470, 513
.   : milestone, 491,
iast_INACTIVE (455.291 µs) : 434, 477
.   : milestone, 455,
iast_TELEMETRY_OFF (481.669 µs) : 460, 504
.   : milestone, 482,
tracing (449.39 µs) : 428, 470
.   : milestone, 449,
section candidate
no_agent (375.379 µs) : 355, 396
.   : milestone, 375,
iast (495.84 µs) : 474, 517
.   : milestone, 496,
iast_FULL (650.776 µs) : 629, 672
.   : milestone, 651,
iast_GLOBAL (514.775 µs) : 492, 537
.   : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (492.949 µs) : 472, 514
.   : milestone, 493,
iast_INACTIVE (453.1 µs) : 431, 475
.   : milestone, 453,
iast_TELEMETRY_OFF (484.049 µs) : 462, 506
.   : milestone, 484,
tracing (444.789 µs) : 424, 465
.   : milestone, 445,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 370.861 µs [351.405 µs, 390.317 µs] -
iast 494.079 µs [471.924 µs, 516.235 µs] 123.218 µs (33.2%)
iast_FULL 650.186 µs [628.555 µs, 671.818 µs] 279.326 µs (75.3%)
iast_GLOBAL 527.907 µs [505.238 µs, 550.576 µs] 157.046 µs (42.3%)
iast_HARDCODED_SECRET_DISABLED 491.176 µs [469.539 µs, 512.812 µs] 120.315 µs (32.4%)
iast_INACTIVE 455.291 µs [433.974 µs, 476.608 µs] 84.431 µs (22.8%)
iast_TELEMETRY_OFF 481.669 µs [459.664 µs, 503.674 µs] 110.809 µs (29.9%)
tracing 449.39 µs [428.303 µs, 470.478 µs] 78.53 µs (21.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.379 µs [354.738 µs, 396.019 µs] -
iast 495.84 µs [474.385 µs, 517.295 µs] 120.461 µs (32.1%)
iast_FULL 650.776 µs [629.195 µs, 672.357 µs] 275.398 µs (73.4%)
iast_GLOBAL 514.775 µs [492.449 µs, 537.1 µs] 139.396 µs (37.1%)
iast_HARDCODED_SECRET_DISABLED 492.949 µs [471.561 µs, 514.337 µs] 117.571 µs (31.3%)
iast_INACTIVE 453.1 µs [431.424 µs, 474.776 µs] 77.722 µs (20.7%)
iast_TELEMETRY_OFF 484.049 µs [462.028 µs, 506.069 µs] 108.67 µs (28.9%)
tracing 444.789 µs [424.278 µs, 465.299 µs] 69.41 µs (18.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.348 ms) : 1329, 1367
.   : milestone, 1348,
appsec (1.749 ms) : 1726, 1773
.   : milestone, 1749,
appsec_no_iast (1.737 ms) : 1711, 1762
.   : milestone, 1737,
iast (1.502 ms) : 1478, 1526
.   : milestone, 1502,
profiling (1.519 ms) : 1496, 1542
.   : milestone, 1519,
tracing (1.487 ms) : 1461, 1513
.   : milestone, 1487,
section candidate
no_agent (1.349 ms) : 1329, 1369
.   : milestone, 1349,
appsec (1.762 ms) : 1739, 1786
.   : milestone, 1762,
appsec_no_iast (1.757 ms) : 1730, 1784
.   : milestone, 1757,
iast (1.499 ms) : 1476, 1521
.   : milestone, 1499,
profiling (1.49 ms) : 1467, 1514
.   : milestone, 1490,
tracing (1.496 ms) : 1471, 1522
.   : milestone, 1496,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.348 ms [1.329 ms, 1.367 ms] -
appsec 1.749 ms [1.726 ms, 1.773 ms] 400.842 µs (29.7%)
appsec_no_iast 1.737 ms [1.711 ms, 1.762 ms] 388.48 µs (28.8%)
iast 1.502 ms [1.478 ms, 1.526 ms] 153.603 µs (11.4%)
profiling 1.519 ms [1.496 ms, 1.542 ms] 170.18 µs (12.6%)
tracing 1.487 ms [1.461 ms, 1.513 ms] 138.654 µs (10.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.349 ms [1.329 ms, 1.369 ms] -
appsec 1.762 ms [1.739 ms, 1.786 ms] 413.707 µs (30.7%)
appsec_no_iast 1.757 ms [1.73 ms, 1.784 ms] 408.548 µs (30.3%)
iast 1.499 ms [1.476 ms, 1.521 ms] 150.199 µs (11.1%)
profiling 1.49 ms [1.467 ms, 1.514 ms] 141.701 µs (10.5%)
tracing 1.496 ms [1.471 ms, 1.522 ms] 147.459 µs (10.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/pending_traces
git_commit_date 1734714029 1734722486
git_commit_sha e8e9292 7504373
release_version 1.45.0-SNAPSHOT~e8e9292d06 1.45.0-SNAPSHOT~7504373a0c
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1734724502 1734724502
ci_job_id 747427063 747427063
ci_pipeline_id 51675965 51675965
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 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.468 ms) : 1456, 1479
.   : milestone, 1468,
appsec (2.344 ms) : 2302, 2386
.   : milestone, 2344,
iast (2.08 ms) : 2027, 2132
.   : milestone, 2080,
iast_GLOBAL (2.121 ms) : 2067, 2174
.   : milestone, 2121,
profiling (1.975 ms) : 1931, 2019
.   : milestone, 1975,
tracing (1.924 ms) : 1883, 1964
.   : milestone, 1924,
section candidate
no_agent (1.467 ms) : 1456, 1479
.   : milestone, 1467,
appsec (2.336 ms) : 2294, 2377
.   : milestone, 2336,
iast (2.078 ms) : 2025, 2131
.   : milestone, 2078,
iast_GLOBAL (2.118 ms) : 2065, 2171
.   : milestone, 2118,
profiling (2.445 ms) : 2256, 2634
.   : milestone, 2445,
tracing (1.924 ms) : 1883, 1964
.   : milestone, 1924,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.468 ms [1.456 ms, 1.479 ms] -
appsec 2.344 ms [2.302 ms, 2.386 ms] 876.45 µs (59.7%)
iast 2.08 ms [2.027 ms, 2.132 ms] 611.879 µs (41.7%)
iast_GLOBAL 2.121 ms [2.067 ms, 2.174 ms] 652.858 µs (44.5%)
profiling 1.975 ms [1.931 ms, 2.019 ms] 507.511 µs (34.6%)
tracing 1.924 ms [1.883 ms, 1.964 ms] 455.901 µs (31.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.479 ms] -
appsec 2.336 ms [2.294 ms, 2.377 ms] 868.43 µs (59.2%)
iast 2.078 ms [2.025 ms, 2.131 ms] 610.318 µs (41.6%)
iast_GLOBAL 2.118 ms [2.065 ms, 2.171 ms] 650.432 µs (44.3%)
profiling 2.445 ms [2.256 ms, 2.634 ms] 977.449 µs (66.6%)
tracing 1.924 ms [1.883 ms, 1.964 ms] 456.252 µs (31.1%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~7504373a0c, baseline=1.45.0-SNAPSHOT~e8e9292d06
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.542 s) : 15542000, 15542000
.   : milestone, 15542000,
appsec (14.975 s) : 14975000, 14975000
.   : milestone, 14975000,
iast (18.995 s) : 18995000, 18995000
.   : milestone, 18995000,
iast_GLOBAL (17.705 s) : 17705000, 17705000
.   : milestone, 17705000,
profiling (15.458 s) : 15458000, 15458000
.   : milestone, 15458000,
tracing (15.107 s) : 15107000, 15107000
.   : milestone, 15107000,
section candidate
no_agent (14.845 s) : 14845000, 14845000
.   : milestone, 14845000,
appsec (14.898 s) : 14898000, 14898000
.   : milestone, 14898000,
iast (18.725 s) : 18725000, 18725000
.   : milestone, 18725000,
iast_GLOBAL (17.99 s) : 17990000, 17990000
.   : milestone, 17990000,
profiling (14.967 s) : 14967000, 14967000
.   : milestone, 14967000,
tracing (15.221 s) : 15221000, 15221000
.   : milestone, 15221000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.542 s [15.542 s, 15.542 s] -
appsec 14.975 s [14.975 s, 14.975 s] -567.0 ms (-3.6%)
iast 18.995 s [18.995 s, 18.995 s] 3.453 s (22.2%)
iast_GLOBAL 17.705 s [17.705 s, 17.705 s] 2.163 s (13.9%)
profiling 15.458 s [15.458 s, 15.458 s] -84.0 ms (-0.5%)
tracing 15.107 s [15.107 s, 15.107 s] -435.0 ms (-2.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.845 s [14.845 s, 14.845 s] -
appsec 14.898 s [14.898 s, 14.898 s] 53.0 ms (0.4%)
iast 18.725 s [18.725 s, 18.725 s] 3.88 s (26.1%)
iast_GLOBAL 17.99 s [17.99 s, 17.99 s] 3.145 s (21.2%)
profiling 14.967 s [14.967 s, 14.967 s] 122.0 ms (0.8%)
tracing 15.221 s [15.221 s, 15.221 s] 376.0 ms (2.5%)

@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