Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplified fakeps benchmarks #15

Merged
merged 1 commit into from
Mar 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.