Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #288 from scala/jdk8-options
Browse files Browse the repository at this point in the history
Improve command-line options when running benchmarks on JDK8
  • Loading branch information
jsuereth committed Feb 6, 2015
2 parents e570dc5 + 917d05a commit 26bb7c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import Keys._
import java.net.URL

object BuildSettings {
val buildVersion = "0.10.0-SNAPSHOT"
val buildVersion = "0.10.0-SNAPSHOT"
val buildScalaVersion = System.getProperty("scala.version", "2.11.4")
val javaVersion = System.getProperty("java.version")
val buildSettings = Defaults.defaultSettings ++ Seq(
version := buildVersion,
scalaVersion := buildScalaVersion,
Expand All @@ -26,12 +27,11 @@ object MyBuild extends Build {

for (len <- config) {
import scala.sys.process._
var shellCommand = Seq(
"java", "-Dsize=" + len, "-cp", toolCP,
"-Xms1536M", "-Xmx4096M", "-Xss2M", "-XX:MaxPermSize=512M", "-XX:+UseParallelGC",
"scala.tools.nsc.MainGenericRunner", "-cp", libraryCP,
benchClass, "10")
// println(shellCommand)
val jdkOptions =
if (javaVersion.startsWith("1.8")) Seq("-XX:+UseParallelGC") else Seq("-XX:MaxPermSize=512M", "-XX:+UseParallelGC")
var shellCommand =
Seq("java", "-Dsize=" + len, "-cp", toolCP, "-Xms1536M", "-Xmx4096M", "-Xss2M") ++ jdkOptions ++
Seq("scala.tools.nsc.MainGenericRunner", "-cp", libraryCP, benchClass, "10")
shellCommand.!
}
}
Expand Down

0 comments on commit 26bb7c1

Please sign in to comment.