szehon-ho commented on code in PR #55967:
URL: https://github.com/apache/spark/pull/55967#discussion_r3276847076


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/SqlBasedBenchmark.scala:
##########
@@ -46,17 +48,38 @@ trait SqlBasedBenchmark extends BenchmarkBase with 
SQLHelper {
       .getOrCreate()
   }
 
-  /** Runs function `f` with whole stage codegen on and off. */
-  final def codegenBenchmark(name: String, cardinality: Long)(f: => Unit): 
Unit = {
-    val benchmark = new Benchmark(name, cardinality, output = output)
+  /**
+   * Runs function `f` with whole stage codegen on and off.
+   *
+   * @param warmupTime JIT warm-up duration per case before timed iterations.
+   * @param minTime minimum total timed duration per case when `numIters` is 0.
+   * @param wholestageOffNumIters if non-zero, run exactly this many timed 
iterations
+   *        (wholestage off); otherwise use `minNumIters` and `minTime`.
+   * @param wholestageOnNumIters same for wholestage on.
+   */
+  final def codegenBenchmark(
+      name: String,
+      cardinality: Long,
+      warmupTime: FiniteDuration = 2.seconds,
+      minTime: FiniteDuration = 2.seconds,
+      minNumIters: Int = 2,

Review Comment:
   Done — reordered `codegenBenchmark` parameters to match `Benchmark` 
(`minNumIters`, `warmupTime`, `minTime`) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to