Skip to content

Commit

Permalink
Merge pull request #15 from lucproglangcourse/master
Browse files Browse the repository at this point in the history
simplified fakeps benchmarks
  • Loading branch information
klaeufer committed Mar 3, 2016
2 parents df295f2 + cdc1ac5 commit 6abe0d5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ To generate larger data sets for testing:

To run the benchmarks:

$ sbt "test:runMain edu.luc.etl.osdi.processtree.scala.fakeps.BenchmarkFold"
$ sbt "test:runMain edu.luc.etl.osdi.processtree.scala.fakeps.BenchmarkArray"
$ sbt "test:runMain edu.luc.etl.osdi.processtree.scala.fakeps.Benchmark"
$ sbt "test:runMain edu.luc.etl.osdi.processtree.scala.mutable.Benchmark"
$ sbt "test:runMain edu.luc.etl.osdi.processtree.scala.groupby.Benchmark"
$ sbt "test:runMain edu.luc.etl.osdi.processtree.scala.fold.Benchmark"
Expand Down
21 changes: 21 additions & 0 deletions src/test/scala/fakeps/Benchmark.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package edu.luc.etl.osdi.processtree.scala
package fakeps

import org.scalameter.api._

object Benchmark extends Bench.LocalTime {

val sizes: Gen[Int] = Gen.exponential("processes")(10, 10000, 10)

def measureMethod(f: Int => Iterator[(Int, Int)], label: String): Unit =
measure method label in {
using (sizes) in { n =>
f(n)
}
}

measureMethod(fakePsMutable, "fakePsMutable")
measureMethod(fakePsFold, "fakePsFold")
measureMethod(fakePsFoldSlow, "fakePsFoldSlow")
measureMethod(fakePsArray, "fakePsFoldArray")
}
23 changes: 0 additions & 23 deletions src/test/scala/fakeps/benchmarks.scala

This file was deleted.

0 comments on commit 6abe0d5

Please sign in to comment.