File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- find compiler/src/ -type f \( -name " *.scala" -or -name " *.java" \) -exec echo " dotty-bench/jmh:run" {} + | sbt
2+ find compiler/src/ -type f \( -name " *.scala" -or -name " *.java" \) -exec echo " dotty-bench/jmh:run 5 10 " {} + | sbt
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- find library/src/ -type f \( -name " *.scala" -or -name " *.java" \) -exec echo " dotty-bench/jmh:run" {} + | sbt
2+ find library/src/ -type f \( -name " *.scala" -or -name " *.java" \) -exec echo " dotty-bench/jmh:run 40 30 " {} + | sbt
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ object Bench {
2222 println(" Missing <args>" )
2323 return
2424 }
25+ val (intArgs, args1) = args.span(x => try { x.toInt; true } catch { case _ : Throwable => false } )
2526
26- val args2 = args.map { arg =>
27+ val warmup = if (intArgs.length > 0 ) intArgs(0 ).toInt else 30
28+ val iteration warmup = if (intArgs.length > 1 ) intArgs(1 ).toInt else 20
29+
30+ val args2 = args1.map { arg =>
2731 if ((arg.endsWith(" .scala" ) || arg.endsWith(" .java" )) && arg.head != '/' ) " ../" + arg
2832 else arg
2933 }
@@ -36,8 +40,8 @@ object Bench {
3640 .mode(Mode .AverageTime )
3741 .timeUnit(TimeUnit .MILLISECONDS )
3842 .forks(1 )
39- .warmupIterations(30 )
40- .measurementIterations(20 )
43+ .warmupIterations(warmup )
44+ .measurementIterations(iterations )
4145 .build
4246
4347 val runner = new Runner (opts) // full access to all JMH features, you can also provide a custom output Format here
You can’t perform that action at this time.
0 commit comments