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 support of Set in Expression Language #6992

Merged
merged 3 commits into from
May 13, 2024
Merged

Conversation

jpbempel
Copy link
Member

@jpbempel jpbempel commented May 6, 2024

What Does This Do

When having a value with a Set interface creates a SetValue to hold that Set instance
Allow to call size() on it if it safe list for lists and maps

Motivation

Support count(set)

Additional Notes

Jira ticket: DEBUG-2329

@jpbempel jpbempel requested a review from a team as a code owner May 6, 2024 09:00
@jpbempel jpbempel requested review from cimi and removed request for a team May 6, 2024 09:00
@jpbempel jpbempel added the comp: debugger Dynamic Instrumentation label May 6, 2024
@jpbempel jpbempel force-pushed the jpbempel/hashset-in-el branch from 8c1d05c to 492be89 Compare May 7, 2024 09:44
@pr-commenter
Copy link

pr-commenter bot commented May 7, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/hashset-in-el
git_commit_date 1715618970 1715622132
git_commit_sha 9d2fdc1 7c80834
release_version 1.35.0-SNAPSHOT~9d2fdc163c 1.35.0-SNAPSHOT~7c80834e29
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1715624920 1715624920
ci_job_id 510520769 510520769
ci_pipeline_id 34177065 34177065
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 48 metrics, 15 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.079 s) : 0, 1079437
Total [baseline] (10.526 s) : 0, 10526094
Agent [candidate] (1.086 s) : 0, 1086226
Total [candidate] (10.406 s) : 0, 10406273
section appsec
Agent [baseline] (1.208 s) : 0, 1208187
Total [baseline] (10.506 s) : 0, 10506209
Agent [candidate] (1.2 s) : 0, 1200447
Total [candidate] (10.463 s) : 0, 10463385
section iast
Agent [baseline] (1.212 s) : 0, 1211571
Total [baseline] (10.748 s) : 0, 10748451
Agent [candidate] (1.211 s) : 0, 1210846
Total [candidate] (10.753 s) : 0, 10752764
section profiling
Agent [baseline] (1.272 s) : 0, 1271993
Total [baseline] (10.593 s) : 0, 10593464
Agent [candidate] (1.271 s) : 0, 1270503
Total [candidate] (10.565 s) : 0, 10564647
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.079 s -
Agent appsec 1.208 s 128.751 ms (11.9%)
Agent iast 1.212 s 132.135 ms (12.2%)
Agent profiling 1.272 s 192.557 ms (17.8%)
Total tracing 10.526 s -
Total appsec 10.506 s -19.885 ms (-0.2%)
Total iast 10.748 s 222.357 ms (2.1%)
Total profiling 10.593 s 67.37 ms (0.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.086 s -
Agent appsec 1.2 s 114.222 ms (10.5%)
Agent iast 1.211 s 124.621 ms (11.5%)
Agent profiling 1.271 s 184.277 ms (17.0%)
Total tracing 10.406 s -
Total appsec 10.463 s 57.112 ms (0.5%)
Total iast 10.753 s 346.491 ms (3.3%)
Total profiling 10.565 s 158.375 ms (1.5%)
gantt
    title petclinic - break down per module: candidate=1.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (675.437 ms) : 0, 675437
BytebuddyAgent [candidate] (679.729 ms) : 0, 679729
GlobalTracer [baseline] (311.637 ms) : 0, 311637
GlobalTracer [candidate] (313.756 ms) : 0, 313756
AppSec [baseline] (49.595 ms) : 0, 49595
AppSec [candidate] (49.746 ms) : 0, 49746
Remote Config [baseline] (663.086 µs) : 0, 663
Remote Config [candidate] (664.996 µs) : 0, 665
Telemetry [baseline] (7.632 ms) : 0, 7632
Telemetry [candidate] (7.557 ms) : 0, 7557
section appsec
BytebuddyAgent [baseline] (705.366 ms) : 0, 705366
BytebuddyAgent [candidate] (698.503 ms) : 0, 698503
GlobalTracer [baseline] (296.029 ms) : 0, 296029
GlobalTracer [candidate] (295.03 ms) : 0, 295030
AppSec [baseline] (152.943 ms) : 0, 152943
AppSec [candidate] (152.873 ms) : 0, 152873
IAST [baseline] (19.011 ms) : 0, 19011
IAST [candidate] (19.099 ms) : 0, 19099
Remote Config [baseline] (622.419 µs) : 0, 622
Remote Config [candidate] (631.144 µs) : 0, 631
Telemetry [baseline] (8.807 ms) : 0, 8807
Telemetry [candidate] (9.229 ms) : 0, 9229
section iast
BytebuddyAgent [baseline] (802.12 ms) : 0, 802120
BytebuddyAgent [candidate] (801.982 ms) : 0, 801982
GlobalTracer [baseline] (292.871 ms) : 0, 292871
GlobalTracer [candidate] (292.703 ms) : 0, 292703
AppSec [baseline] (49.576 ms) : 0, 49576
AppSec [candidate] (52.493 ms) : 0, 52493
IAST [baseline] (25.169 ms) : 0, 25169
IAST [candidate] (21.144 ms) : 0, 21144
Remote Config [baseline] (590.651 µs) : 0, 591
Remote Config [candidate] (581.483 µs) : 0, 581
Telemetry [baseline] (6.541 ms) : 0, 6541
Telemetry [candidate] (7.343 ms) : 0, 7343
section profiling
BytebuddyAgent [baseline] (678.285 ms) : 0, 678285
BytebuddyAgent [candidate] (678.223 ms) : 0, 678223
GlobalTracer [baseline] (382.067 ms) : 0, 382067
GlobalTracer [candidate] (381.617 ms) : 0, 381617
AppSec [baseline] (50.484 ms) : 0, 50484
AppSec [candidate] (50.098 ms) : 0, 50098
Remote Config [baseline] (712.753 µs) : 0, 713
Remote Config [candidate] (721.903 µs) : 0, 722
Telemetry [baseline] (7.457 ms) : 0, 7457
Telemetry [candidate] (7.506 ms) : 0, 7506
ProfilingAgent [baseline] (96.511 ms) : 0, 96511
ProfilingAgent [candidate] (95.761 ms) : 0, 95761
Profiling [baseline] (96.535 ms) : 0, 96535
Profiling [candidate] (95.785 ms) : 0, 95785
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.076 s) : 0, 1076480
Total [baseline] (8.532 s) : 0, 8531578
Agent [candidate] (1.078 s) : 0, 1077812
Total [candidate] (8.533 s) : 0, 8533266
section iast
Agent [baseline] (1.206 s) : 0, 1206169
Total [baseline] (9.045 s) : 0, 9044619
Agent [candidate] (1.205 s) : 0, 1204577
Total [candidate] (9.005 s) : 0, 9004841
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.208 s) : 0, 1208137
Total [baseline] (9.008 s) : 0, 9007557
Agent [candidate] (1.203 s) : 0, 1203311
Total [candidate] (8.988 s) : 0, 8988388
section iast_TELEMETRY_OFF
Agent [baseline] (1.201 s) : 0, 1201494
Total [baseline] (8.991 s) : 0, 8991346
Agent [candidate] (1.211 s) : 0, 1210825
Total [candidate] (9.056 s) : 0, 9056242
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.076 s -
Agent iast 1.206 s 129.689 ms (12.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.208 s 131.656 ms (12.2%)
Agent iast_TELEMETRY_OFF 1.201 s 125.014 ms (11.6%)
Total tracing 8.532 s -
Total iast 9.045 s 513.042 ms (6.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.008 s 475.98 ms (5.6%)
Total iast_TELEMETRY_OFF 8.991 s 459.768 ms (5.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.078 s -
Agent iast 1.205 s 126.765 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.203 s 125.499 ms (11.6%)
Agent iast_TELEMETRY_OFF 1.211 s 133.013 ms (12.3%)
Total tracing 8.533 s -
Total iast 9.005 s 471.575 ms (5.5%)
Total iast_HARDCODED_SECRET_DISABLED 8.988 s 455.122 ms (5.3%)
Total iast_TELEMETRY_OFF 9.056 s 522.976 ms (6.1%)
gantt
    title insecure-bank - break down per module: candidate=1.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (673.868 ms) : 0, 673868
BytebuddyAgent [candidate] (674.817 ms) : 0, 674817
GlobalTracer [baseline] (310.448 ms) : 0, 310448
GlobalTracer [candidate] (310.8 ms) : 0, 310800
AppSec [baseline] (49.535 ms) : 0, 49535
AppSec [candidate] (49.481 ms) : 0, 49481
Remote Config [baseline] (671.099 µs) : 0, 671
Remote Config [candidate] (665.44 µs) : 0, 665
Telemetry [baseline] (7.607 ms) : 0, 7607
Telemetry [candidate] (7.588 ms) : 0, 7588
section iast
BytebuddyAgent [baseline] (798.533 ms) : 0, 798533
BytebuddyAgent [candidate] (796.779 ms) : 0, 796779
GlobalTracer [baseline] (291.499 ms) : 0, 291499
GlobalTracer [candidate] (291.386 ms) : 0, 291386
AppSec [baseline] (49.899 ms) : 0, 49899
AppSec [candidate] (51.605 ms) : 0, 51605
IAST [baseline] (23.864 ms) : 0, 23864
IAST [candidate] (23.116 ms) : 0, 23116
Remote Config [baseline] (605.37 µs) : 0, 605
Remote Config [candidate] (602.127 µs) : 0, 602
Telemetry [baseline] (7.33 ms) : 0, 7330
Telemetry [candidate] (6.682 ms) : 0, 6682
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (798.522 ms) : 0, 798522
BytebuddyAgent [candidate] (796.488 ms) : 0, 796488
GlobalTracer [baseline] (292.952 ms) : 0, 292952
GlobalTracer [candidate] (291.031 ms) : 0, 291031
AppSec [baseline] (48.873 ms) : 0, 48873
AppSec [candidate] (52.168 ms) : 0, 52168
IAST [baseline] (26.073 ms) : 0, 26073
IAST [candidate] (21.963 ms) : 0, 21963
Remote Config [baseline] (613.773 µs) : 0, 614
Remote Config [candidate] (604.285 µs) : 0, 604
Telemetry [baseline] (6.607 ms) : 0, 6607
Telemetry [candidate] (6.628 ms) : 0, 6628
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (794.552 ms) : 0, 794552
BytebuddyAgent [candidate] (801.142 ms) : 0, 801142
GlobalTracer [baseline] (291.234 ms) : 0, 291234
GlobalTracer [candidate] (293.201 ms) : 0, 293201
AppSec [baseline] (52.313 ms) : 0, 52313
AppSec [candidate] (52.543 ms) : 0, 52543
IAST [baseline] (21.857 ms) : 0, 21857
IAST [candidate] (21.282 ms) : 0, 21282
Remote Config [baseline] (588.52 µs) : 0, 589
Remote Config [candidate] (609.82 µs) : 0, 610
Telemetry [baseline] (6.513 ms) : 0, 6513
Telemetry [candidate] (7.334 ms) : 0, 7334
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-05-13T17:57:46 2024-05-13T18:04:35
git_branch master jpbempel/hashset-in-el
git_commit_date 1715618970 1715622132
git_commit_sha 9d2fdc1 7c80834
release_version 1.35.0-SNAPSHOT~9d2fdc163c 1.35.0-SNAPSHOT~7c80834e29
start_time 2024-05-13T17:57:33 2024-05-13T18:04:22
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1715623823 1715623823
ci_job_id 510520770 510520770
ci_pipeline_id 34177065 34177065
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.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c
    dateFormat X
    axisFormat %s
section baseline
no_agent (364.815 µs) : 345, 384
.   : milestone, 365,
iast (491.163 µs) : 470, 512
.   : milestone, 491,
iast_FULL (550.378 µs) : 529, 572
.   : milestone, 550,
iast_GLOBAL (506.777 µs) : 486, 528
.   : milestone, 507,
iast_HARDCODED_SECRET_DISABLED (480.999 µs) : 460, 502
.   : milestone, 481,
iast_INACTIVE (458.477 µs) : 436, 481
.   : milestone, 458,
iast_TELEMETRY_OFF (469.142 µs) : 448, 490
.   : milestone, 469,
tracing (441.333 µs) : 421, 461
.   : milestone, 441,
section candidate
no_agent (365.099 µs) : 345, 385
.   : milestone, 365,
iast (485.601 µs) : 464, 507
.   : milestone, 486,
iast_FULL (553.948 µs) : 533, 575
.   : milestone, 554,
iast_GLOBAL (508.661 µs) : 487, 530
.   : milestone, 509,
iast_HARDCODED_SECRET_DISABLED (482.221 µs) : 461, 503
.   : milestone, 482,
iast_INACTIVE (464.125 µs) : 442, 486
.   : milestone, 464,
iast_TELEMETRY_OFF (475.973 µs) : 455, 497
.   : milestone, 476,
tracing (442.452 µs) : 422, 463
.   : milestone, 442,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 364.815 µs [345.324 µs, 384.305 µs] -
iast 491.163 µs [469.865 µs, 512.462 µs] 126.349 µs (34.6%)
iast_FULL 550.378 µs [529.116 µs, 571.641 µs] 185.564 µs (50.9%)
iast_GLOBAL 506.777 µs [485.722 µs, 527.832 µs] 141.962 µs (38.9%)
iast_HARDCODED_SECRET_DISABLED 480.999 µs [459.946 µs, 502.052 µs] 116.184 µs (31.8%)
iast_INACTIVE 458.477 µs [436.436 µs, 480.519 µs] 93.663 µs (25.7%)
iast_TELEMETRY_OFF 469.142 µs [448.128 µs, 490.156 µs] 104.328 µs (28.6%)
tracing 441.333 µs [421.279 µs, 461.387 µs] 76.518 µs (21.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 365.099 µs [344.894 µs, 385.305 µs] -
iast 485.601 µs [464.191 µs, 507.011 µs] 120.501 µs (33.0%)
iast_FULL 553.948 µs [532.916 µs, 574.98 µs] 188.849 µs (51.7%)
iast_GLOBAL 508.661 µs [487.01 µs, 530.312 µs] 143.562 µs (39.3%)
iast_HARDCODED_SECRET_DISABLED 482.221 µs [461.08 µs, 503.363 µs] 117.122 µs (32.1%)
iast_INACTIVE 464.125 µs [442.016 µs, 486.233 µs] 99.026 µs (27.1%)
iast_TELEMETRY_OFF 475.973 µs [454.599 µs, 497.347 µs] 110.874 µs (30.4%)
tracing 442.452 µs [421.715 µs, 463.189 µs] 77.353 µs (21.2%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.35 ms) : 1329, 1371
.   : milestone, 1350,
appsec (1.7 ms) : 1677, 1723
.   : milestone, 1700,
appsec_no_iast (1.688 ms) : 1663, 1712
.   : milestone, 1688,
iast (1.48 ms) : 1457, 1503
.   : milestone, 1480,
profiling (1.538 ms) : 1512, 1563
.   : milestone, 1538,
tracing (1.486 ms) : 1463, 1509
.   : milestone, 1486,
section candidate
no_agent (1.362 ms) : 1341, 1382
.   : milestone, 1362,
appsec (1.702 ms) : 1677, 1726
.   : milestone, 1702,
appsec_no_iast (1.737 ms) : 1712, 1761
.   : milestone, 1737,
iast (1.476 ms) : 1453, 1499
.   : milestone, 1476,
profiling (1.509 ms) : 1484, 1534
.   : milestone, 1509,
tracing (1.471 ms) : 1447, 1496
.   : milestone, 1471,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.35 ms [1.329 ms, 1.371 ms] -
appsec 1.7 ms [1.677 ms, 1.723 ms] 349.84 µs (25.9%)
appsec_no_iast 1.688 ms [1.663 ms, 1.712 ms] 337.734 µs (25.0%)
iast 1.48 ms [1.457 ms, 1.503 ms] 129.681 µs (9.6%)
profiling 1.538 ms [1.512 ms, 1.563 ms] 187.537 µs (13.9%)
tracing 1.486 ms [1.463 ms, 1.509 ms] 135.904 µs (10.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.362 ms [1.341 ms, 1.382 ms] -
appsec 1.702 ms [1.677 ms, 1.726 ms] 340.265 µs (25.0%)
appsec_no_iast 1.737 ms [1.712 ms, 1.761 ms] 375.224 µs (27.6%)
iast 1.476 ms [1.453 ms, 1.499 ms] 114.348 µs (8.4%)
profiling 1.509 ms [1.484 ms, 1.534 ms] 147.484 µs (10.8%)
tracing 1.471 ms [1.447 ms, 1.496 ms] 109.721 µs (8.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/hashset-in-el
git_commit_date 1715618970 1715622132
git_commit_sha 9d2fdc1 7c80834
release_version 1.35.0-SNAPSHOT~9d2fdc163c 1.35.0-SNAPSHOT~7c80834e29
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1715624366 1715624366
ci_job_id 510520771 510520771
ci_pipeline_id 34177065 34177065
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.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1481
.   : milestone, 1469,
appsec (2.206 ms) : 2172, 2241
.   : milestone, 2206,
iast (1.967 ms) : 1926, 2009
.   : milestone, 1967,
iast_GLOBAL (2.009 ms) : 1967, 2051
.   : milestone, 2009,
profiling (1.834 ms) : 1801, 1868
.   : milestone, 1834,
tracing (1.835 ms) : 1803, 1867
.   : milestone, 1835,
section candidate
no_agent (1.467 ms) : 1456, 1478
.   : milestone, 1467,
appsec (2.2 ms) : 2166, 2234
.   : milestone, 2200,
iast (1.951 ms) : 1911, 1992
.   : milestone, 1951,
iast_GLOBAL (1.986 ms) : 1945, 2027
.   : milestone, 1986,
profiling (1.839 ms) : 1805, 1873
.   : milestone, 1839,
tracing (1.839 ms) : 1806, 1871
.   : milestone, 1839,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.469 ms [1.457 ms, 1.481 ms] -
appsec 2.206 ms [2.172 ms, 2.241 ms] 737.195 µs (50.2%)
iast 1.967 ms [1.926 ms, 2.009 ms] 498.185 µs (33.9%)
iast_GLOBAL 2.009 ms [1.967 ms, 2.051 ms] 539.619 µs (36.7%)
profiling 1.834 ms [1.801 ms, 1.868 ms] 365.087 µs (24.8%)
tracing 1.835 ms [1.803 ms, 1.867 ms] 365.852 µs (24.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.478 ms] -
appsec 2.2 ms [2.166 ms, 2.234 ms] 733.365 µs (50.0%)
iast 1.951 ms [1.911 ms, 1.992 ms] 484.456 µs (33.0%)
iast_GLOBAL 1.986 ms [1.945 ms, 2.027 ms] 519.337 µs (35.4%)
profiling 1.839 ms [1.805 ms, 1.873 ms] 372.151 µs (25.4%)
tracing 1.839 ms [1.806 ms, 1.871 ms] 371.715 µs (25.3%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.35.0-SNAPSHOT~7c80834e29, baseline=1.35.0-SNAPSHOT~9d2fdc163c
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.121 s) : 15121000, 15121000
.   : milestone, 15121000,
appsec (15.103 s) : 15103000, 15103000
.   : milestone, 15103000,
iast (18.873 s) : 18873000, 18873000
.   : milestone, 18873000,
iast_GLOBAL (18.319 s) : 18319000, 18319000
.   : milestone, 18319000,
profiling (14.998 s) : 14998000, 14998000
.   : milestone, 14998000,
tracing (14.885 s) : 14885000, 14885000
.   : milestone, 14885000,
section candidate
no_agent (14.819 s) : 14819000, 14819000
.   : milestone, 14819000,
appsec (14.872 s) : 14872000, 14872000
.   : milestone, 14872000,
iast (18.944 s) : 18944000, 18944000
.   : milestone, 18944000,
iast_GLOBAL (18.109 s) : 18109000, 18109000
.   : milestone, 18109000,
profiling (15.097 s) : 15097000, 15097000
.   : milestone, 15097000,
tracing (15.052 s) : 15052000, 15052000
.   : milestone, 15052000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.121 s [15.121 s, 15.121 s] -
appsec 15.103 s [15.103 s, 15.103 s] -18.0 ms (-0.1%)
iast 18.873 s [18.873 s, 18.873 s] 3.752 s (24.8%)
iast_GLOBAL 18.319 s [18.319 s, 18.319 s] 3.198 s (21.1%)
profiling 14.998 s [14.998 s, 14.998 s] -123.0 ms (-0.8%)
tracing 14.885 s [14.885 s, 14.885 s] -236.0 ms (-1.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.819 s [14.819 s, 14.819 s] -
appsec 14.872 s [14.872 s, 14.872 s] 53.0 ms (0.4%)
iast 18.944 s [18.944 s, 18.944 s] 4.125 s (27.8%)
iast_GLOBAL 18.109 s [18.109 s, 18.109 s] 3.29 s (22.2%)
profiling 15.097 s [15.097 s, 15.097 s] 278.0 ms (1.9%)
tracing 15.052 s [15.052 s, 15.052 s] 233.0 ms (1.6%)

return Value.nullValue();
}

if (setHolder instanceof Set) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why we don't check WellKnownClasses here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same for Maps.
Need to revisit this in fact in a next PR

} else if (setHolder == Value.nullValue()) {
return 0;
}
return -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

why -1? why not undefined? is that in the spec ?
I think count on String also return -1 for null. not sure why we do that.

Copy link
Member Author

@jpbempel jpbempel May 13, 2024

Choose a reason for hiding this comment

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

legacy from the initial implementation. should never reached this code.

why not undefined?

because method should return an int! otherwise we need to throw an exception

"json": {
"and": [
{"eq": [{"count": {"ref": "intArray"}}, 3]},
{"eq": [{"len": {"ref": "intArray"}}, 3]},
Copy link
Contributor

Choose a reason for hiding this comment

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

why we have both len and count?

Copy link
Member Author

Choose a reason for hiding this comment

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

Initial implementation supported both.
I think it's because you prefer doing len over a string and count on a collection

{"eq": [{"len": {"ref": "intArray"}}, 3]},
{"eq": [{"count": {"ref": "strArray"}}, 2]},
{"eq": [{"count": {"ref": "strMap"}}, 2]},
{"eq": [{"count": {"ref": "strSet"}}, 1]},
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have tests like that for isEmpty?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yes missed that. we have the test but forgot to add Set for them


@Override
public Void visit(SetValue setValue) {
throw new UnsupportedOperationException("mapValue");
Copy link
Contributor

Choose a reason for hiding this comment

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

setValue

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@jpbempel jpbempel force-pushed the jpbempel/hashset-in-el branch from 238accc to 4477eb3 Compare May 13, 2024 17:14
jpbempel added 3 commits May 13, 2024 19:39
When having a value with a Set interface creates a SetValue
to hold that Set instance
Allow to call size() on it if it safe list for lists and maps
@jpbempel jpbempel force-pushed the jpbempel/hashset-in-el branch from 4477eb3 to 7c80834 Compare May 13, 2024 17:42
@jpbempel jpbempel merged commit 61d4d68 into master May 13, 2024
80 checks passed
@jpbempel jpbempel deleted the jpbempel/hashset-in-el branch May 13, 2024 18:35
@github-actions github-actions bot added this to the 1.35.0 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: debugger Dynamic Instrumentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants