-
Notifications
You must be signed in to change notification settings - Fork 318
Use ClassNameFilter to track uninteresting classes
#9976
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
This comment has been minimized.
This comment has been minimized.
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.106 s) : 0, 1105884
Total [baseline] (10.874 s) : 0, 10874247
Agent [candidate] (1.111 s) : 0, 1110949
Total [candidate] (10.829 s) : 0, 10829445
section appsec
Agent [baseline] (1.288 s) : 0, 1287843
Total [baseline] (11.231 s) : 0, 11231441
Agent [candidate] (1.285 s) : 0, 1285342
Total [candidate] (11.088 s) : 0, 11088450
section iast
Agent [baseline] (1.243 s) : 0, 1242857
Total [baseline] (11.297 s) : 0, 11297219
Agent [candidate] (1.242 s) : 0, 1242293
Total [candidate] (11.245 s) : 0, 11244723
section profiling
Agent [baseline] (1.237 s) : 0, 1236556
Total [baseline] (11.197 s) : 0, 11197201
Agent [candidate] (1.234 s) : 0, 1234022
Total [candidate] (11.104 s) : 0, 11103996
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.489 ms) : 0, 1489
crashtracking [candidate] (1.501 ms) : 0, 1501
BytebuddyAgent [baseline] (710.671 ms) : 0, 710671
BytebuddyAgent [candidate] (714.85 ms) : 0, 714850
GlobalTracer [baseline] (250.022 ms) : 0, 250022
GlobalTracer [candidate] (250.413 ms) : 0, 250413
AppSec [baseline] (32.134 ms) : 0, 32134
AppSec [candidate] (32.165 ms) : 0, 32165
Debugger [baseline] (64.091 ms) : 0, 64091
Debugger [candidate] (64.222 ms) : 0, 64222
Remote Config [baseline] (633.121 µs) : 0, 633
Remote Config [candidate] (646.503 µs) : 0, 647
Telemetry [baseline] (8.292 ms) : 0, 8292
Telemetry [candidate] (8.429 ms) : 0, 8429
Flare Poller [baseline] (3.749 ms) : 0, 3749
Flare Poller [candidate] (3.791 ms) : 0, 3791
section appsec
crashtracking [baseline] (1.488 ms) : 0, 1488
crashtracking [candidate] (1.485 ms) : 0, 1485
BytebuddyAgent [baseline] (734.405 ms) : 0, 734405
BytebuddyAgent [candidate] (734.033 ms) : 0, 734033
GlobalTracer [baseline] (241.856 ms) : 0, 241856
GlobalTracer [candidate] (241.618 ms) : 0, 241618
AppSec [baseline] (175.633 ms) : 0, 175633
AppSec [candidate] (173.99 ms) : 0, 173990
Debugger [baseline] (61.787 ms) : 0, 61787
Debugger [candidate] (61.52 ms) : 0, 61520
Remote Config [baseline] (680.011 µs) : 0, 680
Remote Config [candidate] (673.282 µs) : 0, 673
Telemetry [baseline] (8.392 ms) : 0, 8392
Telemetry [candidate] (8.34 ms) : 0, 8340
Flare Poller [baseline] (3.799 ms) : 0, 3799
Flare Poller [candidate] (3.964 ms) : 0, 3964
IAST [baseline] (24.875 ms) : 0, 24875
IAST [candidate] (24.848 ms) : 0, 24848
section iast
crashtracking [baseline] (1.505 ms) : 0, 1505
crashtracking [candidate] (1.499 ms) : 0, 1499
BytebuddyAgent [baseline] (833.493 ms) : 0, 833493
BytebuddyAgent [candidate] (834.336 ms) : 0, 834336
GlobalTracer [baseline] (237.978 ms) : 0, 237978
GlobalTracer [candidate] (237.915 ms) : 0, 237915
AppSec [baseline] (34.343 ms) : 0, 34343
AppSec [candidate] (32.076 ms) : 0, 32076
Debugger [baseline] (61.509 ms) : 0, 61509
Debugger [candidate] (60.737 ms) : 0, 60737
Remote Config [baseline] (541.22 µs) : 0, 541
Remote Config [candidate] (564.412 µs) : 0, 564
Telemetry [baseline] (7.634 ms) : 0, 7634
Telemetry [candidate] (7.6 ms) : 0, 7600
Flare Poller [baseline] (3.498 ms) : 0, 3498
Flare Poller [candidate] (3.486 ms) : 0, 3486
IAST [baseline] (27.566 ms) : 0, 27566
IAST [candidate] (29.236 ms) : 0, 29236
section profiling
crashtracking [baseline] (1.44 ms) : 0, 1440
crashtracking [candidate] (1.423 ms) : 0, 1423
BytebuddyAgent [baseline] (736.552 ms) : 0, 736552
BytebuddyAgent [candidate] (735.9 ms) : 0, 735900
GlobalTracer [baseline] (223.125 ms) : 0, 223125
GlobalTracer [candidate] (222.622 ms) : 0, 222622
AppSec [baseline] (32.269 ms) : 0, 32269
AppSec [candidate] (32.334 ms) : 0, 32334
Debugger [baseline] (63.912 ms) : 0, 63912
Debugger [candidate] (63.345 ms) : 0, 63345
Remote Config [baseline] (659.843 µs) : 0, 660
Remote Config [candidate] (671.563 µs) : 0, 672
Telemetry [baseline] (8.069 ms) : 0, 8069
Telemetry [candidate] (7.925 ms) : 0, 7925
Flare Poller [baseline] (3.757 ms) : 0, 3757
Flare Poller [candidate] (3.757 ms) : 0, 3757
ProfilingAgent [baseline] (97.674 ms) : 0, 97674
ProfilingAgent [candidate] (97.094 ms) : 0, 97094
Profiling [baseline] (98.267 ms) : 0, 98267
Profiling [candidate] (97.676 ms) : 0, 97676
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.107 s) : 0, 1106920
Total [baseline] (8.869 s) : 0, 8869485
Agent [candidate] (1.099 s) : 0, 1098912
Total [candidate] (8.834 s) : 0, 8833860
section iast
Agent [baseline] (1.242 s) : 0, 1242343
Total [baseline] (9.567 s) : 0, 9567100
Agent [candidate] (1.263 s) : 0, 1262829
Total [candidate] (9.622 s) : 0, 9621594
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.503 ms) : 0, 1503
crashtracking [candidate] (1.475 ms) : 0, 1475
BytebuddyAgent [baseline] (712.182 ms) : 0, 712182
BytebuddyAgent [candidate] (706.69 ms) : 0, 706690
GlobalTracer [baseline] (250.114 ms) : 0, 250114
GlobalTracer [candidate] (248.453 ms) : 0, 248453
AppSec [baseline] (32.266 ms) : 0, 32266
AppSec [candidate] (31.984 ms) : 0, 31984
Debugger [baseline] (63.315 ms) : 0, 63315
Debugger [candidate] (62.954 ms) : 0, 62954
Remote Config [baseline] (641.931 µs) : 0, 642
Remote Config [candidate] (651.474 µs) : 0, 651
Telemetry [baseline] (8.304 ms) : 0, 8304
Telemetry [candidate] (8.262 ms) : 0, 8262
Flare Poller [baseline] (3.695 ms) : 0, 3695
Flare Poller [candidate] (3.709 ms) : 0, 3709
section iast
crashtracking [baseline] (1.485 ms) : 0, 1485
crashtracking [candidate] (1.515 ms) : 0, 1515
BytebuddyAgent [baseline] (834.001 ms) : 0, 834001
BytebuddyAgent [candidate] (851.459 ms) : 0, 851459
GlobalTracer [baseline] (237.704 ms) : 0, 237704
GlobalTracer [candidate] (239.474 ms) : 0, 239474
AppSec [baseline] (32.265 ms) : 0, 32265
AppSec [candidate] (35.26 ms) : 0, 35260
Debugger [baseline] (60.676 ms) : 0, 60676
Debugger [candidate] (60.91 ms) : 0, 60910
Remote Config [baseline] (561.704 µs) : 0, 562
Remote Config [candidate] (556.253 µs) : 0, 556
Telemetry [baseline] (7.621 ms) : 0, 7621
Telemetry [candidate] (7.665 ms) : 0, 7665
Flare Poller [baseline] (3.52 ms) : 0, 3520
Flare Poller [candidate] (3.478 ms) : 0, 3478
IAST [baseline] (29.521 ms) : 0, 29521
IAST [candidate] (27.178 ms) : 0, 27178
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 0 performance regressions! Performance is the same for 19 metrics, 15 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section baseline
no_agent (1.21 ms) : 1199, 1222
. : milestone, 1210,
iast (3.292 ms) : 3250, 3333
. : milestone, 3292,
iast_FULL (5.914 ms) : 5854, 5975
. : milestone, 5914,
iast_GLOBAL (3.772 ms) : 3712, 3832
. : milestone, 3772,
profiling (2.064 ms) : 2046, 2082
. : milestone, 2064,
tracing (1.903 ms) : 1886, 1919
. : milestone, 1903,
section candidate
no_agent (1.208 ms) : 1196, 1220
. : milestone, 1208,
iast (3.228 ms) : 3191, 3266
. : milestone, 3228,
iast_FULL (5.582 ms) : 5526, 5637
. : milestone, 5582,
iast_GLOBAL (3.607 ms) : 3561, 3654
. : milestone, 3607,
profiling (2.019 ms) : 2001, 2036
. : milestone, 2019,
tracing (1.799 ms) : 1784, 1814
. : milestone, 1799,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section baseline
no_agent (18.12 ms) : 17936, 18304
. : milestone, 18120,
appsec (18.484 ms) : 18296, 18673
. : milestone, 18484,
code_origins (17.722 ms) : 17548, 17895
. : milestone, 17722,
iast (17.663 ms) : 17484, 17842
. : milestone, 17663,
profiling (18.454 ms) : 18267, 18640
. : milestone, 18454,
tracing (17.671 ms) : 17494, 17848
. : milestone, 17671,
section candidate
no_agent (18.094 ms) : 17907, 18280
. : milestone, 18094,
appsec (18.469 ms) : 18284, 18654
. : milestone, 18469,
code_origins (17.753 ms) : 17579, 17928
. : milestone, 17753,
iast (17.517 ms) : 17345, 17690
. : milestone, 17517,
profiling (18.698 ms) : 18509, 18887
. : milestone, 18698,
tracing (17.539 ms) : 17365, 17713
. : milestone, 17539,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (3.66 ms) : 3446, 3874
. : milestone, 3660,
iast (2.217 ms) : 2153, 2282
. : milestone, 2217,
iast_GLOBAL (2.262 ms) : 2197, 2326
. : milestone, 2262,
profiling (2.059 ms) : 2006, 2111
. : milestone, 2059,
tracing (2.055 ms) : 2004, 2106
. : milestone, 2055,
section candidate
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (3.676 ms) : 3460, 3892
. : milestone, 3676,
iast (2.228 ms) : 2164, 2293
. : milestone, 2228,
iast_GLOBAL (2.26 ms) : 2195, 2325
. : milestone, 2260,
profiling (2.079 ms) : 2026, 2132
. : milestone, 2079,
tracing (2.035 ms) : 1984, 2086
. : milestone, 2035,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~d04c27c49a, baseline=1.57.0-SNAPSHOT~c79dfc656d
dateFormat X
axisFormat %s
section baseline
no_agent (15.267 s) : 15267000, 15267000
. : milestone, 15267000,
appsec (14.951 s) : 14951000, 14951000
. : milestone, 14951000,
iast (18.304 s) : 18304000, 18304000
. : milestone, 18304000,
iast_GLOBAL (17.877 s) : 17877000, 17877000
. : milestone, 17877000,
profiling (14.568 s) : 14568000, 14568000
. : milestone, 14568000,
tracing (14.807 s) : 14807000, 14807000
. : milestone, 14807000,
section candidate
no_agent (15.424 s) : 15424000, 15424000
. : milestone, 15424000,
appsec (14.673 s) : 14673000, 14673000
. : milestone, 14673000,
iast (18.1 s) : 18100000, 18100000
. : milestone, 18100000,
iast_GLOBAL (17.884 s) : 17884000, 17884000
. : milestone, 17884000,
profiling (14.543 s) : 14543000, 14543000
. : milestone, 14543000,
tracing (15.003 s) : 15003000, 15003000
. : milestone, 15003000,
|
bric3
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.
It looks ok to me, but maybe another pair of eye could be useful!
...agent-tooling/src/main/java/datadog/trace/agent/tooling/bytebuddy/memoize/NoMatchFilter.java
Outdated
Show resolved
Hide resolved
| // populate filter from current run and persist at shutdown | ||
| ClassNameFilter filter = emptyNoMatchFilter(); | ||
| Runtime.getRuntime().addShutdownHook(new ShutdownHook(noMatchFile, filter)); | ||
| return filter; |
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.
question: Should (over) writing be toggleable ?
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.
No, it's simpler to let the user decide when to regenerate the file by deleting it from the directory before the next run. That way you don't need to remember to remove the overwrite option.
AlexeyKuznetsov-DD
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.
Just curious if it is possible to cover changes with tests?
Or it is 100% identical to previous code and already covered?
tests are in the upstream repository - functionally it is the same as before, i.e. a simple hash-based filter |
What Does This Do
Replaces
ClassCodeFilterwithClassNameFilterfrom https://github.com/DataDog/dd-instrument-javaClassNameFilterhas a number of improvements, including:Motivation
Uninteresting classes can be excluded from further type-matching.
Note this information can be shared across runs if the type-resolver cache is enabled with
-Ddd.resolver.cache.dir=<directory>orDD_RESOLVER_CACHE_DIR=<directory>Additional Notes
Also uses
ClassNameFilterto track public classes.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]