Skip to content

Commit

Permalink
Reinstate the benchmarks project
Browse files Browse the repository at this point in the history
  • Loading branch information
retronym committed Apr 28, 2020
1 parent 130309b commit e47b500
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
35 changes: 16 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ lazy val zincRoot: Project = (project in file("."))
compilerInterface.projectRefs ++
compilerBridge.projectRefs ++
zincApiInfo.projectRefs ++
zincBenchmarks.projectRefs ++
zincClasspath.projectRefs ++
zincClassfile.projectRefs ++
zincCompileCore.projectRefs ++
Expand Down Expand Up @@ -349,21 +350,20 @@ lazy val zincCore = (projectMatrix in internalPath / "zinc-core")
.jvmPlatform(scalaVersions = List(scala212, scala213))
.configure(addBaseSettingsAndTestDeps, addSbtIO, addSbtUtilLogging, addSbtUtilRelation)

// lazy val zincBenchmarks = (project in internalPath / "zinc-benchmarks")
// .dependsOn(compilerInterface % "compile->compile;compile->test")
// .dependsOn(compilerBridge212, zincCore, zincTesting % Test)
// .enablePlugins(JmhPlugin)
// .settings(
// noPublish,
// name := "Benchmarks of Zinc and the compiler bridge",
// libraryDependencies ++= Seq(
// "org.eclipse.jgit" % "org.eclipse.jgit" % "5.4.2.201908231537-r",
// "net.openhft" % "affinity" % "3.1.11"
// ),
// scalaVersion := scala212,
// crossScalaVersions := Seq(scala212),
// javaOptions in Test ++= List("-Xmx600M", "-Xms600M"),
// )
lazy val zincBenchmarks = (projectMatrix in internalPath / "zinc-benchmarks")
.dependsOn(compilerInterface % "compile->compile;compile->test")
.dependsOn(compilerBridge, zincCore, zincTesting % "compile->test")
.enablePlugins(JmhPlugin)
.settings(
noPublish,
name := "Benchmarks of Zinc and the compiler bridge",
libraryDependencies ++= Seq(
"org.eclipse.jgit" % "org.eclipse.jgit" % "5.4.2.201908231537-r",
"net.openhft" % "affinity" % "3.1.11"
),
javaOptions in Test ++= List("-Xmx600M", "-Xms600M"),
)
.jvmPlatform(scalaVersions = List(scala212, scala213))

// sbt-side interface to compiler. Calls compiler-side interface reflectively
lazy val zincCompileCore = (projectMatrix in internalPath / "zinc-compile-core")
Expand Down Expand Up @@ -706,10 +706,7 @@ tearDownBenchmarkResources in ThisBuild := { IO.delete(dir) }

addCommandAlias(
"runBenchmarks",
s""";zincBenchmarks/run $dirPath
|;zincBenchmarks/jmh:run -p _tempDir=$dirPath -prof gc
|;tearDownBenchmarkResources
""".stripMargin
s""";zincBenchmarksJVM2_12/run $dirPath;zincBenchmarksJVM2_12/jmh:run -p _tempDir=$dirPath -prof gc;tearDownBenchmarkResources""".stripMargin
)

lazy val otherRootSettings = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private[xsbt] object ZincBenchmark {
compilationInfo: CompilationInfo
): ZincCompiler = {
object output extends SingleOutput {
def getOutputDirectory: File = outputDir
def getOutputDirectory = outputDir.toPath
override def toString = s"SingleOutput($getOutputDirectory)"
}
val args = compilationInfo.scalacOptions
Expand Down

0 comments on commit e47b500

Please sign in to comment.