Skip to content
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: 2 additions & 0 deletions bench/scripts/collection-strawman-cold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
find collection-strawman/src/main/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench/jmh:run 0 1 10" {} + | sbt
2 changes: 2 additions & 0 deletions bench/scripts/compiler-cold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
find compiler/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench/jmh:run 0 1 10" {} + | sbt
2 changes: 2 additions & 0 deletions bench/scripts/library-cold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
find library/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench/jmh:run 0 1 10" {} + | sbt
3 changes: 2 additions & 1 deletion bench/src/main/scala/Benchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ object Bench {

val warmup = if (intArgs.length > 0) intArgs(0).toInt else 30
val iterations = if (intArgs.length > 1) intArgs(1).toInt else 20
val forks = if (intArgs.length > 2) intArgs(2).toInt else 1

val args2 = args1.map { arg =>
if ((arg.endsWith(".scala") || arg.endsWith(".java")) && arg.head != '/') "../" + arg
Expand All @@ -39,9 +40,9 @@ object Bench {
.jvmArgsPrepend("-Xbootclasspath/a:" + libs + ":")
.mode(Mode.AverageTime)
.timeUnit(TimeUnit.MILLISECONDS)
.forks(1)
.warmupIterations(warmup)
.measurementIterations(iterations)
.forks(forks)
.build

val runner = new Runner(opts) // full access to all JMH features, you can also provide a custom output Format here
Expand Down