Skip to content

Add dotty boostrapped benchmarks #2954

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

Merged
merged 1 commit into from
Aug 3, 2017
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
2 changes: 1 addition & 1 deletion bench/src/main/scala/Benchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Bench {
.mode(Mode.AverageTime)
.timeUnit(TimeUnit.MILLISECONDS)
.forks(1)
.warmupIterations(12)
.warmupIterations(30)
.measurementIterations(20)
.build

Expand Down
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ val `dotty-sbt-bridge-bootstrapped` = Build.`dotty-sbt-bridge-bootstrapped`
val `dotty-language-server` = Build.`dotty-language-server`
val sjsSandbox = Build.sjsSandbox
val `dotty-bench` = Build.`dotty-bench`
val `dotty-bench-bootstrapped` = Build.`dotty-bench-bootstrapped`
val `scala-library` = Build.`scala-library`
val `scala-compiler` = Build.`scala-compiler`
val `scala-reflect` = Build.`scala-reflect`
Expand Down
17 changes: 12 additions & 5 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ object Build {
}
)

lazy val commonBenchmarkSettings = Seq(
mainClass in (Jmh, run) := Some("dotty.tools.benchmarks.Bench"), // custom main for jmh:run
javaOptions += "-DBENCH_CLASS_PATH=" + Attributed.data((fullClasspath in Compile).value).mkString("", ":", "")
)

// sbt >= 0.13.12 will automatically rewrite transitive dependencies on
// any version in any organization of scala{-library,-compiler,-reflect,p}
// to have organization `scalaOrganization` and version `scalaVersion`
Expand Down Expand Up @@ -822,11 +827,13 @@ object Build {

lazy val `dotty-bench` = project.in(file("bench")).
dependsOn(`dotty-compiler`).
settings(commonNonBootstrappedSettings).
settings(
mainClass in (Jmh, run) := Some("dotty.tools.benchmarks.Bench"), // custom main for jmh:run
javaOptions += "-DBENCH_CLASS_PATH=" + Attributed.data((fullClasspath in Compile).value).mkString("", ":", "")
).
settings(commonNonBootstrappedSettings ++ commonBenchmarkSettings).
enablePlugins(JmhPlugin)

lazy val `dotty-bench-bootstrapped` = project.in(file("bench-bootstrapped")).
dependsOn(`dotty-compiler-bootstrapped`).
settings(commonBootstrappedSettings ++ commonBenchmarkSettings).
settings(unmanagedSourceDirectories in Compile ++= Seq(baseDirectory.value / ".." / "bench" / "src")).
enablePlugins(JmhPlugin)

// Depend on dotty-library so that sbt projects using dotty automatically
Expand Down