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

Replace UUID.randomUUID() with RandomUtils.randomUUID() #8267

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented Jan 22, 2025

Motivation

This avoids a potential side-effect of loading java.util.logging too early when the Amazon Corretto Crypto Provider (ACCP) is plugged into SecureRandom

Contributor Checklist

Jira ticket: APMS-14233

@mcculls mcculls force-pushed the mcculls/avoid-stock-randomUUID branch from 6d43df3 to 1e36f12 Compare January 22, 2025 13:11
@pr-commenter
Copy link

pr-commenter bot commented Jan 22, 2025

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1737647756 1737648128
end_time 2025-01-23T15:57:12 2025-01-23T16:03:25
git_branch master mcculls/avoid-stock-randomUUID
git_commit_sha 991929d ee94149
start_time 2025-01-23T15:55:57 2025-01-23T16:02:09
See matching parameters
Baseline Candidate
ci_job_id 777961348 777961348
ci_pipeline_id 53811324 53811324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1737647082 1737647082

Summary

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

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
[-16.725µs; +33.966µs] or [-6.284%; +12.762%]
unstable
[-27.099µs; +45.331µs] or [-8.862%; +14.824%]
unstable
[-38.046µs; +57.054µs] or [-11.875%; +17.807%]
unstable
[-101.321µs; +97.704µs] or [-17.279%; +16.663%]
same
scenario:basic same same same unstable
[-55.247µs; +25.740µs] or [-10.361%; +4.827%]
unstable
[-134.013op/s; +134.013op/s] or [-5.226%; +5.226%]
scenario:loop unsure
[+1.904µs; +16.561µs] or [+0.019%; +0.166%]
same same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (305.787 µs) : 275, 337
.   : milestone, 306,
basic (302.979 µs) : 293, 313
.   : milestone, 303,
loop (10.14 ms) : 10105, 10176
.   : milestone, 10140,
section candidate
noprobe (314.903 µs) : 277, 353
.   : milestone, 315,
basic (306.728 µs) : 298, 316
.   : milestone, 307,
loop (10.159 ms) : 10119, 10199
.   : milestone, 10159,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 305.787 µs [274.98 µs, 336.595 µs]
basic 302.979 µs [292.515 µs, 313.443 µs]
loop 10.14 ms [10.105 ms, 10.176 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 314.903 µs [277.024 µs, 352.782 µs]
basic 306.728 µs [297.567 µs, 315.888 µs]
loop 10.159 ms [10.119 ms, 10.199 ms]

@pr-commenter
Copy link

pr-commenter bot commented Jan 22, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/avoid-stock-randomUUID
git_commit_date 1737645585 1737647082
git_commit_sha 991929d ee94149
release_version 1.46.0-SNAPSHOT~991929d244 1.46.0-SNAPSHOT~ee941491a0
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737649508 1737649508
ci_job_id 777961342 777961342
ci_pipeline_id 53811324 53811324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-fgow3nxt-project-304-concurrent-0-f1knv76w 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-fgow3nxt-project-304-concurrent-0-f1knv76w 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

Found 7 performance improvements and 1 performance regressions! Performance is the same for 51 metrics, 4 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:GlobalTracer better
[-17.002ms; -15.372ms] or [-6.886%; -6.226%]
230.718ms 246.905ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:GlobalTracer better
[-17.803ms; -15.822ms] or [-7.229%; -6.424%]
229.472ms 246.285ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:GlobalTracer better
[-17.865ms; -10.348ms] or [-7.260%; -4.205%]
231.971ms 246.078ms
scenario:startup:insecure-bank:tracing:GlobalTracer better
[-16.886ms; -8.691ms] or [-6.623%; -3.409%]
242.170ms 254.959ms
scenario:startup:petclinic:appsec:GlobalTracer better
[-17.642ms; -11.452ms] or [-6.987%; -4.535%]
237.959ms 252.506ms
scenario:startup:petclinic:appsec:AppSec worse
[+3.723ms; +6.841ms] or [+2.178%; +4.002%]
176.237ms 170.955ms
scenario:startup:petclinic:iast:GlobalTracer better
[-17.867ms; -12.961ms] or [-7.238%; -5.251%]
231.418ms 246.832ms
scenario:startup:petclinic:tracing:GlobalTracer better
[-17.670ms; -11.555ms] or [-6.907%; -4.517%]
241.208ms 255.820ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055445
Total [baseline] (8.632 s) : 0, 8631642
Agent [candidate] (1.05 s) : 0, 1049774
Total [candidate] (8.69 s) : 0, 8689744
section iast
Agent [baseline] (1.185 s) : 0, 1184575
Total [baseline] (9.218 s) : 0, 9217629
Agent [candidate] (1.171 s) : 0, 1171380
Total [candidate] (9.222 s) : 0, 9222173
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.183 s) : 0, 1183272
Total [baseline] (9.211 s) : 0, 9211277
Agent [candidate] (1.168 s) : 0, 1167526
Total [candidate] (9.19 s) : 0, 9189928
section iast_TELEMETRY_OFF
Agent [baseline] (1.18 s) : 0, 1179830
Total [baseline] (9.201 s) : 0, 9201254
Agent [candidate] (1.18 s) : 0, 1179669
Total [candidate] (9.282 s) : 0, 9281615
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.055 s -
Agent iast 1.185 s 129.13 ms (12.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.183 s 127.827 ms (12.1%)
Agent iast_TELEMETRY_OFF 1.18 s 124.385 ms (11.8%)
Total tracing 8.632 s -
Total iast 9.218 s 585.987 ms (6.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.211 s 579.636 ms (6.7%)
Total iast_TELEMETRY_OFF 9.201 s 569.612 ms (6.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.05 s -
Agent iast 1.171 s 121.607 ms (11.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.168 s 117.752 ms (11.2%)
Agent iast_TELEMETRY_OFF 1.18 s 129.895 ms (12.4%)
Total tracing 8.69 s -
Total iast 9.222 s 532.43 ms (6.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.19 s 500.185 ms (5.8%)
Total iast_TELEMETRY_OFF 9.282 s 591.872 ms (6.8%)
gantt
    title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.731 ms) : 0, 713731
BytebuddyAgent [candidate] (724.62 ms) : 0, 724620
GlobalTracer [baseline] (254.959 ms) : 0, 254959
GlobalTracer [candidate] (242.17 ms) : 0, 242170
AppSec [baseline] (55.374 ms) : 0, 55374
AppSec [candidate] (56.128 ms) : 0, 56128
Remote Config [baseline] (741.345 µs) : 0, 741
Remote Config [candidate] (733.384 µs) : 0, 733
Telemetry [baseline] (15.681 ms) : 0, 15681
Telemetry [candidate] (10.89 ms) : 0, 10890
section iast
BytebuddyAgent [baseline] (833.307 ms) : 0, 833307
BytebuddyAgent [candidate] (835.978 ms) : 0, 835978
GlobalTracer [baseline] (246.905 ms) : 0, 246905
GlobalTracer [candidate] (230.718 ms) : 0, 230718
AppSec [baseline] (58.42 ms) : 0, 58420
AppSec [candidate] (58.671 ms) : 0, 58671
Remote Config [baseline] (674.476 µs) : 0, 674
Remote Config [candidate] (664.952 µs) : 0, 665
Telemetry [baseline] (8.806 ms) : 0, 8806
Telemetry [candidate] (8.776 ms) : 0, 8776
IAST [baseline] (21.456 ms) : 0, 21456
IAST [candidate] (21.437 ms) : 0, 21437
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (832.768 ms) : 0, 832768
BytebuddyAgent [candidate] (833.481 ms) : 0, 833481
GlobalTracer [baseline] (246.285 ms) : 0, 246285
GlobalTracer [candidate] (229.472 ms) : 0, 229472
AppSec [baseline] (58.227 ms) : 0, 58227
AppSec [candidate] (58.441 ms) : 0, 58441
Remote Config [baseline] (682.709 µs) : 0, 683
Remote Config [candidate] (677.615 µs) : 0, 678
Telemetry [baseline] (8.793 ms) : 0, 8793
Telemetry [candidate] (8.831 ms) : 0, 8831
IAST [baseline] (21.463 ms) : 0, 21463
IAST [candidate] (21.535 ms) : 0, 21535
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (830.676 ms) : 0, 830676
BytebuddyAgent [candidate] (843.131 ms) : 0, 843131
GlobalTracer [baseline] (246.078 ms) : 0, 246078
GlobalTracer [candidate] (231.971 ms) : 0, 231971
AppSec [baseline] (57.902 ms) : 0, 57902
AppSec [candidate] (58.504 ms) : 0, 58504
Remote Config [baseline] (669.639 µs) : 0, 670
Remote Config [candidate] (657.642 µs) : 0, 658
Telemetry [baseline] (8.687 ms) : 0, 8687
Telemetry [candidate] (8.815 ms) : 0, 8815
IAST [baseline] (20.811 ms) : 0, 20811
IAST [candidate] (21.324 ms) : 0, 21324
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056474
Total [baseline] (10.416 s) : 0, 10416080
Agent [candidate] (1.049 s) : 0, 1048855
Total [candidate] (10.511 s) : 0, 10510576
section appsec
Agent [baseline] (1.189 s) : 0, 1189005
Total [baseline] (10.759 s) : 0, 10759150
Agent [candidate] (1.184 s) : 0, 1184156
Total [candidate] (10.788 s) : 0, 10787673
section iast
Agent [baseline] (1.184 s) : 0, 1184318
Total [baseline] (10.98 s) : 0, 10979594
Agent [candidate] (1.184 s) : 0, 1184298
Total [candidate] (11.015 s) : 0, 11015230
section profiling
Agent [baseline] (1.255 s) : 0, 1254852
Total [baseline] (10.92 s) : 0, 10920005
Agent [candidate] (1.258 s) : 0, 1258039
Total [candidate] (10.829 s) : 0, 10829345
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent appsec 1.189 s 132.532 ms (12.5%)
Agent iast 1.184 s 127.845 ms (12.1%)
Agent profiling 1.255 s 198.378 ms (18.8%)
Total tracing 10.416 s -
Total appsec 10.759 s 343.071 ms (3.3%)
Total iast 10.98 s 563.514 ms (5.4%)
Total profiling 10.92 s 503.925 ms (4.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent appsec 1.184 s 135.3 ms (12.9%)
Agent iast 1.184 s 135.443 ms (12.9%)
Agent profiling 1.258 s 209.184 ms (19.9%)
Total tracing 10.511 s -
Total appsec 10.788 s 277.097 ms (2.6%)
Total iast 11.015 s 504.654 ms (4.8%)
Total profiling 10.829 s 318.769 ms (3.0%)
gantt
    title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.695 ms) : 0, 715695
BytebuddyAgent [candidate] (722.68 ms) : 0, 722680
GlobalTracer [baseline] (255.82 ms) : 0, 255820
GlobalTracer [candidate] (241.208 ms) : 0, 241208
AppSec [baseline] (57.162 ms) : 0, 57162
AppSec [candidate] (56.015 ms) : 0, 56015
Remote Config [baseline] (740.058 µs) : 0, 740
Remote Config [candidate] (724.92 µs) : 0, 725
Telemetry [baseline] (12.129 ms) : 0, 12129
Telemetry [candidate] (13.012 ms) : 0, 13012
section appsec
BytebuddyAgent [baseline] (731.7 ms) : 0, 731700
BytebuddyAgent [candidate] (736.034 ms) : 0, 736034
GlobalTracer [baseline] (252.506 ms) : 0, 252506
GlobalTracer [candidate] (237.959 ms) : 0, 237959
AppSec [baseline] (170.955 ms) : 0, 170955
AppSec [candidate] (176.237 ms) : 0, 176237
Remote Config [baseline] (666.001 µs) : 0, 666
Remote Config [candidate] (669.064 µs) : 0, 669
Telemetry [baseline] (8.537 ms) : 0, 8537
Telemetry [candidate] (8.577 ms) : 0, 8577
IAST [baseline] (19.298 ms) : 0, 19298
IAST [candidate] (19.222 ms) : 0, 19222
section iast
BytebuddyAgent [baseline] (833.046 ms) : 0, 833046
BytebuddyAgent [candidate] (847.638 ms) : 0, 847638
GlobalTracer [baseline] (246.832 ms) : 0, 246832
GlobalTracer [candidate] (231.418 ms) : 0, 231418
AppSec [baseline] (58.335 ms) : 0, 58335
AppSec [candidate] (58.868 ms) : 0, 58868
Remote Config [baseline] (676.612 µs) : 0, 677
Remote Config [candidate] (664.152 µs) : 0, 664
Telemetry [baseline] (8.787 ms) : 0, 8787
Telemetry [candidate] (8.917 ms) : 0, 8917
IAST [baseline] (21.598 ms) : 0, 21598
IAST [candidate] (21.526 ms) : 0, 21526
section profiling
BytebuddyAgent [baseline] (702.698 ms) : 0, 702698
BytebuddyAgent [candidate] (707.866 ms) : 0, 707866
GlobalTracer [baseline] (348.709 ms) : 0, 348709
GlobalTracer [candidate] (349.229 ms) : 0, 349229
AppSec [baseline] (55.547 ms) : 0, 55547
AppSec [candidate] (53.973 ms) : 0, 53973
Remote Config [baseline] (732.32 µs) : 0, 732
Remote Config [candidate] (720.802 µs) : 0, 721
Telemetry [baseline] (8.848 ms) : 0, 8848
Telemetry [candidate] (8.74 ms) : 0, 8740
ProfilingAgent [baseline] (96.317 ms) : 0, 96317
ProfilingAgent [candidate] (95.188 ms) : 0, 95188
Profiling [baseline] (96.342 ms) : 0, 96342
Profiling [candidate] (95.212 ms) : 0, 95212
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-23T15:55:02 2025-01-23T16:02:06
git_branch master mcculls/avoid-stock-randomUUID
git_commit_date 1737645585 1737647082
git_commit_sha 991929d ee94149
release_version 1.46.0-SNAPSHOT~991929d244 1.46.0-SNAPSHOT~ee941491a0
start_time 2025-01-23T15:54:49 2025-01-23T16:01:52
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737648484 1737648484
ci_job_id 777961343 777961343
ci_pipeline_id 53811324 53811324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-fgow3nxt-project-304-concurrent-1-14uva9c7 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-fgow3nxt-project-304-concurrent-1-14uva9c7 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

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

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244
    dateFormat X
    axisFormat %s
section baseline
no_agent (379.872 µs) : 360, 399
.   : milestone, 380,
iast (503.956 µs) : 482, 526
.   : milestone, 504,
iast_FULL (745.583 µs) : 723, 768
.   : milestone, 746,
iast_GLOBAL (557.562 µs) : 535, 580
.   : milestone, 558,
iast_HARDCODED_SECRET_DISABLED (510.489 µs) : 489, 532
.   : milestone, 510,
iast_INACTIVE (455.665 µs) : 434, 477
.   : milestone, 456,
iast_TELEMETRY_OFF (493.219 µs) : 472, 515
.   : milestone, 493,
tracing (458.04 µs) : 437, 479
.   : milestone, 458,
section candidate
no_agent (381.437 µs) : 360, 403
.   : milestone, 381,
iast (508.145 µs) : 485, 532
.   : milestone, 508,
iast_FULL (747.117 µs) : 725, 769
.   : milestone, 747,
iast_GLOBAL (558.549 µs) : 535, 583
.   : milestone, 559,
iast_HARDCODED_SECRET_DISABLED (511.008 µs) : 489, 533
.   : milestone, 511,
iast_INACTIVE (455.898 µs) : 435, 477
.   : milestone, 456,
iast_TELEMETRY_OFF (500.521 µs) : 477, 524
.   : milestone, 501,
tracing (455.757 µs) : 435, 477
.   : milestone, 456,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 379.872 µs [360.321 µs, 399.422 µs] -
iast 503.956 µs [482.281 µs, 525.63 µs] 124.084 µs (32.7%)
iast_FULL 745.583 µs [723.374 µs, 767.791 µs] 365.711 µs (96.3%)
iast_GLOBAL 557.562 µs [535.15 µs, 579.974 µs] 177.69 µs (46.8%)
iast_HARDCODED_SECRET_DISABLED 510.489 µs [489.094 µs, 531.884 µs] 130.618 µs (34.4%)
iast_INACTIVE 455.665 µs [434.422 µs, 476.907 µs] 75.793 µs (20.0%)
iast_TELEMETRY_OFF 493.219 µs [471.636 µs, 514.802 µs] 113.348 µs (29.8%)
tracing 458.04 µs [436.664 µs, 479.416 µs] 78.168 µs (20.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 381.437 µs [359.6 µs, 403.274 µs] -
iast 508.145 µs [484.615 µs, 531.675 µs] 126.708 µs (33.2%)
iast_FULL 747.117 µs [725.254 µs, 768.98 µs] 365.68 µs (95.9%)
iast_GLOBAL 558.549 µs [534.53 µs, 582.569 µs] 177.112 µs (46.4%)
iast_HARDCODED_SECRET_DISABLED 511.008 µs [488.662 µs, 533.354 µs] 129.571 µs (34.0%)
iast_INACTIVE 455.898 µs [434.618 µs, 477.178 µs] 74.461 µs (19.5%)
iast_TELEMETRY_OFF 500.521 µs [476.957 µs, 524.086 µs] 119.085 µs (31.2%)
tracing 455.757 µs [434.556 µs, 476.958 µs] 74.32 µs (19.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.37 ms) : 1351, 1390
.   : milestone, 1370,
appsec (1.74 ms) : 1716, 1764
.   : milestone, 1740,
appsec_no_iast (1.742 ms) : 1717, 1768
.   : milestone, 1742,
iast (1.5 ms) : 1475, 1524
.   : milestone, 1500,
profiling (1.51 ms) : 1486, 1534
.   : milestone, 1510,
tracing (1.487 ms) : 1462, 1512
.   : milestone, 1487,
section candidate
no_agent (1.347 ms) : 1327, 1367
.   : milestone, 1347,
appsec (1.75 ms) : 1728, 1773
.   : milestone, 1750,
appsec_no_iast (1.741 ms) : 1716, 1766
.   : milestone, 1741,
iast (1.512 ms) : 1487, 1536
.   : milestone, 1512,
profiling (1.535 ms) : 1511, 1560
.   : milestone, 1535,
tracing (1.481 ms) : 1456, 1506
.   : milestone, 1481,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.37 ms [1.351 ms, 1.39 ms] -
appsec 1.74 ms [1.716 ms, 1.764 ms] 369.708 µs (27.0%)
appsec_no_iast 1.742 ms [1.717 ms, 1.768 ms] 372.129 µs (27.2%)
iast 1.5 ms [1.475 ms, 1.524 ms] 129.228 µs (9.4%)
profiling 1.51 ms [1.486 ms, 1.534 ms] 139.776 µs (10.2%)
tracing 1.487 ms [1.462 ms, 1.512 ms] 116.743 µs (8.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.347 ms [1.327 ms, 1.367 ms] -
appsec 1.75 ms [1.728 ms, 1.773 ms] 403.082 µs (29.9%)
appsec_no_iast 1.741 ms [1.716 ms, 1.766 ms] 393.244 µs (29.2%)
iast 1.512 ms [1.487 ms, 1.536 ms] 164.135 µs (12.2%)
profiling 1.535 ms [1.511 ms, 1.56 ms] 187.863 µs (13.9%)
tracing 1.481 ms [1.456 ms, 1.506 ms] 133.217 µs (9.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/avoid-stock-randomUUID
git_commit_date 1737645585 1737647082
git_commit_sha 991929d ee94149
release_version 1.46.0-SNAPSHOT~991929d244 1.46.0-SNAPSHOT~ee941491a0
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1737649051 1737649051
ci_job_id 777961344 777961344
ci_pipeline_id 53811324 53811324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-h9qrujh-project-304-concurrent-0-uj7h4kui 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-h9qrujh-project-304-concurrent-0-uj7h4kui 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
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.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.47 ms) : 1458, 1481
.   : milestone, 1470,
appsec (2.37 ms) : 2327, 2414
.   : milestone, 2370,
iast (2.102 ms) : 2048, 2157
.   : milestone, 2102,
iast_GLOBAL (2.158 ms) : 2103, 2213
.   : milestone, 2158,
profiling (2.469 ms) : 2277, 2661
.   : milestone, 2469,
tracing (1.954 ms) : 1912, 1997
.   : milestone, 1954,
section candidate
no_agent (1.474 ms) : 1462, 1486
.   : milestone, 1474,
appsec (2.371 ms) : 2328, 2414
.   : milestone, 2371,
iast (2.103 ms) : 2048, 2157
.   : milestone, 2103,
iast_GLOBAL (2.157 ms) : 2102, 2212
.   : milestone, 2157,
profiling (1.965 ms) : 1921, 2008
.   : milestone, 1965,
tracing (1.951 ms) : 1909, 1993
.   : milestone, 1951,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.47 ms [1.458 ms, 1.481 ms] -
appsec 2.37 ms [2.327 ms, 2.414 ms] 900.651 µs (61.3%)
iast 2.102 ms [2.048 ms, 2.157 ms] 632.808 µs (43.1%)
iast_GLOBAL 2.158 ms [2.103 ms, 2.213 ms] 688.623 µs (46.9%)
profiling 2.469 ms [2.277 ms, 2.661 ms] 999.301 µs (68.0%)
tracing 1.954 ms [1.912 ms, 1.997 ms] 484.838 µs (33.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.462 ms, 1.486 ms] -
appsec 2.371 ms [2.328 ms, 2.414 ms] 896.858 µs (60.8%)
iast 2.103 ms [2.048 ms, 2.157 ms] 628.622 µs (42.6%)
iast_GLOBAL 2.157 ms [2.102 ms, 2.212 ms] 683.382 µs (46.4%)
profiling 1.965 ms [1.921 ms, 2.008 ms] 490.818 µs (33.3%)
tracing 1.951 ms [1.909 ms, 1.993 ms] 476.861 µs (32.4%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~ee941491a0, baseline=1.46.0-SNAPSHOT~991929d244
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.495 s) : 15495000, 15495000
.   : milestone, 15495000,
appsec (14.812 s) : 14812000, 14812000
.   : milestone, 14812000,
iast (19.214 s) : 19214000, 19214000
.   : milestone, 19214000,
iast_GLOBAL (18.199 s) : 18199000, 18199000
.   : milestone, 18199000,
profiling (14.945 s) : 14945000, 14945000
.   : milestone, 14945000,
tracing (15.317 s) : 15317000, 15317000
.   : milestone, 15317000,
section candidate
no_agent (14.93 s) : 14930000, 14930000
.   : milestone, 14930000,
appsec (15.073 s) : 15073000, 15073000
.   : milestone, 15073000,
iast (18.385 s) : 18385000, 18385000
.   : milestone, 18385000,
iast_GLOBAL (18.257 s) : 18257000, 18257000
.   : milestone, 18257000,
profiling (15.07 s) : 15070000, 15070000
.   : milestone, 15070000,
tracing (14.866 s) : 14866000, 14866000
.   : milestone, 14866000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.495 s [15.495 s, 15.495 s] -
appsec 14.812 s [14.812 s, 14.812 s] -683.0 ms (-4.4%)
iast 19.214 s [19.214 s, 19.214 s] 3.719 s (24.0%)
iast_GLOBAL 18.199 s [18.199 s, 18.199 s] 2.704 s (17.5%)
profiling 14.945 s [14.945 s, 14.945 s] -550.0 ms (-3.5%)
tracing 15.317 s [15.317 s, 15.317 s] -178.0 ms (-1.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.93 s [14.93 s, 14.93 s] -
appsec 15.073 s [15.073 s, 15.073 s] 143.0 ms (1.0%)
iast 18.385 s [18.385 s, 18.385 s] 3.455 s (23.1%)
iast_GLOBAL 18.257 s [18.257 s, 18.257 s] 3.327 s (22.3%)
profiling 15.07 s [15.07 s, 15.07 s] 140.0 ms (0.9%)
tracing 14.866 s [14.866 s, 14.866 s] -64.0 ms (-0.4%)

@mcculls mcculls marked this pull request as ready for review January 22, 2025 15:35
@mcculls mcculls requested review from a team as code owners January 22, 2025 15:35
@mcculls
Copy link
Contributor Author

mcculls commented Jan 22, 2025

I'd appreciate @dougqh's and @PerfectSlayer's thoughts on the implications of using ThreadLocalRandom (non-cryptographic) over SecureRandom (cryptographic) for generating random UUIDs where we're really just interested in the id being unique.

Copy link
Member

@jpbempel jpbempel left a comment

Choose a reason for hiding this comment

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

LGTM

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.

According UUID.randomUUID() documentation:

The UUID is generated using a cryptographically strong pseudo random number generator.

So I would be en favor of keeping strong cryptography as forbidden API plugin will discourage devs using the original strong one.
But It doesn’t prevent us to create a weak cryptography alternative with a dedicated name and use it where it makes sense.

@mcculls
Copy link
Contributor Author

mcculls commented Jan 23, 2025

So I would be en favor of keeping strong cryptography as forbidden API plugin will discourage devs using the original strong one.

Out of interest do you know of a case where we'd need a strong cryptographically random UUID - the only places I've found just need uniqueness?

Given we know that using UUID.randomUUID() can lead to spurious java.util.logging issues I would prefer to still list it as a forbidden API - we could still add a RandomUtils.secureRandomUUID() but TBH I have yet to find a place in the code that would use it

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.

do you know of a case where we'd need a strong cryptographically random UUID

No, I don’t. My recommendation was only to make sure we provide a way to avoid any future issue when such case arrive -- not having a build error for using a strong one and only leaving a weak alternative.

So we should be good with our current code base 😉

@mcculls mcculls force-pushed the mcculls/avoid-stock-randomUUID branch from 1e36f12 to 8e1f775 Compare January 23, 2025 10:41
@mcculls
Copy link
Contributor Author

mcculls commented Jan 23, 2025

No problem, that's a fair point: 8e1f775

@mcculls mcculls force-pushed the mcculls/avoid-stock-randomUUID branch 2 times, most recently from 7bbe53b to 582febc Compare January 23, 2025 13:59
@mcculls mcculls added tag: no release notes Changes to exclude from release notes and removed tag: no release notes Changes to exclude from release notes labels Jan 23, 2025
@mcculls mcculls added the tag: no release notes Changes to exclude from release notes label Jan 23, 2025
This avoids a potential side-effect of loading 'java.util.logging' too early
when the Amazon Corretto Crypto Provider (ACCP) is plugged into SecureRandom
@mcculls mcculls force-pushed the mcculls/avoid-stock-randomUUID branch from 582febc to ee94149 Compare January 23, 2025 15:45
@mcculls mcculls added tag: no release notes Changes to exclude from release notes and removed tag: no release notes Changes to exclude from release notes labels Jan 23, 2025
@mcculls mcculls merged commit 64e6e86 into master Jan 23, 2025
178 of 179 checks passed
@mcculls mcculls deleted the mcculls/avoid-stock-randomUUID branch January 23, 2025 16:32
@github-actions github-actions bot added this to the 1.46.0 milestone Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core tag: no release notes Changes to exclude from release notes type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants