Add scalameter test dependency and sbt settings

This commit is contained in:
Chris Stewart 2019-06-02 16:43:06 -05:00
parent 121cdf326d
commit 99ef45cce2
2 changed files with 22 additions and 0 deletions

View File

@ -108,6 +108,25 @@ lazy val commonTestWithDbSettings = Seq(
lazy val commonProdSettings = commonSettings
lazy val Benchmark = config("bench") extend Test
lazy val benchSettings: Seq[Def.SettingsDefinition] = {
//for scalameter
//https://scalameter.github.io/home/download/
//you can add benchmarking to a project by adding these to lines
//to the projects build definition
// .settings(benchSettings: _*)
// .configs(Benchmark)
List(
unmanagedSourceDirectories in Test += baseDirectory.value / "src" / "bench" / "scala",
testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework"),
parallelExecution in Benchmark := false,
outputStrategy in Benchmark := Some(StdoutOutput),
fork in Benchmark := true,
connectInput in Benchmark := true,
inConfig(Benchmark)(Defaults.testSettings)
)
}
lazy val bitcoins = project
.in(file("."))
.aggregate(
@ -130,6 +149,7 @@ lazy val bitcoins = project
zmq
)
.settings(commonSettings: _*)
// crossScalaVersions must be set to Nil on the aggregating project
.settings(crossScalaVersions := Nil)
.settings(libraryDependencies ++= Deps.root)
.enablePlugins(ScalaUnidocPlugin, GitVersioning)

View File

@ -26,6 +26,7 @@ object Deps {
val slickV = "3.3.1"
val sqliteV = "3.27.2.1"
val uJsonV = "0.7.1"
val scalameterV = "0.17"
}
object Compile {
@ -73,6 +74,7 @@ object Deps {
val ammonite = Compile.ammonite % "test"
val playJson = Compile.playJson % "test"
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % V.akkaActorV withSources () withJavadoc ()
val scalameter = "com.storm-enroute" %% "scalameter" % V.scalameterV % "test" withSources () withJavadoc ()
}
val root = List(