File tree 3 files changed +9
-5
lines changed 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /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 1
1
#! /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 {
22
22
println(" Missing <args>" )
23
23
return
24
24
}
25
+ val (intArgs, args1) = args.span(x => try { x.toInt; true } catch { case _ : Throwable => false } )
25
26
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 =>
27
31
if ((arg.endsWith(" .scala" ) || arg.endsWith(" .java" )) && arg.head != '/' ) " ../" + arg
28
32
else arg
29
33
}
@@ -36,8 +40,8 @@ object Bench {
36
40
.mode(Mode .AverageTime )
37
41
.timeUnit(TimeUnit .MILLISECONDS )
38
42
.forks(1 )
39
- .warmupIterations(30 )
40
- .measurementIterations(20 )
43
+ .warmupIterations(warmup )
44
+ .measurementIterations(iterations )
41
45
.build
42
46
43
47
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