-
Notifications
You must be signed in to change notification settings - Fork 318
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
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: 0bfaa06 | 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~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1048510
Total [baseline] (8.624 s) : 0, 8623512
Agent [candidate] (1.05 s) : 0, 1049915
Total [candidate] (8.64 s) : 0, 8639525
section iast
Agent [baseline] (1.178 s) : 0, 1177852
Total [baseline] (9.24 s) : 0, 9240210
Agent [candidate] (1.186 s) : 0, 1185664
Total [candidate] (9.302 s) : 0, 9301981
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.452 ms) : 0, 1452
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (706.503 ms) : 0, 706503
BytebuddyAgent [candidate] (706.747 ms) : 0, 706747
GlobalTracer [baseline] (245.688 ms) : 0, 245688
GlobalTracer [candidate] (246.804 ms) : 0, 246804
AppSec [baseline] (32.349 ms) : 0, 32349
AppSec [candidate] (32.256 ms) : 0, 32256
Debugger [baseline] (6.403 ms) : 0, 6403
Debugger [candidate] (6.394 ms) : 0, 6394
Remote Config [baseline] (711.826 µs) : 0, 712
Remote Config [candidate] (709.23 µs) : 0, 709
Telemetry [baseline] (15.725 ms) : 0, 15725
Telemetry [candidate] (14.399 ms) : 0, 14399
Flare Poller [baseline] (5.02 ms) : 0, 5020
Flare Poller [candidate] (6.521 ms) : 0, 6521
section iast
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (827.595 ms) : 0, 827595
BytebuddyAgent [candidate] (833.33 ms) : 0, 833330
GlobalTracer [baseline] (233.976 ms) : 0, 233976
GlobalTracer [candidate] (234.97 ms) : 0, 234970
IAST [baseline] (33.36 ms) : 0, 33360
IAST [candidate] (32.615 ms) : 0, 32615
AppSec [baseline] (27.822 ms) : 0, 27822
AppSec [candidate] (28.926 ms) : 0, 28926
Debugger [baseline] (5.98 ms) : 0, 5980
Debugger [candidate] (6.157 ms) : 0, 6157
Remote Config [baseline] (588.215 µs) : 0, 588
Remote Config [candidate] (598.135 µs) : 0, 598
Telemetry [baseline] (8.32 ms) : 0, 8320
Telemetry [candidate] (8.591 ms) : 0, 8591
Flare Poller [baseline] (4.113 ms) : 0, 4113
Flare Poller [candidate] (4.198 ms) : 0, 4198
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1045133
Total [baseline] (10.696 s) : 0, 10695737
Agent [candidate] (1.044 s) : 0, 1044268
Total [candidate] (10.749 s) : 0, 10749334
section appsec
Agent [baseline] (1.219 s) : 0, 1219486
Total [baseline] (10.858 s) : 0, 10858327
Agent [candidate] (1.237 s) : 0, 1237166
Total [candidate] (10.888 s) : 0, 10887965
section iast
Agent [baseline] (1.177 s) : 0, 1176842
Total [baseline] (11.123 s) : 0, 11122812
Agent [candidate] (1.187 s) : 0, 1187221
Total [candidate] (11.192 s) : 0, 11192478
section profiling
Agent [baseline] (1.192 s) : 0, 1191827
Total [baseline] (10.922 s) : 0, 10922131
Agent [candidate] (1.195 s) : 0, 1195450
Total [candidate] (10.987 s) : 0, 10986948
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (703.535 ms) : 0, 703535
BytebuddyAgent [candidate] (702.361 ms) : 0, 702361
GlobalTracer [baseline] (245.136 ms) : 0, 245136
GlobalTracer [candidate] (245.739 ms) : 0, 245739
AppSec [baseline] (32.394 ms) : 0, 32394
AppSec [candidate] (32.284 ms) : 0, 32284
Debugger [baseline] (6.398 ms) : 0, 6398
Debugger [candidate] (6.366 ms) : 0, 6366
Remote Config [baseline] (713.721 µs) : 0, 714
Remote Config [candidate] (714.891 µs) : 0, 715
Telemetry [baseline] (14.303 ms) : 0, 14303
Telemetry [candidate] (15.015 ms) : 0, 15015
Flare Poller [baseline] (6.553 ms) : 0, 6553
Flare Poller [candidate] (5.809 ms) : 0, 5809
section appsec
crashtracking [baseline] (1.449 ms) : 0, 1449
crashtracking [candidate] (1.481 ms) : 0, 1481
BytebuddyAgent [baseline] (727.367 ms) : 0, 727367
BytebuddyAgent [candidate] (740.492 ms) : 0, 740492
GlobalTracer [baseline] (237.045 ms) : 0, 237045
GlobalTracer [candidate] (240.1 ms) : 0, 240100
IAST [baseline] (24.828 ms) : 0, 24828
IAST [candidate] (25.288 ms) : 0, 25288
AppSec [baseline] (174.797 ms) : 0, 174797
AppSec [candidate] (175.182 ms) : 0, 175182
Debugger [baseline] (5.999 ms) : 0, 5999
Debugger [candidate] (6.075 ms) : 0, 6075
Remote Config [baseline] (645.572 µs) : 0, 646
Remote Config [candidate] (669.15 µs) : 0, 669
Telemetry [baseline] (8.483 ms) : 0, 8483
Telemetry [candidate] (8.665 ms) : 0, 8665
Flare Poller [baseline] (3.989 ms) : 0, 3989
Flare Poller [candidate] (4.01 ms) : 0, 4010
section iast
crashtracking [baseline] (1.443 ms) : 0, 1443
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (825.846 ms) : 0, 825846
BytebuddyAgent [candidate] (833.907 ms) : 0, 833907
GlobalTracer [baseline] (234.21 ms) : 0, 234210
GlobalTracer [candidate] (235.733 ms) : 0, 235733
IAST [baseline] (30.125 ms) : 0, 30125
IAST [candidate] (30.218 ms) : 0, 30218
AppSec [baseline] (31.224 ms) : 0, 31224
AppSec [candidate] (31.565 ms) : 0, 31565
Debugger [baseline] (5.994 ms) : 0, 5994
Debugger [candidate] (6.071 ms) : 0, 6071
Remote Config [baseline] (598.733 µs) : 0, 599
Remote Config [candidate] (603.966 µs) : 0, 604
Telemetry [baseline] (8.556 ms) : 0, 8556
Telemetry [candidate] (8.585 ms) : 0, 8585
Flare Poller [baseline] (4.19 ms) : 0, 4190
Flare Poller [candidate] (4.202 ms) : 0, 4202
section profiling
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (728.58 ms) : 0, 728580
BytebuddyAgent [candidate] (731.628 ms) : 0, 731628
GlobalTracer [baseline] (221.354 ms) : 0, 221354
GlobalTracer [candidate] (222.308 ms) : 0, 222308
AppSec [baseline] (32.171 ms) : 0, 32171
AppSec [candidate] (32.191 ms) : 0, 32191
Debugger [baseline] (9.066 ms) : 0, 9066
Debugger [candidate] (10.625 ms) : 0, 10625
Remote Config [baseline] (691.999 µs) : 0, 692
Remote Config [candidate] (1.548 ms) : 0, 1548
Telemetry [baseline] (13.704 ms) : 0, 13704
Telemetry [candidate] (11.348 ms) : 0, 11348
Flare Poller [baseline] (4.125 ms) : 0, 4125
Flare Poller [candidate] (4.112 ms) : 0, 4112
ProfilingAgent [baseline] (110.992 ms) : 0, 110992
ProfilingAgent [candidate] (111.026 ms) : 0, 111026
Profiling [baseline] (111.665 ms) : 0, 111665
Profiling [candidate] (111.702 ms) : 0, 111702
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 3 performance regressions! Performance is the same for 7 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section baseline
no_agent (1.209 ms) : 1196, 1221
. : milestone, 1209,
iast (3.297 ms) : 3257, 3336
. : milestone, 3297,
iast_FULL (5.912 ms) : 5851, 5972
. : milestone, 5912,
iast_GLOBAL (3.687 ms) : 3633, 3741
. : milestone, 3687,
profiling (1.932 ms) : 1916, 1949
. : milestone, 1932,
tracing (1.784 ms) : 1770, 1799
. : milestone, 1784,
section candidate
no_agent (1.229 ms) : 1217, 1241
. : milestone, 1229,
iast (3.215 ms) : 3174, 3257
. : milestone, 3215,
iast_FULL (5.791 ms) : 5734, 5847
. : milestone, 5791,
iast_GLOBAL (3.565 ms) : 3505, 3625
. : milestone, 3565,
profiling (1.996 ms) : 1978, 2014
. : milestone, 1996,
tracing (1.853 ms) : 1837, 1869
. : milestone, 1853,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section baseline
no_agent (19.304 ms) : 19106, 19503
. : milestone, 19304,
appsec (18.418 ms) : 18229, 18607
. : milestone, 18418,
code_origins (17.891 ms) : 17713, 18069
. : milestone, 17891,
iast (17.587 ms) : 17414, 17761
. : milestone, 17587,
profiling (19.923 ms) : 19718, 20127
. : milestone, 19923,
tracing (18.343 ms) : 18163, 18522
. : milestone, 18343,
section candidate
no_agent (18.118 ms) : 17930, 18307
. : milestone, 18118,
appsec (18.767 ms) : 18578, 18956
. : milestone, 18767,
code_origins (17.86 ms) : 17681, 18039
. : milestone, 17860,
iast (19.188 ms) : 18990, 19385
. : milestone, 19188,
profiling (18.646 ms) : 18459, 18833
. : milestone, 18646,
tracing (18.6 ms) : 18411, 18789
. : milestone, 18600,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section baseline
no_agent (15.03 s) : 15030000, 15030000
. : milestone, 15030000,
appsec (14.559 s) : 14559000, 14559000
. : milestone, 14559000,
iast (18.458 s) : 18458000, 18458000
. : milestone, 18458000,
iast_GLOBAL (17.931 s) : 17931000, 17931000
. : milestone, 17931000,
profiling (14.98 s) : 14980000, 14980000
. : milestone, 14980000,
tracing (14.728 s) : 14728000, 14728000
. : milestone, 14728000,
section candidate
no_agent (15.727 s) : 15727000, 15727000
. : milestone, 15727000,
appsec (15.202 s) : 15202000, 15202000
. : milestone, 15202000,
iast (18.336 s) : 18336000, 18336000
. : milestone, 18336000,
iast_GLOBAL (17.992 s) : 17992000, 17992000
. : milestone, 17992000,
profiling (14.983 s) : 14983000, 14983000
. : milestone, 14983000,
tracing (14.873 s) : 14873000, 14873000
. : milestone, 14873000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~0bfaa064cd, baseline=1.56.0-SNAPSHOT~19d774d48c
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (3.64 ms) : 3425, 3855
. : milestone, 3640,
iast (2.203 ms) : 2139, 2267
. : milestone, 2203,
iast_GLOBAL (2.253 ms) : 2188, 2317
. : milestone, 2253,
profiling (2.475 ms) : 2252, 2697
. : milestone, 2475,
tracing (2.024 ms) : 1974, 2073
. : milestone, 2024,
section candidate
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (3.676 ms) : 3458, 3895
. : milestone, 3676,
iast (2.205 ms) : 2141, 2269
. : milestone, 2205,
iast_GLOBAL (2.245 ms) : 2181, 2310
. : milestone, 2245,
profiling (2.062 ms) : 2010, 2115
. : milestone, 2062,
tracing (2.014 ms) : 1964, 2063
. : milestone, 2014,
|
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!
Edit: ended up adding an abstract class after some more testing. Let me know your thoughts!
03b891a to
078c8db
Compare
61f7bdb to
fce0d86
Compare
fce0d86 to
e82dd20
Compare
8cff397 to
0bfaa06
Compare
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
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
Tested in Databricks and we can see the fields show up as expected (link).
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