From 3d9290f84f950c13a26595719678e0ce0f4db913 Mon Sep 17 00:00:00 2001 From: Sayed Bilal Bari Date: Thu, 11 Jul 2024 13:35:17 -0500 Subject: [PATCH] Adding separator as a val Signed-off-by: Sayed Bilal Bari --- .../apache/spark/rapids/tool/benchmarks/Benchmark.scala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/Benchmark.scala b/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/Benchmark.scala index 5e676e379..a09f121ad 100644 --- a/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/Benchmark.scala +++ b/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/Benchmark.scala @@ -94,6 +94,7 @@ class Benchmark( */ def measure(name: String, overrideNumIters: Int)(f: ToolsTimer => Unit): Result = { System.gc() // ensures garbage from previous cases don't impact this one + val separator = "-" * 80 for (wi <- 0 until warmUpIterations) { f(new ToolsTimer(-1)) } @@ -111,14 +112,14 @@ class Benchmark( gcCounts += memoryTracker.getTotalGCCount gcTimes += memoryTracker.getTotalGCTime if (outputPerIteration) { - println("*"*80) + println(separator) println(s"Iteration $i took ${NANOSECONDS.toMicros(runTime)} microseconds") - println("*"*80) + println(separator) } } - println("*"*80) + println(separator) println(s" Stopped after $minIters iterations, ${NANOSECONDS.toMillis(runTimes.sum)} ms") - println("*"*80) + println(separator) assert(runTimes.nonEmpty) val bestRuntime = runTimes.min val avgRuntime = runTimes.sum / runTimes.size