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

Adding crash tracking to integration tests #7855

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

dougqh
Copy link
Contributor

@dougqh dougqh commented Oct 29, 2024

What Does This Do

Adds crash tracking into integration tests

Motivation

Now that single step installer is using crash tracking, want to expand crash tracking coverage in CI

Additional Notes

For now, crash tracking is selectively enabled for a subset of integration tests.

The intention is that future pull requests will broadened the coverage.
Right now, the means of argument construction is incompatible with the tests that pass arguments via JAVA_TOOL_OPTIONS.
IAST tests have also been excluded

@dougqh dougqh requested a review from a team as a code owner October 29, 2024 21:42
@dougqh dougqh added run-tests: ibm8 Run tests using IBM 8 JDK run-tests: semeru8 Run tests using Semuru 8 JDK run-tests: semeru11 Run tests using Sumuru 11 JDK run-tests: semeru17 Run tests using Sumuru 17 JDK run-tests: oracle8 Run tests using Oracle 8 JDK run-tests: zulu8 Run tests using Zulu 8 JDK run-tests: zulu11 Run tests using Zulu 11 JDK run-tests: ubuntu17 Run tests using Ubuntu 17 JDK labels Oct 29, 2024
@dougqh dougqh changed the title [DRAFT] Initial attempt at adding crash tracking [DRAFT] Adding crash tracking to integration tests Oct 29, 2024
@pr-commenter
Copy link

pr-commenter bot commented Oct 29, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/crash-tracking-in-smoke-tests
git_commit_date 1732864000 1732866191
git_commit_sha 896dd6b e97ef02
release_version 1.44.0-SNAPSHOT~896dd6b380 1.44.0-SNAPSHOT~e97ef02b4c
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1732868679 1732868679
ci_job_id 723245389 723245389
ci_pipeline_id 50131595 50131595
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 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 7 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1088681
Total [baseline] (10.48 s) : 0, 10480299
Agent [candidate] (1.093 s) : 0, 1092546
Total [candidate] (10.423 s) : 0, 10423428
section appsec
Agent [baseline] (1.224 s) : 0, 1224115
Total [baseline] (10.854 s) : 0, 10853981
Agent [candidate] (1.224 s) : 0, 1224256
Total [candidate] (10.728 s) : 0, 10728475
section iast
Agent [baseline] (1.226 s) : 0, 1225895
Total [baseline] (10.997 s) : 0, 10997149
Agent [candidate] (1.218 s) : 0, 1218072
Total [candidate] (10.936 s) : 0, 10935622
section profiling
Agent [baseline] (1.315 s) : 0, 1315161
Total [baseline] (10.839 s) : 0, 10838864
Agent [candidate] (1.328 s) : 0, 1328200
Total [candidate] (10.873 s) : 0, 10872549
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.089 s -
Agent appsec 1.224 s 135.434 ms (12.4%)
Agent iast 1.226 s 137.215 ms (12.6%)
Agent profiling 1.315 s 226.481 ms (20.8%)
Total tracing 10.48 s -
Total appsec 10.854 s 373.682 ms (3.6%)
Total iast 10.997 s 516.85 ms (4.9%)
Total profiling 10.839 s 358.564 ms (3.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.093 s -
Agent appsec 1.224 s 131.71 ms (12.1%)
Agent iast 1.218 s 125.526 ms (11.5%)
Agent profiling 1.328 s 235.654 ms (21.6%)
Total tracing 10.423 s -
Total appsec 10.728 s 305.047 ms (2.9%)
Total iast 10.936 s 512.194 ms (4.9%)
Total profiling 10.873 s 449.12 ms (4.3%)
gantt
    title petclinic - break down per module: candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.202 ms) : 0, 692202
