Skip to content

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

Merged
mcculls merged 2 commits into
masterfrom
mcculls/avoid-stock-randomUUID
Jan 23, 2025
Merged

Replace UUID.randomUUID() with RandomUtils.randomUUID()#8267
mcculls merged 2 commits into
masterfrom
mcculls/avoid-stock-randomUUID

Conversation

@mcculls

@mccullsmcculls commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

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

@mccullsmcculls added type: feature Enhancements and improvements comp: core Tracer core labels Jan 22, 2025
@mcculls
mccullsforce-pushed the mcculls/avoid-stock-randomUUID branch from 6d43df3 to 1e36f12CompareJanuary 22, 2025 13:11
@pr-commenter

pr-commenterBot commented Jan 22, 2025

Copy link
Copy Markdown

Debugger benchmarks

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
ci_job_date17376477561737648128
end_time2025-01-23T15:57:122025-01-23T16:03:25
git_branchmastermcculls/avoid-stock-randomUUID
git_commit_sha991929dee94149
start_time2025-01-23T15:55:572025-01-23T16:02:09
See matching parameters
BaselineCandidate
ci_job_id777961348777961348
ci_pipeline_id5381132453811324
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date17376470821737647082

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:noprobeunstable
[-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:basicsamesamesameunstable
[-55.247µs; +25.740µs] or [-10.361%; +4.827%]
unstable
[-134.013op/s; +134.013op/s] or [-5.226%; +5.226%]
scenario:loopunsure
[+1.904µs; +16.561µs] or [+0.019%; +0.166%]
samesamesamesame
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
ScenarioRequest median duration [CI 0.99]
noprobe305.787 µs [274.98 µs, 336.595 µs]
basic302.979 µs [292.515 µs, 313.443 µs]
loop10.14 ms [10.105 ms, 10.176 ms]
  • candidate results
ScenarioRequest median duration [CI 0.99]
noprobe314.903 µs [277.024 µs, 352.782 µs]
basic306.728 µs [297.567 µs, 315.888 µs]
loop10.159 ms [10.119 ms, 10.199 ms]

@pr-commenter

pr-commenterBot commented Jan 22, 2025

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmastermcculls/avoid-stock-randomUUID
git_commit_date17376455851737647082
git_commit_sha991929dee94149
release_version1.46.0-SNAPSHOT~991929d2441.46.0-SNAPSHOT~ee941491a0
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17376495081737649508
ci_job_id777961342777961342
ci_pipeline_id5381132453811324
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux 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/LinuxLinux 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
moduleAgentAgent
parentNoneNone
variantiastiast

Summary

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

scenarioΔ mean execution_timecandidate mean execution_timebaseline mean execution_time
scenario:startup:insecure-bank:iast:GlobalTracerbetter
[-17.002ms; -15.372ms] or [-6.886%; -6.226%]
230.718ms246.905ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:GlobalTracerbetter
[-17.803ms; -15.822ms] or [-7.229%; -6.424%]
229.472ms246.285ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:GlobalTracerbetter
[-17.865ms; -10.348ms] or [-7.260%; -4.205%]
231.971ms246.078ms
scenario:startup:insecure-bank:tracing:GlobalTracerbetter
[-16.886ms; -8.691ms] or [-6.623%; -3.409%]
242.170ms254.959ms
scenario:startup:petclinic:appsec:GlobalTracerbetter
[-17.642ms; -11.452ms] or [-6.987%; -4.535%]
237.959ms252.506ms
scenario:startup:petclinic:appsec:AppSecworse
[+3.723ms; +6.841ms] or [+2.178%; +4.002%]
176.237ms170.955ms
scenario:startup:petclinic:iast:GlobalTracerbetter
[-17.867ms; -12.961ms] or [-7.238%; -5.251%]
231.418ms246.832ms
scenario:startup:petclinic:tracing:GlobalTracerbetter
[-17.670ms; -11.555ms] or [-6.907%; -4.517%]
241.208ms255.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
ModuleVariantDurationΔ tracing
Agenttracing1.055 s-
Agentiast1.185 s129.13 ms (12.2%)
Agentiast_HARDCODED_SECRET_DISABLED1.183 s127.827 ms (12.1%)
Agentiast_TELEMETRY_OFF1.18 s124.385 ms (11.8%)
Totaltracing8.632 s-
Totaliast9.218 s585.987 ms (6.8%)
Totaliast_HARDCODED_SECRET_DISABLED9.211 s579.636 ms (6.7%)
Totaliast_TELEMETRY_OFF9.201 s569.612 ms (6.6%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.05 s-
Agentiast1.171 s121.607 ms (11.6%)
Agentiast_HARDCODED_SECRET_DISABLED1.168 s117.752 ms (11.2%)
Agentiast_TELEMETRY_OFF1.18 s129.895 ms (12.4%)
Totaltracing8.69 s-
Totaliast9.222 s532.43 ms (6.1%)
Totaliast_HARDCODED_SECRET_DISABLED9.19 s500.185 ms (5.8%)
Totaliast_TELEMETRY_OFF9.282 s591.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
ModuleVariantDurationΔ tracing
Agenttracing1.056 s-
Agentappsec1.189 s132.532 ms (12.5%)
Agentiast1.184 s127.845 ms (12.1%)
Agentprofiling1.255 s198.378 ms (18.8%)
Totaltracing10.416 s-
Totalappsec10.759 s343.071 ms (3.3%)
Totaliast10.98 s563.514 ms (5.4%)
Totalprofiling10.92 s503.925 ms (4.8%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.049 s-
Agentappsec1.184 s135.3 ms (12.9%)
Agentiast1.184 s135.443 ms (12.9%)
Agentprofiling1.258 s209.184 ms (19.9%)
Totaltracing10.511 s-
Totalappsec10.788 s277.097 ms (2.6%)
Totaliast11.015 s504.654 ms (4.8%)
Totalprofiling10.829 s318.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

BaselineCandidate
baseline_or_candidatebaselinecandidate
end_time2025-01-23T15:55:022025-01-23T16:02:06
git_branchmastermcculls/avoid-stock-randomUUID
git_commit_date17376455851737647082
git_commit_sha991929dee94149
release_version1.46.0-SNAPSHOT~991929d2441.46.0-SNAPSHOT~ee941491a0
start_time2025-01-23T15:54:492025-01-23T16:01:52
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17376484841737648484
ci_job_id777961343777961343
ci_pipeline_id5381132453811324
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux 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/LinuxLinux 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
variantiastiast

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
VariantRequest duration [CI 0.99]Δ no_agent
no_agent379.872 µs [360.321 µs, 399.422 µs]-
iast503.956 µs [482.281 µs, 525.63 µs]124.084 µs (32.7%)
iast_FULL745.583 µs [723.374 µs, 767.791 µs]365.711 µs (96.3%)
iast_GLOBAL557.562 µs [535.15 µs, 579.974 µs]177.69 µs (46.8%)
iast_HARDCODED_SECRET_DISABLED510.489 µs [489.094 µs, 531.884 µs]130.618 µs (34.4%)
iast_INACTIVE455.665 µs [434.422 µs, 476.907 µs]75.793 µs (20.0%)
iast_TELEMETRY_OFF493.219 µs [471.636 µs, 514.802 µs]113.348 µs (29.8%)
tracing458.04 µs [436.664 µs, 479.416 µs]78.168 µs (20.6%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent381.437 µs [359.6 µs, 403.274 µs]-
iast508.145 µs [484.615 µs, 531.675 µs]126.708 µs (33.2%)
iast_FULL747.117 µs [725.254 µs, 768.98 µs]365.68 µs (95.9%)
iast_GLOBAL558.549 µs [534.53 µs, 582.569 µs]177.112 µs (46.4%)
iast_HARDCODED_SECRET_DISABLED511.008 µs [488.662 µs, 533.354 µs]129.571 µs (34.0%)
iast_INACTIVE455.898 µs [434.618 µs, 477.178 µs]74.461 µs (19.5%)
iast_TELEMETRY_OFF500.521 µs [476.957 µs, 524.086 µs]119.085 µs (31.2%)
tracing455.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
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.37 ms [1.351 ms, 1.39 ms]-
appsec1.74 ms [1.716 ms, 1.764 ms]369.708 µs (27.0%)
appsec_no_iast1.742 ms [1.717 ms, 1.768 ms]372.129 µs (27.2%)
iast1.5 ms [1.475 ms, 1.524 ms]129.228 µs (9.4%)
profiling1.51 ms [1.486 ms, 1.534 ms]139.776 µs (10.2%)
tracing1.487 ms [1.462 ms, 1.512 ms]116.743 µs (8.5%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.347 ms [1.327 ms, 1.367 ms]-
appsec1.75 ms [1.728 ms, 1.773 ms]403.082 µs (29.9%)
appsec_no_iast1.741 ms [1.716 ms, 1.766 ms]393.244 µs (29.2%)
iast1.512 ms [1.487 ms, 1.536 ms]164.135 µs (12.2%)
profiling1.535 ms [1.511 ms, 1.56 ms]187.863 µs (13.9%)
tracing1.481 ms [1.456 ms, 1.506 ms]133.217 µs (9.9%)

Dacapo

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmastermcculls/avoid-stock-randomUUID
git_commit_date17376455851737647082
git_commit_sha991929dee94149
release_version1.46.0-SNAPSHOT~991929d2441.46.0-SNAPSHOT~ee941491a0
See matching parameters
BaselineCandidate
applicationbiojavabiojava
ci_job_date17376490511737649051
ci_job_id777961344777961344
ci_pipeline_id5381132453811324
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux 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/LinuxLinux 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
variantappsecappsec

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
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.47 ms [1.458 ms, 1.481 ms]-
appsec2.37 ms [2.327 ms, 2.414 ms]900.651 µs (61.3%)
iast2.102 ms [2.048 ms, 2.157 ms]632.808 µs (43.1%)
iast_GLOBAL2.158 ms [2.103 ms, 2.213 ms]688.623 µs (46.9%)
profiling2.469 ms [2.277 ms, 2.661 ms]999.301 µs (68.0%)
tracing1.954 ms [1.912 ms, 1.997 ms]484.838 µs (33.0%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.474 ms [1.462 ms, 1.486 ms]-
appsec2.371 ms [2.328 ms, 2.414 ms]896.858 µs (60.8%)
iast2.103 ms [2.048 ms, 2.157 ms]628.622 µs (42.6%)
iast_GLOBAL2.157 ms [2.102 ms, 2.212 ms]683.382 µs (46.4%)
profiling1.965 ms [1.921 ms, 2.008 ms]490.818 µs (33.3%)
tracing1.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
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.495 s [15.495 s, 15.495 s]-
appsec14.812 s [14.812 s, 14.812 s]-683.0 ms (-4.4%)
iast19.214 s [19.214 s, 19.214 s]3.719 s (24.0%)
iast_GLOBAL18.199 s [18.199 s, 18.199 s]2.704 s (17.5%)
profiling14.945 s [14.945 s, 14.945 s]-550.0 ms (-3.5%)
tracing15.317 s [15.317 s, 15.317 s]-178.0 ms (-1.1%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent14.93 s [14.93 s, 14.93 s]-
appsec15.073 s [15.073 s, 15.073 s]143.0 ms (1.0%)
iast18.385 s [18.385 s, 18.385 s]3.455 s (23.1%)
iast_GLOBAL18.257 s [18.257 s, 18.257 s]3.327 s (22.3%)
profiling15.07 s [15.07 s, 15.07 s]140.0 ms (0.9%)
tracing14.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 ownersJanuary 22, 2025 15:35
@mcculls

Copy link
Copy Markdown
ContributorAuthor

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.

@jpbempeljpbempel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@PerfectSlayerPerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
ContributorAuthor

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

@PerfectSlayerPerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

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
mccullsforce-pushed the mcculls/avoid-stock-randomUUID branch from 1e36f12 to 8e1f775CompareJanuary 23, 2025 10:41
@mcculls

Copy link
Copy Markdown
ContributorAuthor

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

@mcculls
mccullsforce-pushed the mcculls/avoid-stock-randomUUID branch 2 times, most recently from 7bbe53b to 582febcCompareJanuary 23, 2025 13:59
@mccullsmcculls 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
@mccullsmcculls 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
mccullsforce-pushed the mcculls/avoid-stock-randomUUID branch from 582febc to ee94149CompareJanuary 23, 2025 15:45
@mccullsmcculls 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 masterJan 23, 2025
@mcculls
mcculls deleted the mcculls/avoid-stock-randomUUID branch January 23, 2025 16:32
@github-actionsgithub-actionsBot added this to the 1.46.0 milestone Jan 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: coreTracer coretag: no release notesChanges to exclude from release notestype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mcculls@PerfectSlayer@jpbempel