Skip to content

Commit

Permalink
Update BreezeBenchmark.scala to reflect Caliper API
Browse files Browse the repository at this point in the history
  • Loading branch information
bwignall committed Jul 1, 2024
1 parent ba1a6a0 commit 878efd0
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

package breeze.benchmark

import com.google.caliper.{Runner, SimpleBenchmark}
import com.google.caliper.Benchmark
import com.google.caliper.runner.CaliperMain

/**
* Extend this to create an actual benchmarking class.
*/
trait BreezeBenchmark extends SimpleBenchmark {
trait BreezeBenchmark {

/**
* Sugar to run 'f' for 'reps' number of times.
Expand Down Expand Up @@ -68,6 +69,6 @@ trait BreezeBenchmark extends SimpleBenchmark {
/**
* Extend this to create a main object which will run 'cls' (a benchmark).
*/
abstract class MyRunner(val cls: java.lang.Class[_ <: com.google.caliper.Benchmark]) {
def main(args: Array[String]): Unit = Runner.main(cls, args: _*)
abstract class MyRunner(val cls: java.lang.Class[_]) {
def main(args: Array[String]): Unit = CaliperMain.main(cls, args)
}

0 comments on commit 878efd0

Please sign in to comment.