Skip to content

Commit

Permalink
printing memory in units
Browse files Browse the repository at this point in the history
  • Loading branch information
swasti committed Jan 8, 2018
1 parent 6fb2725 commit 01965b8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.linkedin.drelephant.analysis._
import com.linkedin.drelephant.configurations.heuristic.HeuristicConfigurationData
import com.linkedin.drelephant.spark.data.SparkApplicationData
import com.linkedin.drelephant.spark.fetchers.statusapiv1.ExecutorSummary
import com.linkedin.drelephant.util.MemoryFormatUtils

import scala.collection.JavaConverters

Expand All @@ -41,8 +42,8 @@ class UnifiedMemoryHeuristic(private val heuristicConfigurationData: HeuristicCo
val evaluator = new Evaluator(this, data)

var resultDetails = Seq(
new HeuristicResultDetails("Allocated memory for the unified region", evaluator.maxMemory.toString),
new HeuristicResultDetails("Mean peak unified memory", evaluator.meanUnifiedMemory.toString)
new HeuristicResultDetails("Allocated memory for the unified region", MemoryFormatUtils.bytesToString(evaluator.maxMemory)),
new HeuristicResultDetails("Mean peak unified memory", MemoryFormatUtils.bytesToString(evaluator.meanUnifiedMemory))
)

if (evaluator.severity.getValue > Severity.LOW.getValue) {
Expand Down

0 comments on commit 01965b8

Please sign in to comment.