BytebuddyAgent [candidate] (693.346 ms) : 0, 693346
GlobalTracer [baseline] (316.875 ms) : 0, 316875
GlobalTracer [candidate] (317.272 ms) : 0, 317272
AppSec [baseline] (54.645 ms) : 0, 54645
AppSec [candidate] (54.767 ms) : 0, 54767
Remote Config [baseline] (675.434 µs) : 0, 675
Remote Config [candidate] (686.166 µs) : 0, 686
Telemetry [baseline] (10.632 ms) : 0, 10632
Telemetry [candidate] (12.734 ms) : 0, 12734
section appsec
BytebuddyAgent [baseline] (710.781 ms) : 0, 710781
BytebuddyAgent [candidate] (710.767 ms) : 0, 710767
GlobalTracer [baseline] (313.714 ms) : 0, 313714
GlobalTracer [candidate] (314.134 ms) : 0, 314134
AppSec [baseline] (166.83 ms) : 0, 166830
AppSec [candidate] (167.057 ms) : 0, 167057
IAST [baseline] (19.87 ms) : 0, 19870
IAST [candidate] (19.001 ms) : 0, 19001
Remote Config [baseline] (653.694 µs) : 0, 654
Remote Config [candidate] (637.726 µs) : 0, 638
Telemetry [baseline] (8.554 ms) : 0, 8554
Telemetry [candidate] (8.462 ms) : 0, 8462
section iast
BytebuddyAgent [baseline] (816.923 ms) : 0, 816923
BytebuddyAgent [candidate] (812.043 ms) : 0, 812043
GlobalTracer [baseline] (307.67 ms) : 0, 307670
GlobalTracer [candidate] (305.452 ms) : 0, 305452
AppSec [baseline] (58.402 ms) : 0, 58402
AppSec [candidate] (57.687 ms) : 0, 57687
IAST [baseline] (21.016 ms) : 0, 21016
IAST [candidate] (20.975 ms) : 0, 20975
Remote Config [baseline] (637.365 µs) : 0, 637
Remote Config [candidate] (637.627 µs) : 0, 638
Telemetry [baseline] (7.543 ms) : 0, 7543
Telemetry [candidate] (7.547 ms) : 0, 7547
section profiling
BytebuddyAgent [baseline] (688.075 ms) : 0, 688075
BytebuddyAgent [candidate] (697.479 ms) : 0, 697479
GlobalTracer [baseline] (432.967 ms) : 0, 432967
GlobalTracer [candidate] (435.311 ms) : 0, 435311
AppSec [baseline] (53.537 ms) : 0, 53537
AppSec [candidate] (53.99 ms) : 0, 53990
Remote Config [baseline] (662.238 µs) : 0, 662
Remote Config [candidate] (662.795 µs) : 0, 663
Telemetry [baseline] (7.657 ms) : 0, 7657
Telemetry [candidate] (7.737 ms) : 0, 7737
ProfilingAgent [baseline] (93.263 ms) : 0, 93263
ProfilingAgent [candidate] (93.384 ms) : 0, 93384
Profiling [baseline] (93.286 ms) : 0, 93286
Profiling [candidate] (93.407 ms) : 0, 93407
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.094 s) : 0, 1094296
Total [baseline] (8.673 s) : 0, 8673358
Agent [candidate] (1.091 s) : 0, 1091121
Total [candidate] (8.655 s) : 0, 8654575
section iast
Agent [baseline] (1.216 s) : 0, 1215964
Total [baseline] (9.201 s) : 0, 9200833
Agent [candidate] (1.235 s) : 0, 1235477
Total [candidate] (9.238 s) : 0, 9238204
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.216 s) : 0, 1215932
Total [baseline] (9.151 s) : 0, 9151082
Agent [candidate] (1.216 s) : 0, 1215989
Total [candidate] (9.169 s) : 0, 9169400
section iast_TELEMETRY_OFF
Agent [baseline] (1.215 s) : 0, 1214557
Total [baseline] (9.169 s) : 0, 9168946
Agent [candidate] (1.215 s) : 0, 1214633
Total [candidate] (9.175 s) : 0, 9174797
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.094 s -
Agent iast 1.216 s 121.668 ms (11.1%)
Agent iast_HARDCODED_SECRET_DISABLED 1.216 s 121.636 ms (11.1%)
Agent iast_TELEMETRY_OFF 1.215 s 120.262 ms (11.0%)
Total tracing 8.673 s -
Total iast 9.201 s 527.475 ms (6.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.151 s 477.724 ms (5.5%)
Total iast_TELEMETRY_OFF 9.169 s 495.588 ms (5.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.091 s -
Agent iast 1.235 s 144.356 ms (13.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.216 s 124.868 ms (11.4%)
Agent iast_TELEMETRY_OFF 1.215 s 123.513 ms (11.3%)
Total tracing 8.655 s -
Total iast 9.238 s 583.629 ms (6.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.169 s 514.824 ms (5.9%)
Total iast_TELEMETRY_OFF 9.175 s 520.222 ms (6.0%)
gantt
    title insecure-bank - break down per module: candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (696.202 ms) : 0, 696202
BytebuddyAgent [candidate] (694.615 ms) : 0, 694615
GlobalTracer [baseline] (317.42 ms) : 0, 317420
GlobalTracer [candidate] (318.121 ms) : 0, 318121
AppSec [baseline] (54.861 ms) : 0, 54861
AppSec [candidate] (54.858 ms) : 0, 54858
Remote Config [baseline] (684.781 µs) : 0, 685
Remote Config [candidate] (688.247 µs) : 0, 688
Telemetry [baseline] (11.404 ms) : 0, 11404
Telemetry [candidate] (9.116 ms) : 0, 9116
section iast
BytebuddyAgent [baseline] (810.48 ms) : 0, 810480
BytebuddyAgent [candidate] (824.462 ms) : 0, 824462
GlobalTracer [baseline] (304.65 ms) : 0, 304650
GlobalTracer [candidate] (309.801 ms) : 0, 309801
AppSec [baseline] (57.312 ms) : 0, 57312
AppSec [candidate] (58.202 ms) : 0, 58202
IAST [baseline] (21.64 ms) : 0, 21640
IAST [candidate] (20.789 ms) : 0, 20789
Remote Config [baseline] (645.984 µs) : 0, 646
Remote Config [candidate] (629.282 µs) : 0, 629
Telemetry [baseline] (7.518 ms) : 0, 7518
Telemetry [candidate] (7.543 ms) : 0, 7543
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (809.965 ms) : 0, 809965
BytebuddyAgent [candidate] (809.809 ms) : 0, 809809
GlobalTracer [baseline] (305.496 ms) : 0, 305496
GlobalTracer [candidate] (305.361 ms) : 0, 305361
AppSec [baseline] (57.693 ms) : 0, 57693
AppSec [candidate] (57.913 ms) : 0, 57913
IAST [baseline] (20.921 ms) : 0, 20921
IAST [candidate] (21.04 ms) : 0, 21040
Remote Config [baseline] (645.74 µs) : 0, 646
Remote Config [candidate] (637.672 µs) : 0, 638
Telemetry [baseline] (7.517 ms) : 0, 7517
Telemetry [candidate] (7.538 ms) : 0, 7538
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (808.816 ms) : 0, 808816
BytebuddyAgent [candidate] (808.162 ms) : 0, 808162
GlobalTracer [baseline] (305.455 ms) : 0, 305455
GlobalTracer [candidate] (306.957 ms) : 0, 306957
AppSec [baseline] (57.238 ms) : 0, 57238
AppSec [candidate] (57.62 ms) : 0, 57620
IAST [baseline] (21.336 ms) : 0, 21336
IAST [candidate] (20.202 ms) : 0, 20202
Remote Config [baseline] (620.345 µs) : 0, 620
Remote Config [candidate] (601.522 µs) : 0, 602
Telemetry [baseline] (7.428 ms) : 0, 7428
Telemetry [candidate] (7.364 ms) : 0, 7364
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-11-29T07:54:37 2024-11-29T08:01:38
git_branch master dougqh/crash-tracking-in-smoke-tests
git_commit_date 1732864000 1732866191
git_commit_sha 896dd6b e97ef02
release_version 1.44.0-SNAPSHOT~896dd6b380 1.44.0-SNAPSHOT~e97ef02b4c
start_time 2024-11-29T07:54:23 2024-11-29T08:01:24
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1732867654 1732867654
ci_job_id 723245390 723245390
ci_pipeline_id 50131595 50131595
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 13 metrics, 15 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.36 ms) : 1340, 1379
.   : milestone, 1360,
appsec (1.756 ms) : 1731, 1782
.   : milestone, 1756,
appsec_no_iast (1.764 ms) : 1739, 1788
.   : milestone, 1764,
iast (1.505 ms) : 1483, 1527
.   : milestone, 1505,
profiling (1.578 ms) : 1553, 1602
.   : milestone, 1578,
tracing (1.509 ms) : 1482, 1537
.   : milestone, 1509,
section candidate
no_agent (1.363 ms) : 1343, 1382
.   : milestone, 1363,
appsec (1.76 ms) : 1735, 1785
.   : milestone, 1760,
appsec_no_iast (1.747 ms) : 1722, 1772
.   : milestone, 1747,
iast (1.501 ms) : 1478, 1524
.   : milestone, 1501,
profiling (1.585 ms) : 1560, 1609
.   : milestone, 1585,
tracing (1.498 ms) : 1474, 1523
.   : milestone, 1498,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.36 ms [1.34 ms, 1.379 ms] -
appsec 1.756 ms [1.731 ms, 1.782 ms] 396.52 µs (29.2%)
appsec_no_iast 1.764 ms [1.739 ms, 1.788 ms] 404.191 µs (29.7%)
iast 1.505 ms [1.483 ms, 1.527 ms] 145.68 µs (10.7%)
profiling 1.578 ms [1.553 ms, 1.602 ms] 217.924 µs (16.0%)
tracing 1.509 ms [1.482 ms, 1.537 ms] 149.747 µs (11.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.363 ms [1.343 ms, 1.382 ms] -
appsec 1.76 ms [1.735 ms, 1.785 ms] 397.559 µs (29.2%)
appsec_no_iast 1.747 ms [1.722 ms, 1.772 ms] 384.343 µs (28.2%)
iast 1.501 ms [1.478 ms, 1.524 ms] 138.847 µs (10.2%)
profiling 1.585 ms [1.56 ms, 1.609 ms] 222.315 µs (16.3%)
tracing 1.498 ms [1.474 ms, 1.523 ms] 135.763 µs (10.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380
    dateFormat X
    axisFormat %s
section baseline
no_agent (376.943 µs) : 357, 397
.   : milestone, 377,
iast (505.636 µs) : 483, 528
.   : milestone, 506,
iast_FULL (659.517 µs) : 638, 681
.   : milestone, 660,
iast_GLOBAL (521.62 µs) : 500, 543
.   : milestone, 522,
iast_HARDCODED_SECRET_DISABLED (495.82 µs) : 475, 517
.   : milestone, 496,
iast_INACTIVE (457.859 µs) : 437, 479
.   : milestone, 458,
iast_TELEMETRY_OFF (485.01 µs) : 463, 507
.   : milestone, 485,
tracing (451.093 µs) : 431, 472
.   : milestone, 451,
section candidate
no_agent (381.114 µs) : 361, 401
.   : milestone, 381,
iast (507.218 µs) : 484, 530
.   : milestone, 507,
iast_FULL (658.829 µs) : 637, 680
.   : milestone, 659,
iast_GLOBAL (521.404 µs) : 500, 543
.   : milestone, 521,
iast_HARDCODED_SECRET_DISABLED (494.051 µs) : 473, 515
.   : milestone, 494,
iast_INACTIVE (453.189 µs) : 432, 474
.   : milestone, 453,
iast_TELEMETRY_OFF (481.536 µs) : 460, 503
.   : milestone, 482,
tracing (451.67 µs) : 431, 473
.   : milestone, 452,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 376.943 µs [356.762 µs, 397.123 µs] -
iast 505.636 µs [483.389 µs, 527.883 µs] 128.693 µs (34.1%)
iast_FULL 659.517 µs [637.927 µs, 681.108 µs] 282.575 µs (75.0%)
iast_GLOBAL 521.62 µs [500.321 µs, 542.919 µs] 144.678 µs (38.4%)
iast_HARDCODED_SECRET_DISABLED 495.82 µs [474.591 µs, 517.049 µs] 118.877 µs (31.5%)
iast_INACTIVE 457.859 µs [437.202 µs, 478.516 µs] 80.916 µs (21.5%)
iast_TELEMETRY_OFF 485.01 µs [463.317 µs, 506.703 µs] 108.067 µs (28.7%)
tracing 451.093 µs [430.645 µs, 471.541 µs] 74.151 µs (19.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 381.114 µs [361.237 µs, 400.992 µs] -
iast 507.218 µs [484.354 µs, 530.082 µs] 126.104 µs (33.1%)
iast_FULL 658.829 µs [637.356 µs, 680.301 µs] 277.715 µs (72.9%)
iast_GLOBAL 521.404 µs [499.627 µs, 543.18 µs] 140.289 µs (36.8%)
iast_HARDCODED_SECRET_DISABLED 494.051 µs [472.76 µs, 515.342 µs] 112.936 µs (29.6%)
iast_INACTIVE 453.189 µs [432.485 µs, 473.892 µs] 72.075 µs (18.9%)
iast_TELEMETRY_OFF 481.536 µs [460.382 µs, 502.69 µs] 100.422 µs (26.3%)
tracing 451.67 µs [430.779 µs, 472.56 µs] 70.555 µs (18.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/crash-tracking-in-smoke-tests
git_commit_date 1732864000 1732866191
git_commit_sha 896dd6b e97ef02
release_version 1.44.0-SNAPSHOT~896dd6b380 1.44.0-SNAPSHOT~e97ef02b4c
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1732868203 1732868203
ci_job_id 723245391 723245391
ci_pipeline_id 50131595 50131595
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.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.467 ms) : 1455, 1478
.   : milestone, 1467,
appsec (2.335 ms) : 2293, 2376
.   : milestone, 2335,
iast (2.091 ms) : 2038, 2144
.   : milestone, 2091,
iast_GLOBAL (2.131 ms) : 2078, 2185
.   : milestone, 2131,
profiling (1.952 ms) : 1910, 1994
.   : milestone, 1952,
tracing (1.929 ms) : 1889, 1970
.   : milestone, 1929,
section candidate
no_agent (1.467 ms) : 1456, 1479
.   : milestone, 1467,
appsec (2.346 ms) : 2304, 2387
.   : milestone, 2346,
iast (2.08 ms) : 2027, 2132
.   : milestone, 2080,
iast_GLOBAL (2.12 ms) : 2068, 2173
.   : milestone, 2120,
profiling (1.965 ms) : 1922, 2008
.   : milestone, 1965,
tracing (1.92 ms) : 1880, 1960
.   : milestone, 1920,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.455 ms, 1.478 ms] -
appsec 2.335 ms [2.293 ms, 2.376 ms] 868.143 µs (59.2%)
iast 2.091 ms [2.038 ms, 2.144 ms] 624.369 µs (42.6%)
iast_GLOBAL 2.131 ms [2.078 ms, 2.185 ms] 664.867 µs (45.3%)
profiling 1.952 ms [1.91 ms, 1.994 ms] 485.774 µs (33.1%)
tracing 1.929 ms [1.889 ms, 1.97 ms] 462.879 µs (31.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.479 ms] -
appsec 2.346 ms [2.304 ms, 2.387 ms] 878.288 µs (59.9%)
iast 2.08 ms [2.027 ms, 2.132 ms] 612.671 µs (41.8%)
iast_GLOBAL 2.12 ms [2.068 ms, 2.173 ms] 653.202 µs (44.5%)
profiling 1.965 ms [1.922 ms, 2.008 ms] 497.875 µs (33.9%)
tracing 1.92 ms [1.88 ms, 1.96 ms] 453.192 µs (30.9%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~e97ef02b4c, baseline=1.44.0-SNAPSHOT~896dd6b380
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.954 s) : 14954000, 14954000
.   : milestone, 14954000,
appsec (14.852 s) : 14852000, 14852000
.   : milestone, 14852000,
iast (18.79 s) : 18790000, 18790000
.   : milestone, 18790000,
iast_GLOBAL (17.778 s) : 17778000, 17778000
.   : milestone, 17778000,
profiling (15.013 s) : 15013000, 15013000
.   : milestone, 15013000,
tracing (15.021 s) : 15021000, 15021000
.   : milestone, 15021000,
section candidate
no_agent (15.242 s) : 15242000, 15242000
.   : milestone, 15242000,
appsec (15.041 s) : 15041000, 15041000
.   : milestone, 15041000,
iast (18.906 s) : 18906000, 18906000
.   : milestone, 18906000,
iast_GLOBAL (17.702 s) : 17702000, 17702000
.   : milestone, 17702000,
profiling (15.509 s) : 15509000, 15509000
.   : milestone, 15509000,
tracing (14.953 s) : 14953000, 14953000
.   : milestone, 14953000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.954 s [14.954 s, 14.954 s] -
appsec 14.852 s [14.852 s, 14.852 s] -102.0 ms (-0.7%)
iast 18.79 s [18.79 s, 18.79 s] 3.836 s (25.7%)
iast_GLOBAL 17.778 s [17.778 s, 17.778 s] 2.824 s (18.9%)
profiling 15.013 s [15.013 s, 15.013 s] 59.0 ms (0.4%)
tracing 15.021 s [15.021 s, 15.021 s] 67.0 ms (0.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.242 s [15.242 s, 15.242 s] -
appsec 15.041 s [15.041 s, 15.041 s] -201.0 ms (-1.3%)
iast 18.906 s [18.906 s, 18.906 s] 3.664 s (24.0%)
iast_GLOBAL 17.702 s [17.702 s, 17.702 s] 2.46 s (16.1%)
profiling 15.509 s [15.509 s, 15.509 s] 267.0 ms (1.8%)
tracing 14.953 s [14.953 s, 14.953 s] -289.0 ms (-1.9%)

@dougqh dougqh requested a review from a team as a code owner November 19, 2024 15:02
@dougqh dougqh requested review from smola and Mariovido November 19, 2024 15:02
@dougqh dougqh changed the title [DRAFT] Adding crash tracking to integration tests Adding crash tracking to integration tests Nov 19, 2024
Copy link
Contributor

github-actions bot commented Nov 19, 2024

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.

@@ -115,7 +115,17 @@ public static void waitForPortToOpen(
}

if (!process.isAlive()) {
throw new RuntimeException("Process died before port " + port + " was opened");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made various improvements to the harness itself to make debugging process that exit abnormally easier

@@ -22,6 +22,16 @@ abstract class AbstractIastServerSmokeTest extends AbstractServerSmokeTest {
@Shared
private final JsonSlurper jsonSlurper = new JsonSlurper()

@Override
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have reservations about this.

I haven't yet figured out how to make crash tracking play nice with the tests that build up JAVA_TOOL_OPTIONS. The quoting of the OnError value works as desired when passed as normal argument, but doesn't work when concatenated into a single env var for JAVA_TOOL_OPTIONS.

I'm planning on revisiting this in a subsequent pull request.


try {
PortUtils.waitForPortToOpen(port, 240, TimeUnit.SECONDS, process)
} catch ( Exception e ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding log information to make debug processes failing to start easier for the next person

try {
verifyLog(idx, outputFile)
} catch ( FileNotFoundException e ) {
if ( !testedProcesses[idx].isAlive() && testedProcesses[idx].exitValue() == 0 ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the comment says, suppressing FileNotFoundException from tracer output in the event that the process exited abnormally

It was just making the test output noisy and more confusing

Copy link
Contributor

Choose a reason for hiding this comment

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

If the process exited normally but produce no logs, we will no more run isAcceptable to check for the expected output. Isn't an issue?

Copy link
Contributor Author

@dougqh dougqh Nov 22, 2024

Choose a reason for hiding this comment

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

Correction; it is doing what I intended. It propagates the exception, but only if the process exited normally.

If the process exited abnormally, then I skip propagate the exception because no output is kind of expected at that point.

I'll this is a questionable change, since Spock does a decent job of the reporting the original issue first. So I'm happy to forego this change if that's what we prefer.


// DQH - 13 Nov 2024 - Crashtracking bash script doesn't work on OS X,
// so skipping crash tracking on OS X
if (addCrashTracking() && !Platform.isJ9() && !Platform.isMac()) {
Copy link
Contributor Author

@dougqh dougqh Nov 19, 2024

Choose a reason for hiding this comment

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

Currently, not adding crash tracking for J9 or Mac.
Once we make the bash script used by crash tracking compatible with Mac's ancient bash, we can revisit this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you have a look at this PR #7956 to check if it fixes your issue with Mac?

Copy link
Contributor

Choose a reason for hiding this comment

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

For J9 we don't have the specific JVM args as well as the J9 crash log parser yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

#7956 is merged. Would you like give it a try and check if we can then enable crash tracking on our dev environment too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I'll see if I can enable the mac support now.

@dougqh dougqh added the comp: testing Testing label Nov 19, 2024
Copy link
Contributor

@ygree ygree left a comment

Choose a reason for hiding this comment

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

LGTM

@PerfectSlayer
Copy link
Contributor

I cherry-picked #8031 until it gets merged and want to test in CI how it behaves.
I will keep investing issues with IAST in the same time.

@PerfectSlayer PerfectSlayer force-pushed the dougqh/crash-tracking-in-smoke-tests branch from 10f32e7 to 25ae4bb Compare November 28, 2024 17:34
@PerfectSlayer PerfectSlayer requested a review from a team as a code owner November 28, 2024 17:34
@PerfectSlayer PerfectSlayer requested review from a team as code owners November 28, 2024 17:34
@PerfectSlayer PerfectSlayer requested review from evanchooly and juan-fernandez and removed request for a team November 28, 2024 17:34
@pr-commenter
Copy link

pr-commenter bot commented Nov 28, 2024

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1732819605 1732819992
end_time 2024-11-28T18:48:02 2024-11-28T18:54:28
git_branch master dougqh/crash-tracking-in-smoke-tests
git_commit_sha 508c314 37ec50d
start_time 2024-11-28T18:46:46 2024-11-28T18:53:13
See matching parameters
Baseline Candidate
ci_job_id 723120791 723120791
ci_pipeline_id 50122245 50122245
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1732819031 1732819031

Summary

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

scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:loop better
[-555.031µs; -487.569µs] or [-5.188%; -4.557%]
better
[-562.839µs; -463.520µs] or [-5.176%; -4.262%]
better
[-558.156µs; -436.940µs] or [-5.099%; -3.992%]
better
[-719.457µs; -346.912µs] or [-6.361%; -3.067%]
better
[+3.072op/s; +5.586op/s] or [+3.379%; +6.145%]
See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-43.908µs; +24.923µs] or [-15.878%; +9.013%]
unstable
[-61.779µs; +30.751µs] or [-19.305%; +9.609%]
unstable
[-74.689µs; +38.916µs] or [-22.261%; +11.599%]
unstable
[-541.014µs; +194.771µs] or [-70.890%; +25.521%]
same
scenario:basic same same same unstable
[-52.333µs; +46.089µs] or [-9.720%; +8.560%]
unstable
[-99.142op/s; +227.347op/s] or [-3.966%; +9.094%]
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (320.012 µs) : 264, 376
.   : milestone, 320,
basic (310.719 µs) : 296, 326
.   : milestone, 311,
loop (10.875 ms) : 10827, 10923
.   : milestone, 10875,
section candidate
noprobe (304.497 µs) : 276, 333
.   : milestone, 304,
basic (309.451 µs) : 299, 320
.   : milestone, 309,
loop (10.362 ms) : 10318, 10406
.   : milestone, 10362,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 320.012 µs [264.475 µs, 375.548 µs]
basic 310.719 µs [295.825 µs, 325.613 µs]
loop 10.875 ms [10.827 ms, 10.923 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 304.497 µs [276.111 µs, 332.884 µs]
basic 309.451 µs [298.843 µs, 320.06 µs]
loop 10.362 ms [10.318 ms, 10.406 ms]

@pr-commenter
Copy link

pr-commenter bot commented Nov 28, 2024

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/crash-tracking-in-smoke-tests
git_commit_date 1732562600 1732819031
git_commit_sha 224dc1b 37ec50d
See matching parameters
Baseline Candidate
ci_job_date 1732820078 1732820078
ci_job_id 723120787 723120787
ci_pipeline_id 50122245 50122245
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@pr-commenter
Copy link

pr-commenter bot commented Nov 28, 2024

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/crash-tracking-in-smoke-tests
git_commit_date 1732562600 1732819031
git_commit_sha 224dc1b 37ec50d
See matching parameters
Baseline Candidate
ci_job_date 1732820122 1732820122
ci_job_id 723120789 723120789
ci_pipeline_id 50122245 50122245
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@PerfectSlayer PerfectSlayer force-pushed the dougqh/crash-tracking-in-smoke-tests branch from 37ec50d to 2999fe6 Compare November 29, 2024 07:31
* Excluding J9
* Improving PortUtils to exitCode when process ends abnormally
* Improving error reporting when process fails to start
  Wrapped PortUtils.waitForPortToOpen with exception handling, when exception is raised log file indicating error is added to exception message
* Suppressed FileNotException in cleanUpSpec, when process exits abormally since no file is expected and it creates noise
* Clarifying exception message
* Refining exception suppression, some tests clean-up with test processes still running?
* Adding ability to selectively suppress crash tracking
* Adding some sanity checks that test processes are up and running as expected
* Reworking exception handling logic around verifyLog
* Modifying exception handling logic around verifyLog in response to review feedback
* When process is alive or exited normally, the exception flows through as is
* When process exited abnormally, the exception is wrapped in another exception that indicates the abnormal termination
@PerfectSlayer PerfectSlayer force-pushed the dougqh/crash-tracking-in-smoke-tests branch from 2999fe6 to e97ef02 Compare November 29, 2024 07:44
@PerfectSlayer
Copy link
Contributor

I fixed any issue with MacOS shell and JAVA_TOOL_OPTIONS.
So I rewrote the git history only to the needed changes (3 classes changes for better debugging, plus 1 for enabling crash tracking), removed the merge commit and rebase on top of master for clarity.

Other than J9, there is no more exception in place.
I will now merge it.

@PerfectSlayer PerfectSlayer merged commit b1bfb13 into master Nov 29, 2024
157 checks passed
@PerfectSlayer PerfectSlayer deleted the dougqh/crash-tracking-in-smoke-tests branch November 29, 2024 10:21
@github-actions github-actions bot added this to the 1.44.0 milestone Nov 29, 2024
@PerfectSlayer PerfectSlayer added the tag: no release notes Changes to exclude from release notes label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: testing Testing run-tests: ibm8 Run tests using IBM 8 JDK run-tests: oracle8 Run tests using Oracle 8 JDK run-tests: semeru8 Run tests using Semuru 8 JDK run-tests: semeru11 Run tests using Sumuru 11 JDK run-tests: semeru17 Run tests using Sumuru 17 JDK run-tests: ubuntu17 Run tests using Ubuntu 17 JDK run-tests: zulu8 Run tests using Zulu 8 JDK run-tests: zulu11 Run tests using Zulu 11 JDK tag: no release notes Changes to exclude from release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants