Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update benchmarks to use Scala 2.12 or 2.13 #242

Merged
merged 125 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
c7e591b
Update sbt to version 1.3.13
lbulej Sep 28, 2020
d93e675
Update scalafmt in root project to version 2.4.2
lbulej Sep 28, 2020
28670cc
Remove unused renaissanceScalaVersion setting from the root project
lbulej Sep 28, 2020
5d9820c
Update filtering hint in root build.sbt
lbulej Sep 28, 2020
0967934
Update scalafmt in renaissance-core to version 2.4.2
lbulej Sep 28, 2020
8b6b5ea
Update scalafmt in renaissance-harness to version 2.4.2
lbulej Sep 28, 2020
b6f4cfe
Update scala in renaissance-harness to version 2.13.3
lbulej Sep 28, 2020
1b71f2b
Update scalafmt in benchmarks/dummy to version 2.4.2
lbulej Sep 28, 2020
6bc8128
Update scalafmt in benchmarks/jdk-concurrent to version 2.4.2
lbulej Sep 28, 2020
183bea0
Update scala in benchmarks/jdk-concurrent to 2.13.3
lbulej Sep 28, 2020
bb9db36
Update scalafmt in benchmarks/jdk-streams to version 2.4.2
lbulej Sep 28, 2020
6aaf72d
Update scala in benchmarks/jdk-concurrent to version 2.13.3
lbulej Sep 28, 2020
b99b67e
Update scalafmt in benchmarks/scala-stdlib to version 2.4.2
lbulej Sep 28, 2020
966a47e
Update scala in benchmarks/scala-stdlib to version 2.13.3
lbulej Sep 28, 2020
ffe7f18
Clean up code style in ScalaKmeans
lbulej Sep 28, 2020
d7ded63
Update scalafmt in benchmarks/actors to version 2.4.2
lbulej Sep 28, 2020
2e1f5de
Update scala in benchmarks/actors to version 2.11.12
lbulej Sep 28, 2020
00ce5dd
Clean up minor Scala coding style issues in benchmarks/actors
lbulej Sep 28, 2020
6a2d40a
Update scalafmt in benchmarks/scala-dotty to version 2.4.2
lbulej Sep 28, 2020
b369a65
Clean up minor Scala coding style issues in benchmarks/scala-dotty
lbulej Sep 28, 2020
82a56e1
Update scala in benchmarks/scala-dotty to version 2.12.12
lbulej Sep 28, 2020
aa5f08b
Clean up minor Scala coding style issues in benchmarks/scala-dotty
lbulej Sep 28, 2020
c54dd9b
Update scalafmt in benchmarks/rx to version 2.4.2
lbulej Sep 28, 2020
5d16e2a
Update scala in benchmarks/rx to version 2.13.3
lbulej Sep 28, 2020
757db94
Clean up minor Scala coding style issues in benchmarks/rx
lbulej Sep 28, 2020
dfcebb4
Update scalafmt in benchmarks/neo4j to version 2.4.2
lbulej Sep 29, 2020
a309eba
Revert "Update filtering hint in root build.sbt"
lbulej Nov 4, 2020
ce563ee
Update filtering hint in build.sbt
lbulej Nov 4, 2020
e0d745c
Add a note about neo4j incompatibility with Scala 2.12 (for now)
lbulej Nov 4, 2020
b90cf5c
Enable config-style argument formatting in Scala
lbulej Nov 4, 2020
e09739c
Update scalafmt in benchmarks/scala-stm to version 2.4.2
lbulej Nov 10, 2020
78b569f
Update scala in renaissance-harness to version 2.13.4
lbulej Nov 24, 2020
a341cb6
Update Scala in scala-dotty to version 2.13.4
lbulej Nov 24, 2020
2941cef
Bump Scala to 2.13.4 in benchmarks that were moved to 2.13.3
lbulej Nov 24, 2020
e87404b
Bump Scala version in scala-stm to 2.12.12
lbulej Nov 24, 2020
872b14d
Update scalafmt in benchmarks/scala-sat to version 2.4.2
lbulej Nov 24, 2020
3940837
Update Scala version in benchmarks/scala-sat to version 2.11.12
lbulej Nov 24, 2020
b1f1234
Use downloaded scala-smtlib dependency instead of building it
lbulej Nov 24, 2020
bbb765f
Update Scala version in benchmarks/scala-sat to 2.12.12
lbulej Nov 24, 2020
a872f8b
Update CafeSat to Scala 2.13, scalatest 3.0.9, and smtlib 0.2.1-git
lbulej Nov 27, 2020
e63ac77
Update scala-smtlib to 0.2.1-git and Scala 2.13
lbulej Nov 27, 2020
412b748
Don't use Array.deep in validation
lbulej Nov 27, 2020
c97a2fc
Update Scala version in benchmarks/scala-sat to 2.13.4
lbulej Nov 27, 2020
6c4a013
Update sbt.version in build.properties for plugins
lbulej Dec 1, 2020
01b5bfb
Fix formatting due to updated scalafmt
lbulej Dec 1, 2020
d6e97f0
Add scalafmt to the root metaproject
lbulej Dec 1, 2020
e6bb98e
Update sbt.version in the root project
lbulej Dec 1, 2020
d7fe59c
Filter out benchmarks that still need updating for now
lbulej Dec 1, 2020
d6015bf
Update scalafmt in benchmarks/apache-spark to version 2.4.2
lbulej Jan 10, 2021
7bb5965
Update Scala to 2.12.12 and Spark to 2.4.7 in benchmarks/apache-spark
lbulej Jan 10, 2021
ac298a2
Update Spark to 3.0.1 in benchmarks/apache-spark
lbulej Jan 11, 2021
cb4360e
Update scalafmt in benchmarks/twitter-finagle to version 2.4.2
lbulej Jan 11, 2021
dae9ae1
Update dependencies for benchmarks/twitter-finagle
lbulej Jan 11, 2021
b866bd5
Update Scala to 2.12.12 in benchmarks/twitter-finagle
lbulej Jan 11, 2021
9863b24
Fix formatting due to updated scalafmt
lbulej Jan 11, 2021
efc4984
Update build.sbt to only exclude database benchmarks
lbulej Jan 11, 2021
a4e6ec8
Update scalafmt in benchmarks/database to version 2.4.2
lbulej Jan 11, 2021
b09e9b2
Update Scala to 2.13.4 in benchmarks/database
lbulej Jan 11, 2021
19298a1
Remove temporary benchmark filter from build.sbt
lbulej Jan 11, 2021
39df575
Remove build.properties with sbt.version from benchmark subprojects
lbulej Jan 11, 2021
4eb23ad
Prepare Dotty benchmark for batch compilation of other sources
lbulej Jan 12, 2021
e35ef7b
Separate benchmark group from benchmark project
lbulej Feb 2, 2021
bc40007
Split akka-uct and reactors into separate projects
lbulej Feb 2, 2021
1050d32
Update akka-uct to akka-actor 2.6.12 and Scala 2.13.4
lbulej Feb 2, 2021
94fe89d
Remove workarounds for Scala 2.11 from akka-uct
lbulej Feb 2, 2021
10a15ae
Remove Scala 2.11 annotation workarounds for updated benchmarks
lbulej Feb 2, 2021
ff3ca25
Create scratch directory in the current directory by default
lbulej Feb 3, 2021
a6d96e5
Log module loading notification at "fine" level
lbulej Feb 3, 2021
fb8d1c2
Remove obsolete notes from build.sbt in actors-akka
lbulej Feb 3, 2021
6c1ef32
Remove redundant taskKey from build.sbt in renaissance-core
lbulej Feb 3, 2021
ff6667c
Merge branch 'master'
lbulej Feb 15, 2021
58881f1
Merge branch 'topic/update-scala-sbt'
lbulej Feb 15, 2021
c1e99e1
Merge branch 'topic/independent-groups'
lbulej Feb 15, 2021
0240af4
Import sanitized version of reactors.io
lbulej Mar 21, 2021
39f13dd
Update actors-reactors to Scala 2.12.13
lbulej Mar 21, 2021
1a0e78f
Update SBT to 1.4.8
lbulej Mar 21, 2021
e25cdc9
Simplify .sbt files in scala-sat
lbulej Mar 21, 2021
b99e6ad
Update some .gitignore entries to explicitly target directories
lbulej Mar 21, 2021
0068f57
Get project jars from dependencyClasspathAsJars
lbulej Mar 21, 2021
bbded87
Merge branch 'topic/separate-actors'
lbulej Mar 21, 2021
c09d877
Bump benchmarks using Scala 2.13 to Scala 2.13.5
lbulej Mar 21, 2021
923b75c
Format build.sbt in actors-reactors
lbulej Mar 21, 2021
04bd27b
Add support for scratch directories to core and harness
lbulej Apr 6, 2021
bb33da0
Refactor neo4j-analytics and move to neo4j 4.2 API
lbulej Apr 6, 2021
e222a10
Update Scala to 2.12.13 in benchmarks/neo4j
lbulej Apr 6, 2021
86d4f9f
Update JMH wrapper to implement scratchDirectory() in BenchmarkContext
lbulej Apr 6, 2021
b57868c
Update .gitignore to ignore scratch directories
lbulej Apr 6, 2021
40265f5
Bump benchmarks using Scala 2.12 to Scala 2.12.13
lbulej Mar 22, 2021
dcb2337
Remove annotation workaround for old Scala in actors-reactors
lbulej Mar 22, 2021
8a1d563
Fix SBT project name in benchmarks/rx
lbulej Apr 6, 2021
5255625
Explain the default for scratch base in harness/Config.scala
lbulej Apr 6, 2021
5feee58
Use parseInt() instead of valueOf() to parse an integer
lbulej Apr 6, 2021
ad15abc
Update launcher to support --scratch-base and --keep-scratch
lbulej Apr 6, 2021
7ecdf8f
Avoid installation-specific benchmark output in neo4j
lbulej Apr 6, 2021
be9ae44
Update CLI option descriptions and regenerate README.md
lbulej Apr 6, 2021
0d6b14f
Don't use Java 11 Path.of(), use Paths.get() instead
lbulej Apr 6, 2021
fa348f8
Restrict Java code in core and harness to version 1.8
lbulej Apr 19, 2021
8a05761
Add support for @RequiredJvm and @SupportedJvm annotations
lbulej Apr 19, 2021
afaaf2d
Limit supported JVM version for neo4j-analytics
lbulej Apr 19, 2021
feaa781
Add CLI support associated with benchmark compatibility checking
lbulej Apr 19, 2021
94f15a3
Add build support for collecting benchmark version requirements
lbulej Apr 19, 2021
a1f4a09
Add (forgotten) comparable Version class
lbulej Apr 19, 2021
b4b0db4
Add support for benchmark compatibility checking in RenaissanceSuite
lbulej Apr 19, 2021
194abc6
Make Travis run only compatible benchmarks
lbulej Apr 19, 2021
ecda8a4
Use separate ModuleLoader instances instead of static methods
lbulej Apr 19, 2021
90f3bdb
Update JMH wrapper to use ModuleLoader instance
lbulej Apr 19, 2021
ad46d31
Update README.md
lbulej Apr 19, 2021
338814b
Update JMH wrapper to survive incompatible benchmarks (if enabled)
lbulej Apr 19, 2021
0e62160
Fix ScalaDoku package specifier
lbulej Apr 21, 2021
4f66c8d
Rephrase a few comments in ScalaDoku
lbulej Apr 21, 2021
6cd8805
Add comment regarding scala3 compiler to scala-dotty build file
lbulej Apr 21, 2021
1d6b445
Use idiomatic initializers in DbShootout
lbulej Apr 21, 2021
d0eb88f
Unify exception messages in BenchmarkInfo
lbulej Apr 21, 2021
0da282e
Remove unsupported method from BenchmarkContext
lbulej Apr 21, 2021
df0b4a4
Rework access to benchmark parameters
lbulej Apr 21, 2021
f06aaf2
Update all benchmarks to use the BenchmarkParameter interface
lbulej Apr 21, 2021
40a8b7f
Make resource path explicit at declaration in Dotty
lbulej Apr 21, 2021
a999e6b
Update classpath-related comment in Dotty
lbulej Apr 21, 2021
8030d73
Update README.md generator to list JVM version requirements
lbulej Apr 21, 2021
235b425
Pick up a fix from scala-smtlib repo
lbulej Apr 21, 2021
6e1e762
Remove the --raw-list-compatible CLI option
lbulej Apr 22, 2021
a3128a3
Update Travis configuration to match the change in CLI options
lbulej Apr 23, 2021
3d17414
Use version relative to upstream master in cafesat
lbulej Apr 23, 2021
d23a38c
Update SBT to version 1.4.9
lbulej Apr 23, 2021
ddf9fcd
Update README.md
lbulej Apr 23, 2021
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
60 changes: 27 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,39 +321,33 @@ have less restrictive licenses.
Depending on your needs, you can use either of the two distributions.
The following table contains the licensing information of all the benchmarks:

| Benchmark | Licenses | Renaissance Distro |
| ------------- | ------------- |:------------------:|
| akka-uct | MIT | MIT |
| als | APACHE2 | MIT |
| chi-square | APACHE2 | MIT |
| db-shootout | APACHE2 | MIT |
| dec-tree | APACHE2 | MIT |
| dotty | BSD3 | MIT |
| dummy-empty | MIT | MIT |
| dummy-failing | MIT | MIT |
| dummy-param | MIT | MIT |
| dummy-setup-failing | MIT | MIT |
| dummy-teardown-failing | MIT | MIT |
| dummy-validation-failing | MIT | MIT |
| finagle-chirper | APACHE2 | MIT |
| finagle-http | APACHE2 | MIT |
| fj-kmeans | APACHE2 | MIT |
| future-genetic | APACHE2 | MIT |
| gauss-mix | APACHE2 | MIT |
| log-regression | APACHE2 | MIT |
| mnemonics | MIT | MIT |
| movie-lens | APACHE2 | MIT |
| naive-bayes | APACHE2 | MIT |
| neo4j-analytics | GPL3 | GPL3 |
| page-rank | APACHE2 | MIT |
| par-mnemonics | MIT | MIT |
| philosophers | BSD3 | MIT |
| reactors | MIT | MIT |
| rx-scrabble | GPL2 | GPL3 |
| scala-doku | MIT | MIT |
| scala-kmeans | MIT | MIT |
| scala-stm-bench7 | BSD3, GPL2 | GPL3 |
| scrabble | GPL2 | GPL3 |
| Benchmark | Licenses | Distro | JVM required (min) | JVM supported (max) |
| :--------------- | :--------- | :----: | :----------------: | :-----------------: |
| akka-uct | MIT | MIT | 1.8 | |
| als | APACHE2 | MIT | 1.8 | |
| chi-square | APACHE2 | MIT | 1.8 | |
| db-shootout | APACHE2 | MIT | 1.8 | |
| dec-tree | APACHE2 | MIT | 1.8 | |
| dotty | BSD3 | MIT | 1.8 | |
| finagle-chirper | APACHE2 | MIT | 1.8 | |
| finagle-http | APACHE2 | MIT | 1.8 | |
| fj-kmeans | APACHE2 | MIT | 1.8 | |
| future-genetic | APACHE2 | MIT | 1.8 | |
| gauss-mix | APACHE2 | MIT | 1.8 | |
| log-regression | APACHE2 | MIT | 1.8 | |
| mnemonics | MIT | MIT | 1.8 | |
| movie-lens | APACHE2 | MIT | 1.8 | |
| naive-bayes | APACHE2 | MIT | 1.8 | |
| neo4j-analytics | GPL3 | GPL3 | 11 | 15 |
| page-rank | APACHE2 | MIT | 1.8 | |
| par-mnemonics | MIT | MIT | 1.8 | |
| philosophers | BSD3 | MIT | 1.8 | |
| reactors | MIT | MIT | 1.8 | |
| rx-scrabble | GPL2 | GPL3 | 1.8 | |
| scala-doku | MIT | MIT | 1.8 | |
| scala-kmeans | MIT | MIT | 1.8 | |
| scala-stm-bench7 | BSD3, GPL2 | GPL3 | 1.8 | |
| scrabble | GPL2 | GPL3 | 1.8 | |


