diff --git a/bench/profiles/ci.yml b/bench/profiles/ci.yml new file mode 100644 index 000000000000..0571d509a286 --- /dev/null +++ b/bench/profiles/ci.yml @@ -0,0 +1,61 @@ +scripts: + + re2s: + - measure 1 1 1 $(find $PROG_HOME/tests/re2s/src -name *.scala) + + implicit-cache: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/implicit_cache.scala + + implicit-cache-from-tasty: + - source $PROG_HOME/dotty/bench/scripts/implicit-cache-from-tasty + + implicit-scope-loop: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/implicit-scope-loop.scala + + i1535: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/i1535.scala + + i1687: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/i1687.scala + + empty-class: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/empty-class.scala + + empty-object: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/empty-object.scala + + empty-file: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/empty-file.scala + + patmatexhaust: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/patmatexhaust.scala + + exhaustivity-I: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/exhaustivity-I.scala + + exhaustivity-S: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/exhaustivity-S.scala + + exhaustivity-T: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/exhaustivity-T.scala + + exhaustivity-V: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/exhaustivity-V.scala + + implicitNums: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/implicitNums.scala + + implicitNums-from-tasty: + - source $PROG_HOME/dotty/bench/scripts/implicitNums-from-tasty + + inductive-implicits: + - measure 1 1 1 $PROG_HOME/dotty/tests/bench/inductive-implicits.scala + + scalap: + - source $PROG_HOME/dotty/bench/scripts/scalap + + power-macro-power-inlined-1: + - source $PROG_HOME/dotty/bench/scripts/power-macro-1 + + power-macro-power-inlined-1k: + - source $PROG_HOME/dotty/bench/scripts/power-macro-1k diff --git a/bench/profiles/default.yml b/bench/profiles/default.yml new file mode 100644 index 000000000000..6fc2faef36c5 --- /dev/null +++ b/bench/profiles/default.yml @@ -0,0 +1,13 @@ +includes: + - projects.yml + - implicits.yml + - typing.yml + - exhaustivity.yml + - misc.yml + - empty.yml + - quotes.yml + - tuples.yml + + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/empty.yml b/bench/profiles/empty.yml new file mode 100644 index 000000000000..ef878e07f50d --- /dev/null +++ b/bench/profiles/empty.yml @@ -0,0 +1,33 @@ +charts: + + - name: "empty class" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/empty-class.scala + lines: + - key: empty-class + label: bootstrapped + + - name: "empty object" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/empty-object.scala + lines: + - key: empty-object + label: bootstrapped + + - name: "empty file" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/empty-file.scala + lines: + - key: empty-file + label: bootstrapped + +scripts: + + empty-class: + - measure $PROG_HOME/dotty/tests/bench/empty-class.scala + + empty-object: + - measure $PROG_HOME/dotty/tests/bench/empty-object.scala + + empty-file: + - measure $PROG_HOME/dotty/tests/bench/empty-file.scala + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/exhaustivity.yml b/bench/profiles/exhaustivity.yml new file mode 100644 index 000000000000..493c40961adf --- /dev/null +++ b/bench/profiles/exhaustivity.yml @@ -0,0 +1,59 @@ +charts: + - name: "exhaustivity check" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/patmatexhaust.scala + lines: + - key: patmatexhaust + label: bootstrapped + + - name: "exhaustivity I" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/exhaustivity-I.scala + lines: + - key: exhaustivity-I + label: bootstrapped + + - name: "exhaustivity S" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/exhaustivity-S.scala + lines: + - key: exhaustivity-S + label: bootstrapped + + - name: "exhaustivity T" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/exhaustivity-T.scala + lines: + - key: exhaustivity-T + label: bootstrapped + + - name: "exhaustivity V" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/exhaustivity-V.scala + lines: + - key: exhaustivity-V + label: bootstrapped + + - name: "exhaustivity MIPS" + url: https://github.com/lampepfl/dotty/blob/master/tests/patmat/i7186.scala + lines: + - key: exhaustivity-mips + label: bootstrapped + +scripts: + + patmatexhaust: + - measure 20 40 3 $PROG_HOME/dotty/tests/bench/patmatexhaust.scala + + exhaustivity-I: + - measure 20 40 3 $PROG_HOME/dotty/tests/bench/exhaustivity-I.scala + + exhaustivity-S: + - measure 20 40 3 $PROG_HOME/dotty/tests/bench/exhaustivity-S.scala + + exhaustivity-T: + - measure 20 40 3 $PROG_HOME/dotty/tests/bench/exhaustivity-T.scala + + exhaustivity-V: + - measure 20 40 3 $PROG_HOME/dotty/tests/bench/exhaustivity-V.scala + + exhaustivity-mips: + - measure 20 40 3 $PROG_HOME/dotty/tests/patmat/i7186.scala + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/implicits.yml b/bench/profiles/implicits.yml new file mode 100644 index 000000000000..d20a99c26461 --- /dev/null +++ b/bench/profiles/implicits.yml @@ -0,0 +1,51 @@ +charts: + - name: "implicit cache I" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/implicit_cache.scala + lines: + - key: implicit-cache + label: bootstrapped + - key: implicit-cache-from-tasty + label: from tasty + + - name: "implicit cache II" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/implicitNums.scala + lines: + - key: implicitNums + label: bootstrapped + - key: implicitNums-from-tasty + label: from tasty + + - name: "implicit scope loop" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/implicit-scope-loop.scala + lines: + - key: implicit-scope-loop + label: bootstrapped + + - name: "inductive implicits" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/inductive-implicits.scala + lines: + - key: inductive-implicits + label: bootstrapped + +scripts: + + implicit-cache: + - measure $PROG_HOME/dotty/tests/bench/implicit_cache.scala + + implicit-cache-from-tasty: + - source $PROG_HOME/dotty/bench/scripts/implicit-cache-from-tasty + + implicit-scope-loop: + - measure $PROG_HOME/dotty/tests/bench/implicit-scope-loop.scala + + inductive-implicits: + - measure $PROG_HOME/dotty/tests/bench/inductive-implicits.scala + + implicitNums: + - measure $PROG_HOME/dotty/tests/bench/implicitNums.scala + + implicitNums-from-tasty: + - source $PROG_HOME/dotty/bench/scripts/implicitNums-from-tasty + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/misc.yml b/bench/profiles/misc.yml new file mode 100644 index 000000000000..80172fc791ed --- /dev/null +++ b/bench/profiles/misc.yml @@ -0,0 +1,21 @@ +charts: + + - name: "issue #1535" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/i1535.scala + lines: + - key: i1535 + label: bootstrapped + + - name: "issue #1687" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/i1687.scala + lines: + - key: i1687 + label: bootstrapped + +scripts: + + i1535: + - measure $PROG_HOME/dotty/tests/bench/i1535.scala + + i1687: + - measure $PROG_HOME/dotty/tests/bench/i1687.scala diff --git a/bench/profiles/projects.yml b/bench/profiles/projects.yml new file mode 100644 index 000000000000..2d96fb732910 --- /dev/null +++ b/bench/profiles/projects.yml @@ -0,0 +1,44 @@ +charts: + - name: "dotty (source changes over time)" + url: https://github.com/lampepfl/dotty + lines: + - key: dotty + label: bootstrapped + + - name: "scala stdlib-2.13" + url: https://github.com/dotty-staging/scala/commits/stdLib213-dotty-community-build + lines: + - key: stdlib213 + label: bootstrapped + + - name: scalap + url: https://github.com/dotty-staging/scala/commits/scalap-dotty-community-build-2.13 + lines: + - key: scalap + label: bootstrapped + + - name: re2 + url: https://github.com/lampepfl/bench/blob/master/tests/re2s + lines: + - key: re2s + label: bootstrapped + + +scripts: + dotty: + - measure -with-compiler $(find $PROG_HOME/dotty/compiler/src/dotty -name *.scala -o -name *.java) + + re2s: + - measure $(find $PROG_HOME/tests/re2s/src -name *.scala) + + # scalapb: + # - source $PROG_HOME/dotty/bench/scripts/scalapb + + scalap: + - source $PROG_HOME/dotty/bench/scripts/scalap + + stdlib213: + - source $PROG_HOME/dotty/bench/scripts/stdlib213 + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/pull.yml b/bench/profiles/pull.yml new file mode 100644 index 000000000000..163d75a8769d --- /dev/null +++ b/bench/profiles/pull.yml @@ -0,0 +1,8 @@ +includes: + - projects.yml + - quotes.yml + - misc.yml + - empty.yml + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/quotes.yml b/bench/profiles/quotes.yml new file mode 100644 index 000000000000..9cb0d44e2304 --- /dev/null +++ b/bench/profiles/quotes.yml @@ -0,0 +1,32 @@ +charts: + - name: "Inline a quote" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/power-macro/PowerInlined-1.scala + lines: + - key: power-macro-power-inlined-1 + label: bootstrapped + + - name: "Inline 1k quotes" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/power-macro/PowerInlined-1k.scala + lines: + - key: power-macro-power-inlined-1k + label: bootstrapped + + - name: "Quote String interpolation matching" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/string-interpolation-macro/Test.scala + lines: + - key: quote-string-interpolation-matching + label: bootstrapped + +scripts: + + power-macro-power-inlined-1: + - source $PROG_HOME/dotty/bench/scripts/power-macro-1 + + power-macro-power-inlined-1k: + - source $PROG_HOME/dotty/bench/scripts/power-macro-1k + + quote-string-interpolation-matching: + - source $PROG_HOME/dotty/bench/scripts/quote-string-interpolation-matching + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/sbt.yml b/bench/profiles/sbt.yml new file mode 100644 index 000000000000..3ab0e43f3db2 --- /dev/null +++ b/bench/profiles/sbt.yml @@ -0,0 +1,15 @@ +charts: + - name: "dotty (source changes over time)" + url: https://github.com/lampepfl/dotty + lines: + - key: dotty + label: bootstrapped + - key: dotty-sbt + label: with sbt phases + +scripts: + dotty-sbt: + - measure -with-compiler -Yforce-sbt-phases -with-dotty $(find $PROG_HOME/dotty/compiler/src/dotty -name *.scala -o -name *.java) + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/tuples.yml b/bench/profiles/tuples.yml new file mode 100644 index 000000000000..eaa2f302a885 --- /dev/null +++ b/bench/profiles/tuples.yml @@ -0,0 +1,68 @@ +charts: + - name: "Tuple22 creation with Tuple22.apply" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/tuple22-creation-apply.scala + lines: + - key: tuple22-creation-apply + label: bootstrapped + + - name: "Tuple22 creation with *:" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/tuple22-creation-cons.scala + lines: + - key: tuple22-creation-cons + label: bootstrapped + + - name: "Tuple22.tail" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/tuple22-tails.scala + lines: + - key: tuple22-tails + label: bootstrapped + + - name: "Tuple22.apply" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/tuple22-apply.scala + lines: + - key: tuple22-apply + label: bootstrapped + + - name: "Tuple22.size" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/tuple22-size.scala + lines: + - key: tuple22-size + label: bootstrapped + + - name: "Tuple reverse (Runtime)" + url: https://github.com/lampepfl/dotty/blob/master/bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala#L59 + lines: + - key: tuple-reverse + label: bootstrapped + + - name: "Tuple flatMap (Runtime)" + url: https://github.com/lampepfl/dotty/blob/master/bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala#L64 + lines: + - key: tuple-flatMap + label: bootstrapped + +scripts: + + tuple22-creation-apply: + - measure $PROG_HOME/dotty/tests/bench/tuple22-creation-apply.scala + + tuple22-creation-cons: + - measure $PROG_HOME/dotty/tests/bench/tuple22-creation-cons.scala + + tuple22-tails: + - measure $PROG_HOME/dotty/tests/bench/tuple22-tails.scala + + tuple22-apply: + - measure $PROG_HOME/dotty/tests/bench/tuple22-apply.scala + + tuple22-size: + - measure $PROG_HOME/dotty/tests/bench/tuple22-size.scala + + tuple-reverse: + - measure-run TupleOps.reverse + + tuple-flatMap: + - measure-run TupleOps.flatMap + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/profiles/typing.yml b/bench/profiles/typing.yml new file mode 100644 index 000000000000..4df33da49d32 --- /dev/null +++ b/bench/profiles/typing.yml @@ -0,0 +1,14 @@ +charts: + - name: "Find Ref" + url: https://github.com/lampepfl/dotty/blob/master/tests/bench/FindRef.scala + lines: + - key: find-ref + label: bootstrapped + +scripts: + + find-ref: + - measure $PROG_HOME/dotty/tests/bench/FindRef.scala + +config: + pr_base_url: "https://github.com/lampepfl/dotty/pull/" diff --git a/bench/scripts/implicit-cache-from-tasty b/bench/scripts/implicit-cache-from-tasty new file mode 100755 index 000000000000..2cbd1694c9ac --- /dev/null +++ b/bench/scripts/implicit-cache-from-tasty @@ -0,0 +1,8 @@ +set -e + +out="$PROG_HOME/tests/implicit_cache-out" +mkdir -p "$out" + +compile -d "$out" "$PROG_HOME/dotty/tests/bench/implicit_cache.scala" + +measure -from-tasty "$out/Test.tasty" "$out/A.tasty" "$out/Foo.tasty" diff --git a/bench/scripts/implicitNums-from-tasty b/bench/scripts/implicitNums-from-tasty new file mode 100755 index 000000000000..53c4ea3754da --- /dev/null +++ b/bench/scripts/implicitNums-from-tasty @@ -0,0 +1,8 @@ +set -e + +out="$PROG_HOME/tests/implicitNums-out" +mkdir -p "$out" + +compile -d "$out" "$PROG_HOME/dotty/tests/bench/implicitNums.scala" + +measure -from-tasty "$out/Test.tasty" diff --git a/bench/scripts/power-macro-1 b/bench/scripts/power-macro-1 new file mode 100755 index 000000000000..e6e43f31aa38 --- /dev/null +++ b/bench/scripts/power-macro-1 @@ -0,0 +1,7 @@ +set -e + +mkdir -p "$PROG_HOME/tests/power-macro/out" + +compile -d "$PROG_HOME/tests/power-macro/out" "$PROG_HOME/dotty/tests/bench/power-macro/PowerMacro.scala" + +measure "$PROG_HOME/dotty/tests/bench/power-macro/PowerInlined-1.scala" -classpath "$PROG_HOME/tests/power-macro/out" diff --git a/bench/scripts/power-macro-1k b/bench/scripts/power-macro-1k new file mode 100755 index 000000000000..ec9c4b1dffe8 --- /dev/null +++ b/bench/scripts/power-macro-1k @@ -0,0 +1,7 @@ +set -e + +mkdir -p "$PROG_HOME/tests/power-macro/out" + +compile -d "$PROG_HOME/tests/power-macro/out" "$PROG_HOME/dotty/tests/bench/power-macro/PowerMacro.scala" + +measure "$PROG_HOME/dotty/tests/bench/power-macro/PowerInlined-1k.scala" -classpath "$PROG_HOME/tests/power-macro/out" diff --git a/bench/scripts/quote-string-interpolation-matching b/bench/scripts/quote-string-interpolation-matching new file mode 100755 index 000000000000..003f299db32d --- /dev/null +++ b/bench/scripts/quote-string-interpolation-matching @@ -0,0 +1,7 @@ +set -e + +mkdir -p "$PROG_HOME/tests/string-interpolation-macro/out" + +compile -d "$PROG_HOME/tests/string-interpolation-macro/out" "$PROG_HOME/dotty/tests/bench/string-interpolation-macro/Macro.scala" + +measure "$PROG_HOME/dotty/tests/bench/string-interpolation-macro/Test.scala" -classpath "$PROG_HOME/tests/string-interpolation-macro/out" diff --git a/bench/scripts/scalap b/bench/scripts/scalap new file mode 100644 index 000000000000..f9b25632e8ae --- /dev/null +++ b/bench/scripts/scalap @@ -0,0 +1,5 @@ +set -e + +path=$(cs fetch -p org.scala-lang:scala-compiler:2.13.0) + +measure -source 3.0-migration -classpath "$path" $(find $PROG_HOME/dotty/community-build/community-projects/scalap/src/scalap -name "*.scala") diff --git a/bench/scripts/stdlib213 b/bench/scripts/stdlib213 new file mode 100644 index 000000000000..b70010b15644 --- /dev/null +++ b/bench/scripts/stdlib213 @@ -0,0 +1,7 @@ +set -e + +pattern="! -name AnyVal.scala ! -name language.scala -name *.scala -o -name *.java" +stdlib213=$(find $PROG_HOME/dotty/community-build/community-projects/stdLib213/src/library/scala $pattern) +cd $PROG_HOME/dotty +measure -language:implicitConversions $stdlib213 +