Hi,
I'm new to Scala so I might miss something obvious, but I am not able to get the example from the website with sbt running and I'd appreciate your help.
I created an empty folder and placed there the following two files:
RangeBenchmark.scala with this content (copied from your example):
import org.scalameter.api._
object RangeBenchmark extends PerformanceTest.Quickbenchmark {
val sizes = Gen.range("size")(300000, 1500000, 300000)
val ranges = for {
size <- sizes
} yield 0 until size
performance of "Range" in {
measure method "map" in {
using(ranges) in {
r => r.map(_ + 1)
}
}
}
}
and build.sbt with this content (again copied, current version replaced):
libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.6"
testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework")
logBuffered := false
Then I open the sbt console in the newly created folder, executing compile and then test getting Total time: 0 s, completed 15.04.2015 11:49:12. When executing "test-only RangeBenchmark.scala" I get
[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] No tests to run for test:testOnly
What am I doing wrong? (I also tried by creating a fresh IntelliJ Scala project and placing the files there, but still not working). Scala version is 2.11.6, java version "1.8.0_31".
Thank you,
Marcel