Fixed warnings in akka-bench-jmh-typed (#27435)
This commit is contained in:
parent
d12bc13fcb
commit
473d4f71d7
3 changed files with 8 additions and 14 deletions
|
|
@ -54,7 +54,7 @@ class TypedActorBenchmark {
|
|||
def setup(): Unit = {
|
||||
akka.actor.BenchmarkActors.requireRightNumberOfCores(threads)
|
||||
system = ActorSystem(
|
||||
TypedBenchmarkActors.echoActorsSupervisor(numMessagesPerActorPair, numActors, dispatcher, batchSize, timeout),
|
||||
TypedBenchmarkActors.echoActorsSupervisor(numMessagesPerActorPair, numActors, dispatcher, batchSize),
|
||||
"TypedActorBenchmark",
|
||||
ConfigFactory.parseString(s"""
|
||||
akka.actor {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ package akka.actor.typed
|
|||
|
||||
import java.util.concurrent.CountDownLatch
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
import akka.Done
|
||||
import akka.actor.typed.scaladsl.ActorContext
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
|
||||
import scala.concurrent.duration._
|
||||
|
||||
object TypedBenchmarkActors {
|
||||
|
||||
// to avoid benchmark to be dominated by allocations of message
|
||||
|
|
@ -65,8 +65,7 @@ object TypedBenchmarkActors {
|
|||
numMessagesPerActorPair: Int,
|
||||
numActors: Int,
|
||||
dispatcher: String,
|
||||
batchSize: Int,
|
||||
shutdownTimeout: FiniteDuration): Behavior[Start] =
|
||||
batchSize: Int): Behavior[Start] =
|
||||
Behaviors.receive { (ctx, msg) =>
|
||||
msg match {
|
||||
case Start(respondTo) =>
|
||||
|
|
@ -146,11 +145,9 @@ object TypedBenchmarkActors {
|
|||
private def initiatePingPongForPairs(refs: Vector[(ActorRef[Message], ActorRef[Message])], inFlight: Int): Unit = {
|
||||
for {
|
||||
(ping, pong) <- refs
|
||||
val message = Message(pong) // just allocate once
|
||||
message = Message(pong) // just allocate once
|
||||
_ <- 1 to inFlight
|
||||
} {
|
||||
ping ! message
|
||||
}
|
||||
} ping ! message
|
||||
}
|
||||
|
||||
private def startPingPongActorPairs(
|
||||
|
|
|
|||
|
|
@ -17,11 +17,8 @@ object AkkaDisciplinePlugin extends AutoPlugin with ScalafixSupport {
|
|||
override def requires: Plugins = JvmPlugin && ScalafixPlugin
|
||||
override lazy val projectSettings = disciplineSettings
|
||||
|
||||
val nonFatalWarningsFor = Set(
|
||||
// We allow warnings in docs to get the 'snippets' right
|
||||
"akka-docs",
|
||||
// To be reviewed
|
||||
"akka-bench-jmh-typed")
|
||||
// We allow warnings in docs to get the 'snippets' right
|
||||
val nonFatalWarningsFor = Set("akka-docs")
|
||||
|
||||
val strictProjects = Set("akka-discovery", "akka-protobuf", "akka-coordination")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue