-
Notifications
You must be signed in to change notification settings - Fork 291
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
Conversation
8c1d05c
to
492be89
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 15 unstable metrics. Startup time reports for petclinicgantt
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
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
Startup time reports for insecure-bankgantt
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
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
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for insecure-bankgantt
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,
Request duration reports for petclinicgantt
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,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
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,
Execution time for biojavagantt
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,
|
return Value.nullValue(); | ||
} | ||
|
||
if (setHolder instanceof Set) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]}, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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]}, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setValue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
238accc
to
4477eb3
Compare
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
4477eb3
to
7c80834
Compare
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