-
Notifications
You must be signed in to change notification settings - Fork 323
Simplify type outlines to not implement type.getDeclaringType() and type.getEnclosingType() #9644
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
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: 8f62fe5 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.01 s) : 0, 1009608
Total [baseline] (8.687 s) : 0, 8687148
Agent [candidate] (1.01 s) : 0, 1010462
Total [candidate] (8.66 s) : 0, 8660082
section iast
Agent [baseline] (1.144 s) : 0, 1144363
Total [baseline] (9.26 s) : 0, 9259894
Agent [candidate] (1.144 s) : 0, 1144378
Total [candidate] (9.215 s) : 0, 9214870
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.475 ms) : 0, 1475
crashtracking [candidate] (1.46 ms) : 0, 1460
BytebuddyAgent [baseline] (691.685 ms) : 0, 691685
BytebuddyAgent [candidate] (690.722 ms) : 0, 690722
GlobalTracer [baseline] (237.192 ms) : 0, 237192
GlobalTracer [candidate] (237.054 ms) : 0, 237054
AppSec [baseline] (33.001 ms) : 0, 33001
AppSec [candidate] (32.844 ms) : 0, 32844
Debugger [baseline] (6.414 ms) : 0, 6414
Debugger [candidate] (6.367 ms) : 0, 6367
Remote Config [baseline] (687.485 µs) : 0, 687
Remote Config [candidate] (672.056 µs) : 0, 672
Telemetry [baseline] (9.173 ms) : 0, 9173
Telemetry [candidate] (9.073 ms) : 0, 9073
Flare Poller [baseline] (8.792 ms) : 0, 8792
Flare Poller [candidate] (10.992 ms) : 0, 10992
section iast
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (813.129 ms) : 0, 813129
BytebuddyAgent [candidate] (813.244 ms) : 0, 813244
GlobalTracer [baseline] (227.51 ms) : 0, 227510
GlobalTracer [candidate] (227.662 ms) : 0, 227662
IAST [baseline] (26.454 ms) : 0, 26454
IAST [candidate] (26.444 ms) : 0, 26444
AppSec [baseline] (35.35 ms) : 0, 35350
AppSec [candidate] (35.194 ms) : 0, 35194
Debugger [baseline] (6.068 ms) : 0, 6068
Debugger [candidate] (6.021 ms) : 0, 6021
Remote Config [baseline] (590.214 µs) : 0, 590
Remote Config [candidate] (585.657 µs) : 0, 586
Telemetry [baseline] (8.316 ms) : 0, 8316
Telemetry [candidate] (8.217 ms) : 0, 8217
Flare Poller [baseline] (4.242 ms) : 0, 4242
Flare Poller [candidate] (4.329 ms) : 0, 4329
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.011 s) : 0, 1011106
Total [baseline] (10.653 s) : 0, 10652578
Agent [candidate] (1.011 s) : 0, 1011253
Total [candidate] (10.766 s) : 0, 10766267
section appsec
Agent [baseline] (1.186 s) : 0, 1186456
Total [baseline] (11.012 s) : 0, 11012440
Agent [candidate] (1.188 s) : 0, 1188271
Total [candidate] (11.082 s) : 0, 11082053
section iast
Agent [baseline] (1.145 s) : 0, 1145178
Total [baseline] (11.007 s) : 0, 11007291
Agent [candidate] (1.151 s) : 0, 1150612
Total [candidate] (10.988 s) : 0, 10988275
section profiling
Agent [baseline] (1.156 s) : 0, 1156108
Total [baseline] (11.05 s) : 0, 11049537
Agent [candidate] (1.156 s) : 0, 1156036
Total [candidate] (11.082 s) : 0, 11081803
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.475 ms) : 0, 1475
crashtracking [candidate] (1.475 ms) : 0, 1475
BytebuddyAgent [baseline] (692.234 ms) : 0, 692234
BytebuddyAgent [candidate] (691.029 ms) : 0, 691029
GlobalTracer [baseline] (237.442 ms) : 0, 237442
GlobalTracer [candidate] (238.308 ms) : 0, 238308
AppSec [baseline] (32.995 ms) : 0, 32995
AppSec [candidate] (33.427 ms) : 0, 33427
Debugger [baseline] (6.407 ms) : 0, 6407
Debugger [candidate] (6.447 ms) : 0, 6447
Remote Config [baseline] (687.365 µs) : 0, 687
Remote Config [candidate] (698.492 µs) : 0, 698
Telemetry [baseline] (9.188 ms) : 0, 9188
Telemetry [candidate] (9.035 ms) : 0, 9035
Flare Poller [baseline] (9.449 ms) : 0, 9449
Flare Poller [candidate] (9.568 ms) : 0, 9568
section appsec
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (714.448 ms) : 0, 714448
BytebuddyAgent [candidate] (717.522 ms) : 0, 717522
GlobalTracer [baseline] (229.36 ms) : 0, 229360
GlobalTracer [candidate] (229.07 ms) : 0, 229070
IAST [baseline] (25.226 ms) : 0, 25226
IAST [candidate] (25.154 ms) : 0, 25154
AppSec [baseline] (172.502 ms) : 0, 172502
AppSec [candidate] (174.18 ms) : 0, 174180
Debugger [baseline] (6.137 ms) : 0, 6137
Debugger [candidate] (6.049 ms) : 0, 6049
Remote Config [baseline] (642.993 µs) : 0, 643
Remote Config [candidate] (665.717 µs) : 0, 666
Telemetry [baseline] (9.956 ms) : 0, 9956
Telemetry [candidate] (9.008 ms) : 0, 9008
Flare Poller [baseline] (5.6 ms) : 0, 5600
Flare Poller [candidate] (3.977 ms) : 0, 3977
section iast
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (813.187 ms) : 0, 813187
BytebuddyAgent [candidate] (818.42 ms) : 0, 818420
GlobalTracer [baseline] (228.169 ms) : 0, 228169
GlobalTracer [candidate] (228.717 ms) : 0, 228717
IAST [baseline] (26.539 ms) : 0, 26539
IAST [candidate] (26.474 ms) : 0, 26474
AppSec [baseline] (35.413 ms) : 0, 35413
AppSec [candidate] (35.058 ms) : 0, 35058
Debugger [baseline] (6.044 ms) : 0, 6044
Debugger [candidate] (6.033 ms) : 0, 6033
Remote Config [baseline] (600.355 µs) : 0, 600
Remote Config [candidate] (583.821 µs) : 0, 584
Telemetry [baseline] (8.242 ms) : 0, 8242
Telemetry [candidate] (8.201 ms) : 0, 8201
Flare Poller [baseline] (4.283 ms) : 0, 4283
Flare Poller [candidate] (4.328 ms) : 0, 4328
section profiling
crashtracking [baseline] (1.432 ms) : 0, 1432
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (720.162 ms) : 0, 720162
BytebuddyAgent [candidate] (720.261 ms) : 0, 720261
GlobalTracer [baseline] (213.459 ms) : 0, 213459
GlobalTracer [candidate] (213.423 ms) : 0, 213423
AppSec [baseline] (32.764 ms) : 0, 32764
AppSec [candidate] (32.478 ms) : 0, 32478
Debugger [baseline] (6.544 ms) : 0, 6544
Debugger [candidate] (7.324 ms) : 0, 7324
Remote Config [baseline] (836.522 µs) : 0, 837
Remote Config [candidate] (769.653 µs) : 0, 770
Telemetry [baseline] (15.621 ms) : 0, 15621
Telemetry [candidate] (15.795 ms) : 0, 15795
Flare Poller [baseline] (5.041 ms) : 0, 5041
Flare Poller [candidate] (4.226 ms) : 0, 4226
ProfilingAgent [baseline] (105.575 ms) : 0, 105575
ProfilingAgent [candidate] (104.681 ms) : 0, 104681
Profiling [baseline] (108.282 ms) : 0, 108282
Profiling [candidate] (108.015 ms) : 0, 108015
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section baseline
no_agent (4.559 ms) : 4507, 4611
. : milestone, 4559,
iast (9.951 ms) : 9785, 10117
. : milestone, 9951,
iast_FULL (14.153 ms) : 13873, 14433
. : milestone, 14153,
iast_GLOBAL (10.686 ms) : 10490, 10883
. : milestone, 10686,
profiling (9.146 ms) : 8996, 9295
. : milestone, 9146,
tracing (7.91 ms) : 7795, 8025
. : milestone, 7910,
section candidate
no_agent (4.374 ms) : 4325, 4423
. : milestone, 4374,
iast (9.97 ms) : 9804, 10136
. : milestone, 9970,
iast_FULL (14.16 ms) : 13875, 14446
. : milestone, 14160,
iast_GLOBAL (11.107 ms) : 10906, 11308
. : milestone, 11107,
profiling (9.274 ms) : 9120, 9428
. : milestone, 9274,
tracing (7.602 ms) : 7490, 7714
. : milestone, 7602,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section baseline
no_agent (36.697 ms) : 36398, 36996
. : milestone, 36697,
appsec (49.353 ms) : 48938, 49769
. : milestone, 49353,
code_origins (44.248 ms) : 43876, 44620
. : milestone, 44248,
iast (45.496 ms) : 45108, 45884
. : milestone, 45496,
profiling (49.673 ms) : 49210, 50136
. : milestone, 49673,
tracing (42.995 ms) : 42634, 43356
. : milestone, 42995,
section candidate
no_agent (37.188 ms) : 36898, 37479
. : milestone, 37188,
appsec (49.959 ms) : 49516, 50402
. : milestone, 49959,
code_origins (45.207 ms) : 44797, 45616
. : milestone, 45207,
iast (45.655 ms) : 45266, 46045
. : milestone, 45655,
profiling (51.434 ms) : 50925, 51943
. : milestone, 51434,
tracing (44.92 ms) : 44525, 45315
. : milestone, 44920,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1466, 1489
. : milestone, 1477,
appsec (3.638 ms) : 3425, 3850
. : milestone, 3638,
iast (2.211 ms) : 2147, 2274
. : milestone, 2211,
iast_GLOBAL (2.246 ms) : 2182, 2310
. : milestone, 2246,
profiling (2.497 ms) : 2330, 2664
. : milestone, 2497,
tracing (2.019 ms) : 1970, 2068
. : milestone, 2019,
section candidate
no_agent (1.477 ms) : 1466, 1489
. : milestone, 1477,
appsec (3.665 ms) : 3452, 3877
. : milestone, 3665,
iast (2.205 ms) : 2142, 2268
. : milestone, 2205,
iast_GLOBAL (2.249 ms) : 2186, 2313
. : milestone, 2249,
profiling (2.067 ms) : 2014, 2120
. : milestone, 2067,
tracing (2.017 ms) : 1968, 2066
. : milestone, 2017,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~8f62fe5b71, baseline=1.54.0-SNAPSHOT~e814315ae4
dateFormat X
axisFormat %s
section baseline
no_agent (15.021 s) : 15021000, 15021000
. : milestone, 15021000,
appsec (15.041 s) : 15041000, 15041000
. : milestone, 15041000,
iast (18.257 s) : 18257000, 18257000
. : milestone, 18257000,
iast_GLOBAL (17.92 s) : 17920000, 17920000
. : milestone, 17920000,
profiling (15.207 s) : 15207000, 15207000
. : milestone, 15207000,
tracing (15.114 s) : 15114000, 15114000
. : milestone, 15114000,
section candidate
no_agent (15.189 s) : 15189000, 15189000
. : milestone, 15189000,
appsec (15.066 s) : 15066000, 15066000
. : milestone, 15066000,
iast (18.745 s) : 18745000, 18745000
. : milestone, 18745000,
iast_GLOBAL (18.003 s) : 18003000, 18003000
. : milestone, 18003000,
profiling (15.513 s) : 15513000, 15513000
. : milestone, 15513000,
tracing (15.166 s) : 15166000, 15166000
. : milestone, 15166000,
|
...t/agent-tooling/src/main/java/datadog/trace/agent/tooling/bytebuddy/outline/TypeOutline.java
Outdated
Show resolved
Hide resolved
4626764 to
37116b5
Compare
163cb99 to
d2b5d1d
Compare
…ype.getEnclosingType() These methods are not used for matching purposes, so don't need to be maintained in outlines. There is one use of type.isAnonymousType() in IAST, but this use is under a feature flag that is off by default. To satisfy that use we provide a simple isAnonymousType() implementation which is based on the '$number' convention for anonymous class names. Note: if anything does touch type.getDeclaringType() / type.getEnclosingType() later on when doing the final transformation then the outline type is automatically inflated to a full type. (This is already the case for other methods that aren't available in type outlines.) We also drop type.getClassFileVersion() from outlines for the same reason.
d2b5d1d to
8f62fe5
Compare
PerfectSlayer
left a comment
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.
👏 praise: Nice clean up. The less features there are, the less you would have to port to the new instrument library 😄
Motivation
These methods are not used for matching purposes, so don't need to be maintained in outlines.
There is one use of type.isAnonymousType() in IAST, but this is under a support flag - I could not find any active use of that support flag. To satisfy the original use-case (involving MyBatis) we add a simple anonymous type heuristic to that particular instrumentation, based on the '$number' Java language convention for anonymous class names.
( If necessary we can further enhance that specialized matcher without incurring overhead for all outline parsing )
Note: if anything does touch type.getDeclaringType() / type.getEnclosingType() later on when doing the final transformation then the outline type is automatically inflated to a full type. (This is already the case for other methods that aren't available in type outlines.)
We also drop type.getClassFileVersion() from outlines for the same reason.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]