Typed only on Scala 2.12
* Typed modules not compiled on 2.11 * Dependent modules also not on 2.11: * docs * akka-bench-jmh split into a separate one for typed Still doesn't work because something with sbt
This commit is contained in:
parent
9fc3251a03
commit
a8291f323f
7 changed files with 76 additions and 3 deletions
10
akka-bench-jmh-typed/README.md
Normal file
10
akka-bench-jmh-typed/README.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Akka Microbenchmarks
|
||||
|
||||
This subproject contains some microbenchmarks excercising key parts of Akka Typed.
|
||||
|
||||
You can run them like:
|
||||
|
||||
project akka-bench-jmh-typed
|
||||
jmh:run -i 3 -wi 3 -f 1 .*ActorCreationBenchmark
|
||||
|
||||
Use 'jmh:run -h' to get an overview of the available options.
|
||||
35
akka-bench-jmh-typed/src/main/scala/akka/BenchRunner.scala
Normal file
35
akka-bench-jmh-typed/src/main/scala/akka/BenchRunner.scala
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com>
|
||||
*/
|
||||
|
||||
package akka
|
||||
|
||||
import org.openjdk.jmh.results.RunResult
|
||||
import org.openjdk.jmh.runner.Runner
|
||||
import org.openjdk.jmh.runner.options.CommandLineOptions
|
||||
|
||||
object BenchRunner {
|
||||
def main(args: Array[String]) = {
|
||||
import scala.collection.JavaConverters._
|
||||
|
||||
val args2 = args.toList.flatMap {
|
||||
case "quick" ⇒ "-i 1 -wi 1 -f1 -t1".split(" ").toList
|
||||
case "full" ⇒ "-i 10 -wi 4 -f3 -t1".split(" ").toList
|
||||
case "jitwatch" ⇒ "-jvmArgs=-XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+LogCompilation" :: Nil
|
||||
case other ⇒ other :: Nil
|
||||
}
|
||||
|
||||
val opts = new CommandLineOptions(args2: _*)
|
||||
val results = new Runner(opts).run()
|
||||
|
||||
val report = results.asScala.map { result: RunResult ⇒
|
||||
val bench = result.getParams.getBenchmark
|
||||
val params = result.getParams.getParamsKeys.asScala.map(key ⇒ s"$key=${result.getParams.getParam(key)}").mkString("_")
|
||||
val score = result.getAggregatedResult.getPrimaryResult.getScore.round
|
||||
val unit = result.getAggregatedResult.getPrimaryResult.getScoreUnit
|
||||
s"\t${bench}_${params}\t$score\t$unit"
|
||||
}
|
||||
|
||||
report.toList.sorted.foreach(println)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
# Akka Microbenchmarks
|
||||
|
||||
This subproject contains some microbenchmarks excercising key parts of Akka.
|
||||
This subproject contains some microbenchmarks excercising key parts of Akka. (Excluding typed which has its
|
||||
own jmh module)
|
||||
|
||||
|
||||
You can run them like:
|
||||
|
||||
|
|
|
|||
25
build.sbt
25
build.sbt
|
|
@ -102,8 +102,7 @@ lazy val benchJmh = akkaModule("akka-bench-jmh")
|
|||
Seq(
|
||||
actor,
|
||||
stream, streamTests,
|
||||
persistence, persistenceTyped,
|
||||
distributedData, clusterTyped,
|
||||
persistence, distributedData,
|
||||
testkit
|
||||
).map(_ % "compile->compile;compile->test"): _*
|
||||
)
|
||||
|
|
@ -111,6 +110,20 @@ lazy val benchJmh = akkaModule("akka-bench-jmh")
|
|||
.enablePlugins(JmhPlugin, ScaladocNoVerificationOfDiagrams, NoPublish, CopyrightHeader)
|
||||
.disablePlugins(MimaPlugin, WhiteSourcePlugin, ValidatePullRequest, CopyrightHeaderInPr)
|
||||
|
||||
lazy val benchJmhTyped = akkaModule("akka-bench-jmh-typed")
|
||||
.dependsOn(
|
||||
Seq(
|
||||
persistenceTyped,
|
||||
distributedData, clusterTyped,
|
||||
testkit
|
||||
).map(_ % "compile->compile;compile->test"): _*
|
||||
)
|
||||
.settings(Dependencies.benchJmh)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.enablePlugins(JmhPlugin, ScaladocNoVerificationOfDiagrams, NoPublish, CopyrightHeader)
|
||||
.disablePlugins(MimaPlugin, WhiteSourcePlugin, ValidatePullRequest, CopyrightHeaderInPr)
|
||||
|
||||
|
||||
lazy val camel = akkaModule("akka-camel")
|
||||
.dependsOn(actor, slf4j, testkit % "test->test")
|
||||
.settings(Dependencies.camel)
|
||||
|
|
@ -247,6 +260,7 @@ lazy val docs = akkaModule("akka-docs")
|
|||
resolvers += Resolver.jcenterRepo,
|
||||
deployRsyncArtifact := List((paradox in Compile).value -> s"www/docs/akka/${version.value}")
|
||||
)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.enablePlugins(
|
||||
AkkaParadoxPlugin, DeployRsync, NoPublish, ParadoxBrowse,
|
||||
ScaladocNoVerificationOfDiagrams,
|
||||
|
|
@ -395,6 +409,7 @@ lazy val actorTyped = akkaModule("akka-actor-typed")
|
|||
.settings(AkkaBuild.mayChangeSettings)
|
||||
.settings(AutomaticModuleName.settings("akka.actor.typed")) // fine for now, eventually new module name to become typed.actor
|
||||
.settings(OSGi.actorTyped)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.settings(
|
||||
initialCommands := """
|
||||
import akka.actor.typed._
|
||||
|
|
@ -417,6 +432,7 @@ lazy val persistenceTyped = akkaModule("akka-persistence-typed")
|
|||
)
|
||||
.settings(Dependencies.persistenceShared)
|
||||
.settings(AkkaBuild.mayChangeSettings)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.settings(AutomaticModuleName.settings("akka.persistence.typed"))
|
||||
.settings(OSGi.persistenceTyped)
|
||||
.disablePlugins(MimaPlugin)
|
||||
|
|
@ -435,6 +451,7 @@ lazy val clusterTyped = akkaModule("akka-cluster-typed")
|
|||
remoteTests % "test->test"
|
||||
)
|
||||
.settings(AkkaBuild.mayChangeSettings)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.settings(AutomaticModuleName.settings("akka.cluster.typed"))
|
||||
.disablePlugins(MimaPlugin)
|
||||
.configs(MultiJvm)
|
||||
|
|
@ -451,6 +468,7 @@ lazy val clusterShardingTyped = akkaModule("akka-cluster-sharding-typed")
|
|||
remoteTests % "test->test"
|
||||
)
|
||||
.settings(AkkaBuild.mayChangeSettings)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.settings(AutomaticModuleName.settings("akka.cluster.sharding.typed"))
|
||||
// To be able to import ContainerFormats.proto
|
||||
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "akka-remote" / "src" / "main" / "protobuf" ))
|
||||
|
|
@ -467,6 +485,7 @@ lazy val streamTyped = akkaModule("akka-stream-typed")
|
|||
actorTypedTests % "test->test"
|
||||
)
|
||||
.settings(AkkaBuild.mayChangeSettings)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.settings(AutomaticModuleName.settings("akka.stream.typed"))
|
||||
.disablePlugins(MimaPlugin)
|
||||
.enablePlugins(ScaladocNoVerificationOfDiagrams)
|
||||
|
|
@ -475,6 +494,7 @@ lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
|
|||
.dependsOn(actorTyped, testkit % "compile->compile;test->test")
|
||||
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
|
||||
.settings(Dependencies.actorTestkitTyped)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.disablePlugins(MimaPlugin)
|
||||
|
||||
lazy val actorTypedTests = akkaModule("akka-actor-typed-tests")
|
||||
|
|
@ -483,6 +503,7 @@ lazy val actorTypedTests = akkaModule("akka-actor-typed-tests")
|
|||
actorTestkitTyped % "compile->compile;test->test"
|
||||
)
|
||||
.settings(AkkaBuild.mayChangeSettings)
|
||||
.settings(AkkaBuild.noScala211)
|
||||
.disablePlugins(MimaPlugin)
|
||||
.enablePlugins(NoPublish)
|
||||
|
||||
|
|
|
|||
|
|
@ -240,6 +240,11 @@ object AkkaBuild {
|
|||
javacOptions in test ++= Seq("-Xdoclint:none"),
|
||||
javacOptions in doc ++= Seq("-Xdoclint:none", "--ignore-source-errors"))
|
||||
|
||||
|
||||
lazy val noScala211 = Seq(
|
||||
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.11"))
|
||||
)
|
||||
|
||||
def loadSystemProperties(fileName: String): Unit = {
|
||||
import scala.collection.JavaConverters._
|
||||
val file = new File(fileName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue