-
Notifications
You must be signed in to change notification settings - Fork 315
Add SparkPlanInfo constructor compatible with Databricks' Spark fork #9888
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
base: master
Are you sure you want to change the base?
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: 61f7bdb | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1048734
Total [baseline] (8.653 s) : 0, 8652631
Agent [candidate] (1.047 s) : 0, 1047061
Total [candidate] (8.648 s) : 0, 8648209
section iast
Agent [baseline] (1.179 s) : 0, 1179086
Total [baseline] (9.252 s) : 0, 9252033
Agent [candidate] (1.177 s) : 0, 1176875
Total [candidate] (9.263 s) : 0, 9263388
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.456 ms) : 0, 1456
BytebuddyAgent [baseline] (705.37 ms) : 0, 705370
BytebuddyAgent [candidate] (704.34 ms) : 0, 704340
GlobalTracer [baseline] (246.414 ms) : 0, 246414
GlobalTracer [candidate] (246.259 ms) : 0, 246259
AppSec [baseline] (32.498 ms) : 0, 32498
AppSec [candidate] (32.376 ms) : 0, 32376
Debugger [baseline] (6.367 ms) : 0, 6367
Debugger [candidate] (6.41 ms) : 0, 6410
Remote Config [baseline] (724.85 µs) : 0, 725
Remote Config [candidate] (704.774 µs) : 0, 705
Telemetry [baseline] (12.306 ms) : 0, 12306
Telemetry [candidate] (15.727 ms) : 0, 15727
Flare Poller [baseline] (8.819 ms) : 0, 8819
Flare Poller [candidate] (5.059 ms) : 0, 5059
section iast
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.453 ms) : 0, 1453
BytebuddyAgent [baseline] (828.319 ms) : 0, 828319
BytebuddyAgent [candidate] (826.555 ms) : 0, 826555
GlobalTracer [baseline] (234.062 ms) : 0, 234062
GlobalTracer [candidate] (234.148 ms) : 0, 234148
AppSec [baseline] (26.977 ms) : 0, 26977
AppSec [candidate] (28.633 ms) : 0, 28633
Debugger [baseline] (5.994 ms) : 0, 5994
Debugger [candidate] (6.036 ms) : 0, 6036
Remote Config [baseline] (599.365 µs) : 0, 599
Remote Config [candidate] (588.788 µs) : 0, 589
Telemetry [baseline] (8.358 ms) : 0, 8358
Telemetry [candidate] (8.295 ms) : 0, 8295
Flare Poller [baseline] (4.161 ms) : 0, 4161
Flare Poller [candidate] (4.213 ms) : 0, 4213
IAST [baseline] (34.398 ms) : 0, 34398
IAST [candidate] (32.296 ms) : 0, 32296
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056889
Total [baseline] (10.82 s) : 0, 10819933
Agent [candidate] (1.055 s) : 0, 1054827
Total [candidate] (10.735 s) : 0, 10735019
section appsec
Agent [baseline] (1.227 s) : 0, 1227216
Total [baseline] (10.89 s) : 0, 10889524
Agent [candidate] (1.228 s) : 0, 1228081
Total [candidate] (10.908 s) : 0, 10908033
section iast
Agent [baseline] (1.189 s) : 0, 1188788
Total [baseline] (11.253 s) : 0, 11253256
Agent [candidate] (1.184 s) : 0, 1183959
Total [candidate] (11.194 s) : 0, 11194173
section profiling
Agent [baseline] (1.191 s) : 0, 1190712
Total [baseline] (10.95 s) : 0, 10949972
Agent [candidate] (1.203 s) : 0, 1202755
Total [candidate] (10.938 s) : 0, 10937529
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.483 ms) : 0, 1483
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (710.828 ms) : 0, 710828
BytebuddyAgent [candidate] (709.762 ms) : 0, 709762
GlobalTracer [baseline] (248.493 ms) : 0, 248493
GlobalTracer [candidate] (247.887 ms) : 0, 247887
AppSec [baseline] (32.801 ms) : 0, 32801
AppSec [candidate] (32.634 ms) : 0, 32634
Debugger [baseline] (6.535 ms) : 0, 6535
Debugger [candidate] (6.517 ms) : 0, 6517
Remote Config [baseline] (712.595 µs) : 0, 713
Remote Config [candidate] (730.29 µs) : 0, 730
Telemetry [baseline] (13.681 ms) : 0, 13681
Telemetry [candidate] (12.867 ms) : 0, 12867
Flare Poller [baseline] (7.275 ms) : 0, 7275
Flare Poller [candidate] (8.096 ms) : 0, 8096
section appsec
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (731.824 ms) : 0, 731824
BytebuddyAgent [candidate] (732.48 ms) : 0, 732480
GlobalTracer [baseline] (238.609 ms) : 0, 238609
GlobalTracer [candidate] (238.853 ms) : 0, 238853
AppSec [baseline] (175.914 ms) : 0, 175914
AppSec [candidate] (175.654 ms) : 0, 175654
Debugger [baseline] (6.036 ms) : 0, 6036
Debugger [candidate] (6.084 ms) : 0, 6084
Remote Config [baseline] (653.125 µs) : 0, 653
Remote Config [candidate] (658.078 µs) : 0, 658
Telemetry [baseline] (8.649 ms) : 0, 8649
Telemetry [candidate] (8.727 ms) : 0, 8727
Flare Poller [baseline] (3.996 ms) : 0, 3996
Flare Poller [candidate] (4.001 ms) : 0, 4001
IAST [baseline] (25.069 ms) : 0, 25069
IAST [candidate] (25.114 ms) : 0, 25114
section iast
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (835.689 ms) : 0, 835689
BytebuddyAgent [candidate] (832.1 ms) : 0, 832100
GlobalTracer [baseline] (235.981 ms) : 0, 235981
GlobalTracer [candidate] (235.254 ms) : 0, 235254
AppSec [baseline] (29.823 ms) : 0, 29823
AppSec [candidate] (30.302 ms) : 0, 30302
Debugger [baseline] (6.087 ms) : 0, 6087
Debugger [candidate] (6.012 ms) : 0, 6012
Remote Config [baseline] (609.772 µs) : 0, 610
Remote Config [candidate] (606.031 µs) : 0, 606
Telemetry [baseline] (8.475 ms) : 0, 8475
Telemetry [candidate] (8.424 ms) : 0, 8424
Flare Poller [baseline] (4.127 ms) : 0, 4127
Flare Poller [candidate] (4.147 ms) : 0, 4147
IAST [baseline] (31.715 ms) : 0, 31715
IAST [candidate] (30.825 ms) : 0, 30825
section profiling
ProfilingAgent [baseline] (110.057 ms) : 0, 110057
ProfilingAgent [candidate] (111.507 ms) : 0, 111507
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (728.265 ms) : 0, 728265
BytebuddyAgent [candidate] (735.93 ms) : 0, 735930
GlobalTracer [baseline] (221.929 ms) : 0, 221929
GlobalTracer [candidate] (223.554 ms) : 0, 223554
AppSec [baseline] (31.89 ms) : 0, 31890
AppSec [candidate] (32.444 ms) : 0, 32444
Debugger [baseline] (9.278 ms) : 0, 9278
Debugger [candidate] (9.137 ms) : 0, 9137
Remote Config [baseline] (689.643 µs) : 0, 690
Remote Config [candidate] (728.057 µs) : 0, 728
Telemetry [baseline] (13.702 ms) : 0, 13702
Telemetry [candidate] (14.01 ms) : 0, 14010
Flare Poller [baseline] (4.098 ms) : 0, 4098
Flare Poller [candidate] (4.147 ms) : 0, 4147
Profiling [baseline] (110.725 ms) : 0, 110725
Profiling [candidate] (112.176 ms) : 0, 112176
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 3 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (17.117 ms) : 16949, 17285
. : milestone, 17117,
appsec (19.592 ms) : 19391, 19793
. : milestone, 19592,
code_origins (17.985 ms) : 17805, 18166
. : milestone, 17985,
iast (17.714 ms) : 17536, 17892
. : milestone, 17714,
profiling (18.465 ms) : 18282, 18649
. : milestone, 18465,
tracing (17.993 ms) : 17811, 18175
. : milestone, 17993,
section candidate
no_agent (19.056 ms) : 18864, 19248
. : milestone, 19056,
appsec (18.758 ms) : 18564, 18953
. : milestone, 18758,
code_origins (17.904 ms) : 17724, 18084
. : milestone, 17904,
iast (18.616 ms) : 18427, 18804
. : milestone, 18616,
profiling (18.452 ms) : 18272, 18632
. : milestone, 18452,
tracing (18.575 ms) : 18388, 18761
. : milestone, 18575,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (1.201 ms) : 1189, 1212
. : milestone, 1201,
iast (3.189 ms) : 3153, 3225
. : milestone, 3189,
iast_FULL (5.771 ms) : 5713, 5829
. : milestone, 5771,
iast_GLOBAL (3.66 ms) : 3591, 3728
. : milestone, 3660,
profiling (1.912 ms) : 1896, 1928
. : milestone, 1912,
tracing (1.824 ms) : 1807, 1841
. : milestone, 1824,
section candidate
no_agent (1.204 ms) : 1192, 1215
. : milestone, 1204,
iast (3.224 ms) : 3186, 3262
. : milestone, 3224,
iast_FULL (5.603 ms) : 5549, 5658
. : milestone, 5603,
iast_GLOBAL (3.628 ms) : 3575, 3680
. : milestone, 3628,
profiling (1.9 ms) : 1884, 1916
. : milestone, 1900,
tracing (1.797 ms) : 1783, 1812
. : milestone, 1797,
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~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1488
. : milestone, 1476,
appsec (3.689 ms) : 3471, 3907
. : milestone, 3689,
iast (2.207 ms) : 2144, 2271
. : milestone, 2207,
iast_GLOBAL (2.25 ms) : 2186, 2314
. : milestone, 2250,
profiling (2.066 ms) : 2014, 2119
. : milestone, 2066,
tracing (2.032 ms) : 1982, 2082
. : milestone, 2032,
section candidate
no_agent (1.475 ms) : 1464, 1487
. : milestone, 1475,
appsec (3.598 ms) : 3389, 3807
. : milestone, 3598,
iast (2.201 ms) : 2137, 2264
. : milestone, 2201,
iast_GLOBAL (2.244 ms) : 2180, 2308
. : milestone, 2244,
profiling (2.066 ms) : 2013, 2118
. : milestone, 2066,
tracing (2.022 ms) : 1973, 2071
. : milestone, 2022,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~61f7bdb5e9, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (15.55 s) : 15550000, 15550000
. : milestone, 15550000,
appsec (14.96 s) : 14960000, 14960000
. : milestone, 14960000,
iast (18.232 s) : 18232000, 18232000
. : milestone, 18232000,
iast_GLOBAL (17.952 s) : 17952000, 17952000
. : milestone, 17952000,
profiling (14.981 s) : 14981000, 14981000
. : milestone, 14981000,
tracing (14.788 s) : 14788000, 14788000
. : milestone, 14788000,
section candidate
no_agent (15.229 s) : 15229000, 15229000
. : milestone, 15229000,
appsec (15.145 s) : 15145000, 15145000
. : milestone, 15145000,
iast (18.456 s) : 18456000, 18456000
. : milestone, 18456000,
iast_GLOBAL (17.69 s) : 17690000, 17690000
. : milestone, 17690000,
profiling (14.981 s) : 14981000, 14981000
. : milestone, 14981000,
tracing (14.846 s) : 14846000, 14846000
. : milestone, 14846000,
|
06f8fee to
f649787
Compare
f649787 to
03b891a
Compare
| SparkPlanInfo.class, | ||
| String.class, | ||
| String.class, | ||
| scala.collection.immutable.Seq.class, |
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.
One of the most painful discrepancies between Scala 2.12 and 2.13 is in scala.Seq. And these bugs are hard to tackle.
I think it makes sense having two separate Spark212PlanInfoUtils2 and Spark213PlanInfoUtils classes, at least for the constructors and databricksConstructor part. This assures code is compiled with the same Scala version as it's run.
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.
Yeah, this makes sense - I was worried initially it was Spark version incompatibilities but if it's Scala there isn't much reason to not have two separate files. I ended up putting them in completely separate files with no common abstraction since I couldn't find a clean way of separating them for now, but I imagine down the line when we need to add more constructors that may become more appealing. Let me know what you think!
03b891a to
078c8db
Compare
3c7c187 to
ad8c7bb
Compare
ad8c7bb to
ac0f2c7
Compare
ac0f2c7 to
61f7bdb
Compare
What Does This Do
The primary addition in this PR is support for the Databricks-specific
SparkPlanInfoconstructor. The available public methods and constructors on Databricks 17.3 LTS (based on Spark 4.0.0), for example, look like this:The last three methods (
estRowCount,rddScopeId,explainId) are non-standard, and thus must be accounted for in these specific constructors.Note that we attempt the Databricks constructor first since it has more info, and then the standard constructor. Both are unlikely to exist simultaneously, but this is just to be defensive. In addition, we try to take advantage of the
MethodHandlesclass where possible for reflection, but can't use it to load any of the getters inSparkPlanInfoUtilsas all the methods are inherited (MethodHandlesusesgetDeclaredMethodwhich excludes inherited methods).Additional, smaller changes worth noting:
SparkPlanInfoconstructor logic into a dedicated class,SparkPlanInfoUtils.AbstractSparkPlanSerializerto improve how we reflect thesimpleStringmethod, specifically preferring the.invokemethod provided byMethodHandlersas a nice wrapper for exception handling logic.simpleString.nodeName(),simpleString(),children(), andmetrics()) to avoid version incompatibilities causing muzzle to reject the entire Spark tracer.scala.Seq(used bychildrenandmetrics) was migrated fromscala.collections.Seqtoscala.collections.immutable.Seq.Motivation
We would like to support Spark jobs for column-level metadata extraction, but they use a different signature for their
SparkPlanInfoconstructors. This PR fixes that.Additional Notes
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: DJM-974