From 303ee60ef2c620cb20a440db60be5e329dc5a0e3 Mon Sep 17 00:00:00 2001 From: Sayed Bilal Bari Date: Tue, 2 Jul 2024 10:32:53 -0500 Subject: [PATCH] Adding Qualification Benchmark Signed-off-by: Sayed Bilal Bari --- .../benchmarks/QualificationBenchmark.scala | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/QualificationBenchmark.scala diff --git a/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/QualificationBenchmark.scala b/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/QualificationBenchmark.scala new file mode 100644 index 000000000..b5807d355 --- /dev/null +++ b/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/QualificationBenchmark.scala @@ -0,0 +1,27 @@ +package org.apache.spark.rapids.tool.benchmarks + +import com.nvidia.spark.rapids.tool.qualification.QualificationArgs +import com.nvidia.spark.rapids.tool.qualification.QualificationMain.mainInternal + +object QualificationBenchmark extends BenchmarkBase { + override def runBenchmarkSuite(iterations: Int, + warmUpIterations: Int, + outputFormat: String, + mainArgs: Array[String]): Unit = { + runBenchmark("QualificationBenchmark") { + val benchmarker = + new Benchmark( + "QualificationBenchmark", + 2, + output = output, + outputPerIteration = true, + warmUpIterations = warmUpIterations, + minNumIters = iterations) + benchmarker.addCase("QualificationBenchmark") { _ => + mainInternal(new QualificationArgs(mainArgs), + printStdout = true, enablePB = true) + } + benchmarker.run() + } + } +}