diff --git a/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/GenerateTimeline.scala b/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/GenerateTimeline.scala index 71d7716f3..1478c662d 100644 --- a/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/GenerateTimeline.scala +++ b/core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/GenerateTimeline.scala @@ -280,7 +280,7 @@ object GenerateTimeline { val semMetricsMs = app.accumManager.accumInfoMap.flatMap{ case (_,accumInfo: AccumInfo) - if accumInfo.infoRef.name == AccNameRef.namesTable.get("gpuSemaphoreWait") => + if accumInfo.infoRef.name == AccNameRef.NAMES_TABLE.get("gpuSemaphoreWait") => Some(accumInfo.taskUpdatesMap.values.sum) case _ => None }.sum diff --git a/core/src/main/scala/org/apache/spark/sql/rapids/tool/store/AccNameRef.scala b/core/src/main/scala/org/apache/spark/sql/rapids/tool/store/AccNameRef.scala index c40107f41..4ed7ae1c0 100644 --- a/core/src/main/scala/org/apache/spark/sql/rapids/tool/store/AccNameRef.scala +++ b/core/src/main/scala/org/apache/spark/sql/rapids/tool/store/AccNameRef.scala @@ -24,7 +24,7 @@ case class AccNameRef(value: String) object AccNameRef { val EMPTY_ACC_NAME_REF: AccNameRef = new AccNameRef("N/A") - val namesTable: ConcurrentHashMap[String, AccNameRef] = { + val NAMES_TABLE: ConcurrentHashMap[String, AccNameRef] = { val initMap = new ConcurrentHashMap[String, AccNameRef]() initMap.put("gpuSemaphoreWait", fromString("gpuSemaphoreWait")) initMap @@ -33,7 +33,7 @@ object AccNameRef { def internAccName(name: Option[String]): AccNameRef = { name match { case Some(n) => - namesTable.computeIfAbsent(n, AccNameRef.fromString) + NAMES_TABLE.computeIfAbsent(n, AccNameRef.fromString) case _ => AccNameRef.EMPTY_ACC_NAME_REF }