-
Notifications
You must be signed in to change notification settings - Fork 178
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
perf: Add metric for time spent casting in native scan #919
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,15 @@ object CometMetricNode { | |
"total time (in ms) spent in this operator")) | ||
} | ||
|
||
/** | ||
* SQL Metrics for Comet native ScanExec | ||
*/ | ||
def scanMetrics(sc: SparkContext): Map[String, SQLMetric] = { | ||
Map( | ||
"cast_time" -> | ||
SQLMetrics.createNanoTimingMetric(sc, "Total time for casting arrays")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "arrays" in "casting arrays" may be confused with Spark array type and considered as time spent on casting (Spark) "arrays". Maybe "casting columns"? |
||
} | ||
|
||
/** | ||
* SQL Metrics for DataFusion HashJoin | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,9 +198,12 @@ case class CometScanExec( | |
// Tracking scan time has overhead, we can't afford to do it for each row, and can only do | ||
// it for each batch. | ||
if (supportsColumnar) { | ||
Some("scanTime" -> SQLMetrics.createNanoTimingMetric(sparkContext, "scan time")) | ||
Seq( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be it a Map instead of Seq? |
||
"scanTime" -> SQLMetrics.createNanoTimingMetric( | ||
sparkContext, | ||
"scan time")) ++ CometMetricNode.scanMetrics(sparkContext) | ||
} else { | ||
None | ||
Seq.empty | ||
} | ||
} ++ { | ||
relation.fileFormat match { | ||
|
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.
is this elapsed time?