mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 14:50:42 +01:00
Merge pull request #488 from Christewart/2019-06-02-scalameter
Add scalameter test dependency and sbt settings
This commit is contained in:
commit
1d09bf7976
2 changed files with 22 additions and 0 deletions
20
build.sbt
20
build.sbt
|
@ -108,6 +108,25 @@ lazy val commonTestWithDbSettings = Seq(
|
||||||
|
|
||||||
lazy val commonProdSettings = commonSettings
|
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
|
lazy val bitcoins = project
|
||||||
.in(file("."))
|
.in(file("."))
|
||||||
.aggregate(
|
.aggregate(
|
||||||
|
@ -130,6 +149,7 @@ lazy val bitcoins = project
|
||||||
zmq
|
zmq
|
||||||
)
|
)
|
||||||
.settings(commonSettings: _*)
|
.settings(commonSettings: _*)
|
||||||
|
// crossScalaVersions must be set to Nil on the aggregating project
|
||||||
.settings(crossScalaVersions := Nil)
|
.settings(crossScalaVersions := Nil)
|
||||||
.settings(libraryDependencies ++= Deps.root)
|
.settings(libraryDependencies ++= Deps.root)
|
||||||
.enablePlugins(ScalaUnidocPlugin, GitVersioning)
|
.enablePlugins(ScalaUnidocPlugin, GitVersioning)
|
||||||
|
|
|
@ -26,6 +26,7 @@ object Deps {
|
||||||
val slickV = "3.3.1"
|
val slickV = "3.3.1"
|
||||||
val sqliteV = "3.27.2.1"
|
val sqliteV = "3.27.2.1"
|
||||||
val uJsonV = "0.7.1"
|
val uJsonV = "0.7.1"
|
||||||
|
val scalameterV = "0.17"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Compile {
|
object Compile {
|
||||||
|
@ -73,6 +74,7 @@ object Deps {
|
||||||
val ammonite = Compile.ammonite % "test"
|
val ammonite = Compile.ammonite % "test"
|
||||||
val playJson = Compile.playJson % "test"
|
val playJson = Compile.playJson % "test"
|
||||||
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % V.akkaActorV withSources () withJavadoc ()
|
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(
|
val root = List(
|
||||||
|
|
Loading…
Add table
Reference in a new issue