### Design overview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class AkkaUct extends Benchmark {
private var bench: UctAkkaActorBenchmark.UctAkkaActorBenchmark = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
loopCountParam = c.intParameter("loop_count")
loopCountParam = c.parameter("loop_count").toPositiveInteger

bench = new UctAkkaActorBenchmark.UctAkkaActorBenchmark
bench.initialize(new Array[String](0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class Reactors extends Benchmark {
private var expectedFibonacci: Int = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
scalingFactorParam = c.doubleParameter("scaling_factor")
scalingFactorParam = c.parameter("scaling_factor").toDouble

// Instantiate the default reactor system used throughout the benchmark.
system = ReactorSystem.default("bench-system")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ final class Als extends Benchmark with SparkUtil {
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
ratingCountParam = c.intParameter("rating_count")
ratingCountParam = c.parameter("rating_count").toPositiveInteger

tempDirPath = c.generateTempDir("als")
sc = setUpSparkContext(tempDirPath, THREAD_COUNT, "als")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ final class ChiSquare extends Benchmark with SparkUtil {
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
threadCountParam = c.intParameter("thread_count")
numberCountParam = c.intParameter("number_count")
threadCountParam = c.parameter("thread_count").toPositiveInteger
numberCountParam = c.parameter("number_count").toPositiveInteger

tempDirPath = c.generateTempDir("chi_square")
sc = setUpSparkContext(tempDirPath, threadCountParam, "chi-square")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ final class DecTree extends Benchmark with SparkUtil {
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
threadCountParam = c.intParameter("thread_count")
copyCountParam = c.intParameter("copy_count")
threadCountParam = c.parameter("thread_count").toPositiveInteger
copyCountParam = c.parameter("copy_count").toPositiveInteger

tempDirPath = c.generateTempDir("dec_tree")
sc = setUpSparkContext(tempDirPath, threadCountParam, "dec-tree")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ final class GaussMix extends Benchmark with SparkUtil {
var tempDirPath: Path = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
threadCountParam = c.intParameter("thread_count")
numberCountParam = c.intParameter("number_count")
maxIterationsParam = c.intParameter("max_iterations")
threadCountParam = c.parameter("thread_count").toPositiveInteger
numberCountParam = c.parameter("number_count").toPositiveInteger
maxIterationsParam = c.parameter("max_iterations").toPositiveInteger

tempDirPath = c.generateTempDir("gauss_mix")
sc = setUpSparkContext(tempDirPath, threadCountParam, "gauss-mix")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ final class LogRegression extends Benchmark with SparkUtil {
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
threadCountParam = c.intParameter("thread_count")
copyCountParam = c.intParameter("copy_count")
threadCountParam = c.parameter("thread_count").toPositiveInteger
copyCountParam = c.parameter("copy_count").toPositiveInteger

tempDirPath = c.generateTempDir("log_regression")
sc = setUpSparkContext(tempDirPath, threadCountParam, "log-regression")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.renaissance.BenchmarkResult.Validators
import org.renaissance.License

import scala.io.Source
import scala.jdk.CollectionConverters.collectionAsScalaIterableConverter

@Name("movie-lens")
@Group("apache-spark")
Expand Down Expand Up @@ -270,10 +271,10 @@ final class MovieLens extends Benchmark with SparkUtil {
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
inputFileParam = c.stringParameter("input_file")
alsRanksParam = c.stringParameter("als_ranks").split(",").map(_.trim.toInt).toList
alsLambdasParam = c.stringParameter("als_lambdas").split(",").map(_.trim.toDouble).toList
alsIterationsParam = c.stringParameter("als_iterations").split(",").map(_.trim.toInt).toList
inputFileParam = c.parameter("input_file").value
alsRanksParam = c.parameter("als_ranks").toList(_.toInt).asScala.toList
alsLambdasParam = c.parameter("als_lambdas").toList(_.toDouble).asScala.toList
alsIterationsParam = c.parameter("als_iterations").toList(_.toInt).asScala.toList

tempDirPath = c.generateTempDir("movie_lens")
setUpLogger()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ final class PageRank extends Benchmark with SparkUtil {
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
threadCountParam = c.intParameter("thread_count")
inputLineCountParam = c.intParameter("input_line_count")
expectedRankCountParam = c.intParameter("expected_rank_count")
expectedRankHashParam = c.stringParameter("expected_rank_hash")
threadCountParam = c.parameter("thread_count").toPositiveInteger
inputLineCountParam = c.parameter("input_line_count").toInteger
expectedRankCountParam = c.parameter("expected_rank_count").toInteger
expectedRankHashParam = c.parameter("expected_rank_hash").value

tempDirPath = c.generateTempDir("page_rank")
sc = setUpSparkContext(tempDirPath, threadCountParam, "page-rank")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,32 @@ final class DbShootout extends Benchmark {
// TODO: Consolidate benchmark parameters across the suite.
// See: https://github.com/renaissance-benchmarks/renaissance/issues/27

private var readWriteEntryCountParam: Int = _

// TODO: Unify handling of scratch directories throughout the suite.
// See: https://github.com/renaissance-benchmarks/renaissance/issues/13

var tempDirPath: Path = null
var tempDirPath: Path = _

var mapDb: MapDb = null
var mapDb: MapDb = _

var mapDbReader: MapDb.Reader = null
var mapDbReader: MapDb.Reader = _

var mapDbWriter: MapDb.Writer = null
var mapDbWriter: MapDb.Writer = _

var chronicle: Chronicle = null
var chronicle: Chronicle = _

var chronicleReader: Chronicle.Reader = null
var chronicleReader: Chronicle.Reader = _

var chronicleWriter: Chronicle.Writer = null
var chronicleWriter: Chronicle.Writer = _

var mvStore: MvStore = null
var mvStore: MvStore = _

var mvStoreReader: MvStore.Reader = null
var mvStoreReader: MvStore.Reader = _

var mvStoreWriter: MvStore.Writer = null
var mvStoreWriter: MvStore.Writer = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
tempDirPath = c.generateTempDir("db_shootout")
readWriteEntryCountParam = c.intParameter("rw_entry_count")
val readWriteEntryCountParam = c.parameter("rw_entry_count").toPositiveInteger

mapDb = new MapDb
mapDbReader = new MapDb.Reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.renaissance.BenchmarkResult;
import org.renaissance.License;

import java.util.List;

import static org.renaissance.Benchmark.*;
import static org.renaissance.BenchmarkResult.Validators.compound;
import static org.renaissance.BenchmarkResult.Validators.simple;
Expand All @@ -17,20 +19,26 @@
@Parameter(name = "meaning_of_life", defaultValue = "42")
@Parameter(name = "beyond_reason", defaultValue = "PI")
@Parameter(name = "reality_check", defaultValue = "3.1415926")
@Parameter(name = "the_sky_is_blue", defaultValue = "true")
@Parameter(name = "tough_choice", defaultValue = "to be, not to be")
@Configuration(name = "test", settings = {"beyond_reason = E", "reality_check = 2.7182818"})
@Configuration(name = "jmh")
public final class DummyParam implements Benchmark {
@Override
public BenchmarkResult run(BenchmarkContext c) {
int threadCountParam = c.intParameter("thread_count");
int meaningOfLifeParam = c.intParameter("meaning_of_life");
String beyondReasonParam = c.stringParameter("beyond_reason");
double realityCheckParam = c.doubleParameter("reality_check");
int threadCountParam = c.parameter("thread_count").toPositiveInteger();
int meaningOfLifeParam = c.parameter("meaning_of_life").toInteger();
String beyondReasonParam = c.parameter("beyond_reason").value();
double realityCheckParam = c.parameter("reality_check").toDouble();
boolean theSkyIsBlueParam = c.parameter("the_sky_is_blue").toBoolean();
List<String> toughChoice = c.parameter("tough_choice").toList();

System.out.printf("thread_count: %d\n", threadCountParam);
System.out.printf("meaning_of_life: %d\n", meaningOfLifeParam);
System.out.printf("beyond_reason: %s\n", beyondReasonParam);
System.out.printf("reality_check: %f\n", realityCheckParam);
System.out.printf("the_sky_is_blue: %b\n", theSkyIsBlueParam);
System.out.printf("tough_choice: %s\n", String.join(",", toughChoice));

try {
double beyondReasonValue = Math.class.getField(beyondReasonParam).getDouble(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ final class FjKmeans extends Benchmark {
private var data: java.util.List[Array[java.lang.Double]] = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
threadCountParam = c.intParameter("thread_count")
vectorLengthParam = c.intParameter("vector_length")
threadCountParam = c.parameter("thread_count").toInteger
vectorLengthParam = c.parameter("vector_length").toInteger

benchmark = new JavaKMeans(DIMENSION, threadCountParam)
data = JavaKMeans.generateData(vectorLengthParam, DIMENSION, CLUSTER_COUNT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ final class FutureGenetic extends Benchmark {
private var benchmark: JavaJenetics = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
chromosomeCountParam = c.intParameter("chromosome_count")
generationCountParam = c.intParameter("generation_count")
chromosomeCountParam = c.parameter("chromosome_count").toPositiveInteger
generationCountParam = c.parameter("generation_count").toPositiveInteger

benchmark = new JavaJenetics(
GENE_MIN_VALUE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ final class Mnemonics extends Benchmark {
private var coder: MnemonicsCoderWithStream = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
coderInputParam = c.stringParameter("coder_input")
expectedHashParam = c.stringParameter("expected_hash")
coderInputParam = c.parameter("coder_input").value
expectedHashParam = c.parameter("expected_hash").value

// TODO Unify Mnemonics and ParMnemonics setup
coder = new MnemonicsCoderWithStream(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ final class ParMnemonics extends Benchmark {
private var coder: MnemonicsCoderWithStream = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
coderInputParam = c.stringParameter("coder_input")
expectedHashParam = c.stringParameter("expected_hash")
coderInputParam = c.parameter("coder_input").value
expectedHashParam = c.parameter("expected_hash").value

// TODO Unify Mnemonics and ParMnemonics setup
coder = new MnemonicsCoderWithStream(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ final class Scrabble extends Benchmark {
private var scrabble: JavaScrabble = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
inputPathParam = c.stringParameter("input_path")
expectedResultParam = c.stringParameter("expected_result").split(",").map(_.trim).toSeq
inputPathParam = c.parameter("input_path").value
expectedResultParam = c.parameter("expected_result").toList().asScala.toSeq
scrabble = new JavaScrabble(inputPathParam, scrabblePath)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ final class Neo4jAnalytics extends Benchmark {
private val dbms = new AtomicReference[DatabaseManagementService]()

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
def requirePositiveCount(name: String) = {
math.max(1, c.intParameter(name))
}

def loadResource(name: String) = {
implicit val defaultCodec = Codec.UTF8
Source.createBufferedSource(getClass.getResourceAsStream(name))
Expand All @@ -53,12 +49,12 @@ final class Neo4jAnalytics extends Benchmark {

benchmark = new AnalyticsBenchmark(
graphDb,
requirePositiveCount("long_query_threads"),
requirePositiveCount("long_query_repeats"),
requirePositiveCount("short_query_threads"),
requirePositiveCount("short_query_repeats"),
requirePositiveCount("mutator_query_threads"),
requirePositiveCount("mutator_query_repeats")
c.parameter("long_query_threads").toPositiveInteger,
c.parameter("long_query_repeats").toPositiveInteger,
c.parameter("short_query_threads").toPositiveInteger,
c.parameter("short_query_repeats").toPositiveInteger,
c.parameter("mutator_query_threads").toPositiveInteger,
c.parameter("mutator_query_repeats").toPositiveInteger
)

benchmark.populateDatabase(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,15 @@ final class RxScrabble extends Benchmark {
// TODO: Consolidate benchmark parameters across the suite.
// See: https://github.com/renaissance-benchmarks/renaissance/issues/27

private var inputPathParam: String = _

private var expectedHashParam: String = _

private val scrabblePath: String = "/scrabble.txt"

private var bench: RxScrabbleImplementation = _

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
inputPathParam = c.stringParameter("input_path")
expectedHashParam = c.stringParameter("expected_hash")
val inputPathParam = c.parameter("input_path").value
expectedHashParam = c.parameter("expected_hash").value
bench = new RxScrabbleImplementation(scrabblePath, inputPathParam)
}

Expand Down
1 change: 1 addition & 0 deletions benchmarks/scala-dotty/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lazy val scalaDotty = (project in file("."))
scalacOptions += "-Ytasty-reader",
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.4.2",
// 3.0.0-RC1 is as far as we can go with Tasty reader in 2.13.5
"org.scala-lang" % "scala3-compiler_3.0.0-RC1" % "3.0.0-RC1"
lbulej marked this conversation as resolved.
Show resolved Hide resolved
)
)
Expand Down
Loading