From 2d2c09c72bc2624200be3dc981e627259f4f185f Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Tue, 7 Jan 2025 15:26:33 -0800 Subject: [PATCH] missing GpuMetric wrapping/unwrapping --- .../nvidia/spark/rapids/delta/RapidsDeltaWrite.scala | 9 ++++----- .../rapids/delta20x/GpuOptimisticTransaction.scala | 6 +++--- .../rapids/delta21x/GpuOptimisticTransaction.scala | 6 +++--- .../rapids/delta22x/GpuOptimisticTransaction.scala | 6 +++--- .../rapids/delta23x/GpuOptimisticTransaction.scala | 6 +++--- .../rapids/delta24x/GpuOptimisticTransaction.scala | 6 +++--- .../tahoe/rapids/GpuOptimisticTransaction.scala | 6 +++--- .../tahoe/rapids/GpuOptimisticTransaction.scala | 6 +++--- .../tahoe/rapids/GpuOptimisticTransaction.scala | 6 +++--- .../tahoe/rapids/GpuOptimisticTransaction.scala | 6 +++--- .../main/scala/com/nvidia/spark/rapids/GpuExec.scala | 8 ++++---- .../scala/com/nvidia/spark/rapids/GpuMetrics.scala | 8 ++++---- .../sql/rapids/BasicColumnarWriteStatsTracker.scala | 6 +++--- .../spark/sql/rapids/GpuWriteStatsTracker.scala | 12 ++++++------ 14 files changed, 48 insertions(+), 49 deletions(-) diff --git a/delta-lake/common/src/main/scala/com/nvidia/spark/rapids/delta/RapidsDeltaWrite.scala b/delta-lake/common/src/main/scala/com/nvidia/spark/rapids/delta/RapidsDeltaWrite.scala index bbf0ca58d4e..75ade9cfd4e 100644 --- a/delta-lake/common/src/main/scala/com/nvidia/spark/rapids/delta/RapidsDeltaWrite.scala +++ b/delta-lake/common/src/main/scala/com/nvidia/spark/rapids/delta/RapidsDeltaWrite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import org.apache.spark.sql.catalyst.expressions.Attribute import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, UnaryNode} import org.apache.spark.sql.execution.{SparkPlan, SparkStrategy, UnaryExecNode} import org.apache.spark.sql.execution.datasources.v2.V2CommandExec -import org.apache.spark.sql.execution.metric.SQLMetric import org.apache.spark.sql.rapids.GpuWriteJobStatsTracker import org.apache.spark.sql.vectorized.ColumnarBatch @@ -106,11 +105,11 @@ case class GpuRapidsDeltaWriteExec(child: SparkPlan) extends V2CommandExec with UnaryExecNode with GpuExec { override def output: Seq[Attribute] = child.output - lazy val basicMetrics: Map[String, SQLMetric] = GpuWriteJobStatsTracker.basicMetrics - lazy val taskMetrics: Map[String, SQLMetric] = GpuWriteJobStatsTracker.taskMetrics + lazy val basicMetrics: Map[String, GpuMetric] = GpuWriteJobStatsTracker.basicMetrics + lazy val taskMetrics: Map[String, GpuMetric] = GpuWriteJobStatsTracker.taskMetrics override lazy val allMetrics: Map[String, GpuMetric] = - GpuMetric.wrap(basicMetrics ++ taskMetrics) + basicMetrics ++ taskMetrics override def internalDoExecuteColumnar(): RDD[ColumnarBatch] = { // This is just a stub node for planning purposes and does not actually perform diff --git a/delta-lake/delta-20x/src/main/scala/org/apache/spark/sql/delta/rapids/delta20x/GpuOptimisticTransaction.scala b/delta-lake/delta-20x/src/main/scala/org/apache/spark/sql/delta/rapids/delta20x/GpuOptimisticTransaction.scala index ee0fc6f1cae..26021ac4b84 100644 --- a/delta-lake/delta-20x/src/main/scala/org/apache/spark/sql/delta/rapids/delta20x/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-20x/src/main/scala/org/apache/spark/sql/delta/rapids/delta20x/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024, NVIDIA CORPORATION. + * Copyright (c) 2022-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -179,8 +179,8 @@ class GpuOptimisticTransaction val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-21x/src/main/scala/org/apache/spark/sql/delta/rapids/delta21x/GpuOptimisticTransaction.scala b/delta-lake/delta-21x/src/main/scala/org/apache/spark/sql/delta/rapids/delta21x/GpuOptimisticTransaction.scala index 7433594aa73..0667fd7a3d3 100644 --- a/delta-lake/delta-21x/src/main/scala/org/apache/spark/sql/delta/rapids/delta21x/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-21x/src/main/scala/org/apache/spark/sql/delta/rapids/delta21x/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -179,8 +179,8 @@ class GpuOptimisticTransaction val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-22x/src/main/scala/org/apache/spark/sql/delta/rapids/delta22x/GpuOptimisticTransaction.scala b/delta-lake/delta-22x/src/main/scala/org/apache/spark/sql/delta/rapids/delta22x/GpuOptimisticTransaction.scala index cb990ccc16d..2c13cb23872 100644 --- a/delta-lake/delta-22x/src/main/scala/org/apache/spark/sql/delta/rapids/delta22x/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-22x/src/main/scala/org/apache/spark/sql/delta/rapids/delta22x/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -201,8 +201,8 @@ class GpuOptimisticTransaction val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-23x/src/main/scala/org/apache/spark/sql/delta/rapids/delta23x/GpuOptimisticTransaction.scala b/delta-lake/delta-23x/src/main/scala/org/apache/spark/sql/delta/rapids/delta23x/GpuOptimisticTransaction.scala index 905329a6b01..75cef27b02e 100644 --- a/delta-lake/delta-23x/src/main/scala/org/apache/spark/sql/delta/rapids/delta23x/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-23x/src/main/scala/org/apache/spark/sql/delta/rapids/delta23x/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -201,8 +201,8 @@ class GpuOptimisticTransaction val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-24x/src/main/scala/org/apache/spark/sql/delta/rapids/delta24x/GpuOptimisticTransaction.scala b/delta-lake/delta-24x/src/main/scala/org/apache/spark/sql/delta/rapids/delta24x/GpuOptimisticTransaction.scala index fadc9bf99a8..2985b6334be 100644 --- a/delta-lake/delta-24x/src/main/scala/org/apache/spark/sql/delta/rapids/delta24x/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-24x/src/main/scala/org/apache/spark/sql/delta/rapids/delta24x/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -203,8 +203,8 @@ class GpuOptimisticTransaction val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-spark330db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala b/delta-lake/delta-spark330db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala index f4debdea1c1..c2ef25e5e34 100644 --- a/delta-lake/delta-spark330db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-spark330db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024, NVIDIA CORPORATION. + * Copyright (c) 2022-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -220,8 +220,8 @@ class GpuOptimisticTransaction( val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-spark332db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala b/delta-lake/delta-spark332db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala index 48cebee6e41..d7de53453b0 100644 --- a/delta-lake/delta-spark332db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-spark332db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -217,8 +217,8 @@ class GpuOptimisticTransaction( val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-spark341db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala b/delta-lake/delta-spark341db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala index e1e5f28dec6..0685e67e96a 100644 --- a/delta-lake/delta-spark341db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-spark341db/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -219,8 +219,8 @@ class GpuOptimisticTransaction( val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/delta-lake/delta-spark350db143/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala b/delta-lake/delta-spark350db143/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala index b49c5ebaa30..2f499fca822 100644 --- a/delta-lake/delta-spark350db143/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala +++ b/delta-lake/delta-spark350db143/src/main/scala/com/databricks/sql/transaction/tahoe/rapids/GpuOptimisticTransaction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, NVIDIA CORPORATION. + * Copyright (c) 2024-2025, NVIDIA CORPORATION. * * This file was derived from OptimisticTransaction.scala and TransactionalWrite.scala * in the Delta Lake project at https://github.com/delta-io/delta. @@ -219,8 +219,8 @@ class GpuOptimisticTransaction( val serializableHadoopConf = new SerializableConfiguration(hadoopConf) val basicWriteJobStatsTracker = new BasicColumnarWriteJobStatsTracker( serializableHadoopConf, - BasicWriteJobStatsTracker.metrics) - registerSQLMetrics(spark, basicWriteJobStatsTracker.driverSideMetrics) + GpuMetric.wrap(BasicWriteJobStatsTracker.metrics)) + registerSQLMetrics(spark, GpuMetric.unwrap(basicWriteJobStatsTracker.driverSideMetrics)) statsTrackers.append(basicWriteJobStatsTracker) gpuRapidsWrite.foreach { grw => val tracker = new GpuWriteJobStatsTracker(serializableHadoopConf, diff --git a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuExec.scala b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuExec.scala index 7ac2efaa950..6ef06496190 100644 --- a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuExec.scala +++ b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuExec.scala @@ -81,16 +81,16 @@ trait GpuExec extends SparkPlan { GpuMetric.create(level, name) def createNanoTimingMetric(level: MetricsLevel, name: String): GpuMetric = - GpuMetric.createNanoTimingMetric(level, name) + GpuMetric.createNanoTiming(level, name) def createSizeMetric(level: MetricsLevel, name: String): GpuMetric = - GpuMetric.createSizeMetric(level, name) + GpuMetric.createSize(level, name) def createAverageMetric(level: MetricsLevel, name: String): GpuMetric = - GpuMetric.createAverageMetric(level, name) + GpuMetric.createAverage(level, name) def createTimingMetric(level: MetricsLevel, name: String): GpuMetric = - GpuMetric.createTimingMetric(level, name) + GpuMetric.createTiming(level, name) protected def createFileCacheMetrics(): Map[String, GpuMetric] = { if (FileCacheConf.FILECACHE_ENABLED.get(conf)) { diff --git a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuMetrics.scala b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuMetrics.scala index 3ccfc6f5c51..531daf05b84 100644 --- a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuMetrics.scala +++ b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuMetrics.scala @@ -154,16 +154,16 @@ object GpuMetric extends Logging with SQLConfHelper { def create(level: MetricsLevel, name: String): GpuMetric = createInternal(level, SQLMetrics.createMetric(sparkContext, name)) - def createNanoTimingMetric(level: MetricsLevel, name: String): GpuMetric = + def createNanoTiming(level: MetricsLevel, name: String): GpuMetric = createInternal(level, SQLMetrics.createNanoTimingMetric(sparkContext, name)) - def createSizeMetric(level: MetricsLevel, name: String): GpuMetric = + def createSize(level: MetricsLevel, name: String): GpuMetric = createInternal(level, SQLMetrics.createSizeMetric(sparkContext, name)) - def createAverageMetric(level: MetricsLevel, name: String): GpuMetric = + def createAverage(level: MetricsLevel, name: String): GpuMetric = createInternal(level, SQLMetrics.createAverageMetric(sparkContext, name)) - def createTimingMetric(level: MetricsLevel, name: String): GpuMetric = + def createTiming(level: MetricsLevel, name: String): GpuMetric = createInternal(level, SQLMetrics.createTimingMetric(sparkContext, name)) def unwrap(input: GpuMetric): SQLMetric = input match { diff --git a/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/BasicColumnarWriteStatsTracker.scala b/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/BasicColumnarWriteStatsTracker.scala index 4b5562b5083..a7e9d9ffbc0 100644 --- a/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/BasicColumnarWriteStatsTracker.scala +++ b/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/BasicColumnarWriteStatsTracker.scala @@ -241,15 +241,15 @@ object BasicColumnarWriteJobStatsTracker { Map( NUM_FILES_KEY -> GpuMetric.create(GpuMetric.ESSENTIAL_LEVEL, "number of written files"), - NUM_OUTPUT_BYTES_KEY -> GpuMetric.createSizeMetric(GpuMetric.ESSENTIAL_LEVEL, + NUM_OUTPUT_BYTES_KEY -> GpuMetric.createSize(GpuMetric.ESSENTIAL_LEVEL, "written output"), NUM_OUTPUT_ROWS_KEY -> GpuMetric.create(GpuMetric.ESSENTIAL_LEVEL, "number of output rows"), NUM_PARTS_KEY -> GpuMetric.create(GpuMetric.ESSENTIAL_LEVEL, "number of dynamic part"), - TASK_COMMIT_TIME -> GpuMetric.createTimingMetric(GpuMetric.ESSENTIAL_LEVEL, + TASK_COMMIT_TIME -> GpuMetric.createTiming(GpuMetric.ESSENTIAL_LEVEL, "task commit time"), - JOB_COMMIT_TIME -> GpuMetric.createTimingMetric(GpuMetric.ESSENTIAL_LEVEL, + JOB_COMMIT_TIME -> GpuMetric.createTiming(GpuMetric.ESSENTIAL_LEVEL, "job commit time") ) } diff --git a/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/GpuWriteStatsTracker.scala b/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/GpuWriteStatsTracker.scala index 45544e4c210..1a71b5cc979 100644 --- a/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/GpuWriteStatsTracker.scala +++ b/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/GpuWriteStatsTracker.scala @@ -81,17 +81,17 @@ object GpuWriteJobStatsTracker { def taskMetrics: Map[String, GpuMetric] = { Map( - GPU_TIME_KEY -> GpuMetric.createNanoTimingMetric(GpuMetric.ESSENTIAL_LEVEL, "GPU time"), - WRITE_TIME_KEY -> GpuMetric.createNanoTimingMetric(GpuMetric.ESSENTIAL_LEVEL, + GPU_TIME_KEY -> GpuMetric.createNanoTiming(GpuMetric.ESSENTIAL_LEVEL, "GPU time"), + WRITE_TIME_KEY -> GpuMetric.createNanoTiming(GpuMetric.ESSENTIAL_LEVEL, "write time"), TASK_COMMIT_TIME -> basicMetrics(TASK_COMMIT_TIME), - ASYNC_WRITE_TOTAL_THROTTLE_TIME_KEY -> GpuMetric.createNanoTimingMetric( + ASYNC_WRITE_TOTAL_THROTTLE_TIME_KEY -> GpuMetric.createNanoTiming( GpuMetric.DEBUG_LEVEL, "total throttle time"), - ASYNC_WRITE_AVG_THROTTLE_TIME_KEY -> GpuMetric.createNanoTimingMetric( + ASYNC_WRITE_AVG_THROTTLE_TIME_KEY -> GpuMetric.createNanoTiming( GpuMetric.DEBUG_LEVEL, "avg throttle time per async write"), - ASYNC_WRITE_MIN_THROTTLE_TIME_KEY -> GpuMetric.createNanoTimingMetric( + ASYNC_WRITE_MIN_THROTTLE_TIME_KEY -> GpuMetric.createNanoTiming( GpuMetric.DEBUG_LEVEL, "min throttle time per async write"), - ASYNC_WRITE_MAX_THROTTLE_TIME_KEY -> GpuMetric.createNanoTimingMetric( + ASYNC_WRITE_MAX_THROTTLE_TIME_KEY -> GpuMetric.createNanoTiming( GpuMetric.DEBUG_LEVEL, "max throttle time per async write") ) }