-
Notifications
You must be signed in to change notification settings - Fork 279
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
Handle WellKnown classes as primitives in EL #6263
Conversation
WellKnown classes (like UUID) need to be treated as string primitives to be use in Expression Language and conditions Add a list of string primitives
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.25.0-SNAPSHOT~a0060ff2ec, baseline=1.25.0-SNAPSHOT~cde4b1a75b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1031514
Total [baseline] (8.676 s) : 0, 8675841
Agent [candidate] (1.038 s) : 0, 1037925
Total [candidate] (8.725 s) : 0, 8724687
section iast
Agent [baseline] (1.165 s) : 0, 1165313
Total [baseline] (9.328 s) : 0, 9328128
Agent [candidate] (1.153 s) : 0, 1153270
Total [candidate] (9.236 s) : 0, 9236129
section iast_TELEMETRY_OFF
Agent [baseline] (1.141 s) : 0, 1140619
Total [baseline] (9.235 s) : 0, 9235010
Agent [candidate] (1.144 s) : 0, 1143715
Total [candidate] (9.287 s) : 0, 9286940
gantt
title insecure-bank - break down per module: candidate=1.25.0-SNAPSHOT~a0060ff2ec, baseline=1.25.0-SNAPSHOT~cde4b1a75b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (643.229 ms) : 0, 643229
BytebuddyAgent [candidate] (647.755 ms) : 0, 647755
GlobalTracer [baseline] (297.302 ms) : 0, 297302
GlobalTracer [candidate] (299.567 ms) : 0, 299567
AppSec [baseline] (48.84 ms) : 0, 48840
AppSec [candidate] (48.263 ms) : 0, 48263
Remote Config [baseline] (673.076 µs) : 0, 673
Remote Config [candidate] (680.134 µs) : 0, 680
Telemetry [baseline] (7.23 ms) : 0, 7230
Telemetry [candidate] (7.305 ms) : 0, 7305
section iast
BytebuddyAgent [baseline] (774.423 ms) : 0, 774423
BytebuddyAgent [candidate] (765.539 ms) : 0, 765539
GlobalTracer [baseline] (281.859 ms) : 0, 281859
GlobalTracer [candidate] (278.991 ms) : 0, 278991
AppSec [baseline] (48.598 ms) : 0, 48598
AppSec [candidate] (48.207 ms) : 0, 48207
IAST [baseline] (16.461 ms) : 0, 16461
IAST [candidate] (16.272 ms) : 0, 16272
Remote Config [baseline] (582.334 µs) : 0, 582
Remote Config [candidate] (571.236 µs) : 0, 571
Telemetry [baseline] (8.729 ms) : 0, 8729
Telemetry [candidate] (9.427 ms) : 0, 9427
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (756.27 ms) : 0, 756270
BytebuddyAgent [candidate] (759.087 ms) : 0, 759087
GlobalTracer [baseline] (278.61 ms) : 0, 278610
GlobalTracer [candidate] (278.493 ms) : 0, 278493
AppSec [baseline] (46.607 ms) : 0, 46607
AppSec [candidate] (47.004 ms) : 0, 47004
IAST [baseline] (16.488 ms) : 0, 16488
IAST [candidate] (17.199 ms) : 0, 17199
Remote Config [baseline] (565.961 µs) : 0, 566
Remote Config [candidate] (565.396 µs) : 0, 565
Telemetry [baseline] (7.789 ms) : 0, 7789
Telemetry [candidate] (7.114 ms) : 0, 7114
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.25.0-SNAPSHOT~a0060ff2ec, baseline=1.25.0-SNAPSHOT~cde4b1a75b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.03 s) : 0, 1029808
Total [baseline] (9.324 s) : 0, 9323805
Agent [candidate] (1.048 s) : 0, 1047960
Total [candidate] (9.374 s) : 0, 9373565
section appsec
Agent [baseline] (1.124 s) : 0, 1123827
Total [baseline] (9.458 s) : 0, 9457915
Agent [candidate] (1.121 s) : 0, 1121042
Total [candidate] (9.421 s) : 0, 9421212
section iast
Agent [baseline] (1.158 s) : 0, 1158116
Total [baseline] (9.574 s) : 0, 9574026
Agent [candidate] (1.163 s) : 0, 1162742
Total [candidate] (9.591 s) : 0, 9590958
section profiling
Agent [baseline] (1.222 s) : 0, 1221729
Total [baseline] (9.633 s) : 0, 9633065
Agent [candidate] (1.223 s) : 0, 1222661
Total [candidate] (9.612 s) : 0, 9612093
gantt
title petclinic - break down per module: candidate=1.25.0-SNAPSHOT~a0060ff2ec, baseline=1.25.0-SNAPSHOT~cde4b1a75b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (641.885 ms) : 0, 641885
BytebuddyAgent [candidate] (653.895 ms) : 0, 653895
GlobalTracer [baseline] (297.406 ms) : 0, 297406
GlobalTracer [candidate] (302.463 ms) : 0, 302463
AppSec [baseline] (48.542 ms) : 0, 48542
AppSec [candidate] (48.932 ms) : 0, 48932
Remote Config [baseline] (672.394 µs) : 0, 672
Remote Config [candidate] (693.089 µs) : 0, 693
Telemetry [baseline] (7.255 ms) : 0, 7255
Telemetry [candidate] (7.299 ms) : 0, 7299
section appsec
BytebuddyAgent [baseline] (644.933 ms) : 0, 644933
BytebuddyAgent [candidate] (644.275 ms) : 0, 644275
GlobalTracer [baseline] (300.031 ms) : 0, 300031
GlobalTracer [candidate] (298.412 ms) : 0, 298412
AppSec [baseline] (137.216 ms) : 0, 137216
AppSec [candidate] (136.66 ms) : 0, 136660
Remote Config [baseline] (655.001 µs) : 0, 655
Remote Config [candidate] (651.816 µs) : 0, 652
Telemetry [baseline] (6.817 ms) : 0, 6817
Telemetry [candidate] (6.808 ms) : 0, 6808
section iast
BytebuddyAgent [baseline] (769.229 ms) : 0, 769229
BytebuddyAgent [candidate] (772.034 ms) : 0, 772034
GlobalTracer [baseline] (279.835 ms) : 0, 279835
GlobalTracer [candidate] (280.581 ms) : 0, 280581
AppSec [baseline] (52.102 ms) : 0, 52102
AppSec [candidate] (51.513 ms) : 0, 51513
IAST [baseline] (14.068 ms) : 0, 14068
IAST [candidate] (14.043 ms) : 0, 14043
Remote Config [baseline] (575.856 µs) : 0, 576
Remote Config [candidate] (571.586 µs) : 0, 572
Telemetry [baseline] (7.892 ms) : 0, 7892
Telemetry [candidate] (9.342 ms) : 0, 9342
section profiling
BytebuddyAgent [baseline] (654.512 ms) : 0, 654512
BytebuddyAgent [candidate] (655.262 ms) : 0, 655262
GlobalTracer [baseline] (368.507 ms) : 0, 368507
GlobalTracer [candidate] (367.871 ms) : 0, 367871
AppSec [baseline] (48.539 ms) : 0, 48539
AppSec [candidate] (48.763 ms) : 0, 48763
Remote Config [baseline] (694.908 µs) : 0, 695
Remote Config [candidate] (696.992 µs) : 0, 697
Telemetry [baseline] (7.392 ms) : 0, 7392
Telemetry [candidate] (7.419 ms) : 0, 7419
ProfilingAgent [baseline] (88.071 ms) : 0, 88071
ProfilingAgent [candidate] (88.579 ms) : 0, 88579
Profiling [baseline] (88.095 ms) : 0, 88095
Profiling [candidate] (88.603 ms) : 0, 88603
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 13 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.25.0-SNAPSHOT~a0060ff2ec, baseline=1.25.0-SNAPSHOT~cde4b1a75b
dateFormat X
axisFormat %s
section baseline
no_agent (370.418 µs) : 351, 390
. : milestone, 370,
iast (473.156 µs) : 453, 494
. : milestone, 473,
iast_FULL (537.466 µs) : 517, 558
. : milestone, 537,
iast_INACTIVE (459.409 µs) : 439, 480
. : milestone, 459,
iast_TELEMETRY_OFF (469.603 µs) : 449, 490
. : milestone, 470,
tracing (444.394 µs) : 424, 465
. : milestone, 444,
section candidate
no_agent (372.856 µs) : 351, 395
. : milestone, 373,
iast (475.366 µs) : 455, 496
. : milestone, 475,
iast_FULL (538.548 µs) : 518, 559
. : milestone, 539,
iast_INACTIVE (454.781 µs) : 434, 475
. : milestone, 455,
iast_TELEMETRY_OFF (469.595 µs) : 449, 490
. : milestone, 470,
tracing (448.695 µs) : 428, 469
. : milestone, 449,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.25.0-SNAPSHOT~a0060ff2ec, baseline=1.25.0-SNAPSHOT~cde4b1a75b
dateFormat X
axisFormat %s
section baseline
no_agent (1.346 ms) : 1327, 1365
. : milestone, 1346,
appsec (1.768 ms) : 1742, 1794
. : milestone, 1768,
iast (1.562 ms) : 1538, 1586
. : milestone, 1562,
profiling (1.577 ms) : 1550, 1604
. : milestone, 1577,
tracing (1.52 ms) : 1494, 1545
. : milestone, 1520,
section candidate
no_agent (1.383 ms) : 1364, 1402
. : milestone, 1383,
appsec (1.791 ms) : 1766, 1817
. : milestone, 1791,
iast (1.521 ms) : 1497, 1545
. : milestone, 1521,
profiling (1.541 ms) : 1516, 1566
. : milestone, 1541,
tracing (1.529 ms) : 1504, 1553
. : milestone, 1529,
|
ExpressionHelper.throwRedactedException(this); | ||
if (symbol != null) { | ||
String typeName = symbol.getClass().getTypeName(); | ||
if (WellKnownClasses.isStringPrimitive(typeName)) { |
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.
Should we do this only after we check this is not redacted?
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?
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.
avoid calling to string if the type/value is redact...
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.
not a big deal, those toString are very cheap (and that's why we authorize them) and also very low chance that they would be redacted
}, { | ||
"eq": [ | ||
{"ref": "clazz"}, | ||
"class java.lang.String"] |
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.
I find this weird. I expected class to be just fully qualified name of the class. Same thing as we have instance of operator.
Maybe we should also provide a function to string those classes and instead calling toString we should just use the class name for this one
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.
yep, I found it also weird.
I will add the special toString later
}, { | ||
"eq": [ | ||
{"ref": "duration"}, | ||
"PT42S"] |
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.
This is cool
What Does This Do
WellKnown classes (like
UUID
) need to be treated as string primitives to be use in Expression Language and conditionsAdd a list of string primitives
Motivation
coherency with serialization behavior
Additional Notes
Jira ticket: DEBUG-1689