-
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: 261e9b1 | 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 54 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1042605
Total [baseline] (8.664 s) : 0, 8663585
Agent [candidate] (1.031 s) : 0, 1031452
Total [candidate] (8.623 s) : 0, 8622998
section iast
Agent [baseline] (1.16 s) : 0, 1160365
Total [baseline] (9.37 s) : 0, 9370015
Agent [candidate] (1.162 s) : 0, 1161876
Total [candidate] (9.336 s) : 0, 9335996
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.48 ms) : 0, 1480
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (711.797 ms) : 0, 711797
BytebuddyAgent [candidate] (703.603 ms) : 0, 703603
GlobalTracer [baseline] (246.765 ms) : 0, 246765
GlobalTracer [candidate] (244.886 ms) : 0, 244886
AppSec [baseline] (32.789 ms) : 0, 32789
AppSec [candidate] (32.44 ms) : 0, 32440
Debugger [baseline] (6.535 ms) : 0, 6535
Debugger [candidate] (6.4 ms) : 0, 6400
Remote Config [baseline] (686.341 µs) : 0, 686
Remote Config [candidate] (680.036 µs) : 0, 680
Telemetry [baseline] (14.662 ms) : 0, 14662
Telemetry [candidate] (14.314 ms) : 0, 14314
Flare Poller [baseline] (6.48 ms) : 0, 6480
Flare Poller [candidate] (6.548 ms) : 0, 6548
section iast
crashtracking [baseline] (1.465 ms) : 0, 1465
crashtracking [candidate] (1.481 ms) : 0, 1481
BytebuddyAgent [baseline] (823.378 ms) : 0, 823378
BytebuddyAgent [candidate] (824.411 ms) : 0, 824411
GlobalTracer [baseline] (233.304 ms) : 0, 233304
GlobalTracer [candidate] (234.011 ms) : 0, 234011
IAST [baseline] (31.665 ms) : 0, 31665
IAST [candidate] (32.511 ms) : 0, 32511
AppSec [baseline] (29.673 ms) : 0, 29673
AppSec [candidate] (28.817 ms) : 0, 28817
Debugger [baseline] (6.215 ms) : 0, 6215
Debugger [candidate] (6.125 ms) : 0, 6125
Remote Config [baseline] (608.652 µs) : 0, 609
Remote Config [candidate] (591.928 µs) : 0, 592
Telemetry [baseline] (8.61 ms) : 0, 8610
Telemetry [candidate] (8.506 ms) : 0, 8506
Flare Poller [baseline] (4.098 ms) : 0, 4098
Flare Poller [candidate] (4.169 ms) : 0, 4169
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1032416
Total [baseline] (10.878 s) : 0, 10878145
Agent [candidate] (1.03 s) : 0, 1029580
Total [candidate] (10.858 s) : 0, 10857564
section appsec
Agent [baseline] (1.202 s) : 0, 1201836
Total [baseline] (10.915 s) : 0, 10915298
Agent [candidate] (1.21 s) : 0, 1209821
Total [candidate] (10.928 s) : 0, 10927710
section iast
Agent [baseline] (1.168 s) : 0, 1167747
Total [baseline] (11.081 s) : 0, 11081102
Agent [candidate] (1.159 s) : 0, 1159196
Total [candidate] (11.14 s) : 0, 11139512
section profiling
Agent [baseline] (1.182 s) : 0, 1181666
Total [baseline] (10.967 s) : 0, 10966996
Agent [candidate] (1.175 s) : 0, 1175226
Total [candidate] (10.91 s) : 0, 10910035
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (703.759 ms) : 0, 703759
BytebuddyAgent [candidate] (701.947 ms) : 0, 701947
GlobalTracer [baseline] (245.151 ms) : 0, 245151
GlobalTracer [candidate] (244.947 ms) : 0, 244947
AppSec [baseline] (32.486 ms) : 0, 32486
AppSec [candidate] (32.182 ms) : 0, 32182
Debugger [baseline] (6.414 ms) : 0, 6414
Debugger [candidate] (6.354 ms) : 0, 6354
Remote Config [baseline] (671.156 µs) : 0, 671
Remote Config [candidate] (674.046 µs) : 0, 674
Telemetry [baseline] (12.869 ms) : 0, 12869
Telemetry [candidate] (13.57 ms) : 0, 13570
Flare Poller [baseline] (8.309 ms) : 0, 8309
Flare Poller [candidate] (7.29 ms) : 0, 7290
section appsec
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (725.845 ms) : 0, 725845
BytebuddyAgent [candidate] (731.177 ms) : 0, 731177
GlobalTracer [baseline] (235.518 ms) : 0, 235518
GlobalTracer [candidate] (237.022 ms) : 0, 237022
IAST [baseline] (25.005 ms) : 0, 25005
IAST [candidate] (25.122 ms) : 0, 25122
AppSec [baseline] (174.076 ms) : 0, 174076
AppSec [candidate] (174.793 ms) : 0, 174793
Debugger [baseline] (5.934 ms) : 0, 5934
Debugger [candidate] (5.955 ms) : 0, 5955
Remote Config [baseline] (618.472 µs) : 0, 618
Remote Config [candidate] (628.904 µs) : 0, 629
Telemetry [baseline] (8.436 ms) : 0, 8436
Telemetry [candidate] (8.479 ms) : 0, 8479
Flare Poller [baseline] (3.871 ms) : 0, 3871
Flare Poller [candidate] (3.904 ms) : 0, 3904
section iast
crashtracking [baseline] (1.476 ms) : 0, 1476
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (828.92 ms) : 0, 828920
BytebuddyAgent [candidate] (822.073 ms) : 0, 822073
GlobalTracer [baseline] (234.692 ms) : 0, 234692
GlobalTracer [candidate] (233.568 ms) : 0, 233568
IAST [baseline] (35.365 ms) : 0, 35365
IAST [candidate] (33.595 ms) : 0, 33595
AppSec [baseline] (26.478 ms) : 0, 26478
AppSec [candidate] (27.992 ms) : 0, 27992
Debugger [baseline] (6.172 ms) : 0, 6172
Debugger [candidate] (6.132 ms) : 0, 6132
Remote Config [baseline] (601.657 µs) : 0, 602
Remote Config [candidate] (593.225 µs) : 0, 593
Telemetry [baseline] (8.446 ms) : 0, 8446
Telemetry [candidate] (8.329 ms) : 0, 8329
Flare Poller [baseline] (4.134 ms) : 0, 4134
Flare Poller [candidate] (4.182 ms) : 0, 4182
section profiling
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (731.976 ms) : 0, 731976
BytebuddyAgent [candidate] (728.167 ms) : 0, 728167
GlobalTracer [baseline] (221.583 ms) : 0, 221583
GlobalTracer [candidate] (220.54 ms) : 0, 220540
AppSec [baseline] (32.641 ms) : 0, 32641
AppSec [candidate] (32.228 ms) : 0, 32228
Debugger [baseline] (11.556 ms) : 0, 11556
Debugger [candidate] (11.346 ms) : 0, 11346
Remote Config [baseline] (697.699 µs) : 0, 698
Remote Config [candidate] (1.431 ms) : 0, 1431
Telemetry [baseline] (11.472 ms) : 0, 11472
Telemetry [candidate] (10.522 ms) : 0, 10522
Flare Poller [baseline] (4.184 ms) : 0, 4184
Flare Poller [candidate] (4.161 ms) : 0, 4161
ProfilingAgent [baseline] (110.236 ms) : 0, 110236
ProfilingAgent [candidate] (109.66 ms) : 0, 109660
Profiling [baseline] (110.871 ms) : 0, 110871
Profiling [candidate] (110.328 ms) : 0, 110328
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 3 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section baseline
no_agent (17.852 ms) : 17671, 18034
. : milestone, 17852,
appsec (19.35 ms) : 19148, 19552
. : milestone, 19350,
code_origins (19.729 ms) : 19534, 19923
. : milestone, 19729,
iast (19.539 ms) : 19347, 19732
. : milestone, 19539,
profiling (20.615 ms) : 20407, 20824
. : milestone, 20615,
tracing (17.547 ms) : 17373, 17720
. : milestone, 17547,
section candidate
no_agent (19.007 ms) : 18815, 19199
. : milestone, 19007,
appsec (19.321 ms) : 19126, 19517
. : milestone, 19321,
code_origins (17.624 ms) : 17451, 17796
. : milestone, 17624,
iast (18.494 ms) : 18306, 18682
. : milestone, 18494,
profiling (20.547 ms) : 20342, 20752
. : milestone, 20547,
tracing (18.977 ms) : 18780, 19174
. : milestone, 18977,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section baseline
no_agent (1.21 ms) : 1198, 1222
. : milestone, 1210,
iast (3.251 ms) : 3207, 3296
. : milestone, 3251,
iast_FULL (5.608 ms) : 5553, 5664
. : milestone, 5608,
iast_GLOBAL (3.566 ms) : 3517, 3615
. : milestone, 3566,
profiling (2.193 ms) : 2173, 2213
. : milestone, 2193,
tracing (1.781 ms) : 1766, 1796
. : milestone, 1781,
section candidate
no_agent (1.207 ms) : 1195, 1218
. : milestone, 1207,
iast (3.23 ms) : 3190, 3270
. : milestone, 3230,
iast_FULL (5.513 ms) : 5459, 5567
. : milestone, 5513,
iast_GLOBAL (3.708 ms) : 3653, 3764
. : milestone, 3708,
profiling (1.923 ms) : 1906, 1939
. : milestone, 1923,
tracing (1.772 ms) : 1758, 1787
. : milestone, 1772,
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.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.684 ms) : 3466, 3901
. : milestone, 3684,
iast (2.214 ms) : 2151, 2278
. : milestone, 2214,
iast_GLOBAL (2.247 ms) : 2183, 2311
. : milestone, 2247,
profiling (2.069 ms) : 2017, 2122
. : milestone, 2069,
tracing (2.029 ms) : 1979, 2079
. : milestone, 2029,
section candidate
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (3.702 ms) : 3484, 3919
. : milestone, 3702,
iast (2.202 ms) : 2139, 2266
. : milestone, 2202,
iast_GLOBAL (2.245 ms) : 2181, 2309
. : milestone, 2245,
profiling (2.07 ms) : 2017, 2123
. : milestone, 2070,
tracing (2.044 ms) : 1994, 2095
. : milestone, 2044,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~261e9b1d4b, baseline=1.55.0-SNAPSHOT~feb33def65
dateFormat X
axisFormat %s
section baseline
no_agent (15.399 s) : 15399000, 15399000
. : milestone, 15399000,
appsec (14.552 s) : 14552000, 14552000
. : milestone, 14552000,
iast (18.77 s) : 18770000, 18770000
. : milestone, 18770000,
iast_GLOBAL (18.203 s) : 18203000, 18203000
. : milestone, 18203000,
profiling (15.132 s) : 15132000, 15132000
. : milestone, 15132000,
tracing (15.332 s) : 15332000, 15332000
. : milestone, 15332000,
section candidate
no_agent (14.837 s) : 14837000, 14837000
. : milestone, 14837000,
appsec (14.837 s) : 14837000, 14837000
. : milestone, 14837000,
iast (18.485 s) : 18485000, 18485000
. : milestone, 18485000,
iast_GLOBAL (17.982 s) : 17982000, 17982000
. : milestone, 17982000,
profiling (15.406 s) : 15406000, 15406000
. : milestone, 15406000,
tracing (15.404 s) : 15404000, 15404000
. : milestone, 15404000,
|
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
078c8db to
261e9b1
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