Skip to content

Commit

Permalink
variables name refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Sayed Bilal Bari <[email protected]>
  • Loading branch information
bilalbari committed Aug 1, 2024
1 parent 81b98c0 commit 377407e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 377407e

Please sign in to comment.