Skip to content

Commit

Permalink
[VL] Add wallnanos for WriteFiles (apache#6976)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohahaha authored and shamirchen committed Oct 14, 2024
1 parent b6c7ce7 commit 1ff73ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ class VeloxMetricsApi extends MetricsApi with Logging {

def genWriteFilesTransformerMetrics(sparkContext: SparkContext): Map[String, SQLMetric] =
Map(
"physicalWrittenBytes" -> SQLMetrics.createMetric(sparkContext, "number of written bytes"),
"physicalWrittenBytes" -> SQLMetrics.createSizeMetric(
sparkContext,
"number of written bytes"),
"wallNanos" -> SQLMetrics.createNanoTimingMetric(sparkContext, "time of write"),
"numWrittenFiles" -> SQLMetrics.createMetric(sparkContext, "number of written files")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class WriteFilesMetricsUpdater(val metrics: Map[String, SQLMetric]) extends Metr
if (opMetrics != null) {
val operatorMetrics = opMetrics.asInstanceOf[OperatorMetrics]
metrics("physicalWrittenBytes") += operatorMetrics.physicalWrittenBytes
metrics("wallNanos") += operatorMetrics.wallNanos
metrics("numWrittenFiles") += operatorMetrics.numWrittenFiles
}
}
Expand Down

0 comments on commit 1ff73ac

Please sign in to comment.