Merge pull request #22091 from akka/wip-22085-ActorModelSpec-allocations-patriknw

reduce allocations in ActorModelSpec, #22085
This commit is contained in:
Konrad `ktoso` Malawski 2017-01-03 15:40:49 +01:00 committed by GitHub
commit bdcf703c22

View file

@ -115,11 +115,16 @@ object ActorModelSpec {
val stops = new AtomicLong(0)
def getStats(actorRef: ActorRef) = {
val is = new InterceptorStats
stats.putIfAbsent(actorRef, is) match {
case null is
case other other
stats.get(actorRef) match {
case null
val is = new InterceptorStats
stats.putIfAbsent(actorRef, is) match {
case null is
case other other
}
case existing existing
}
}
protected[akka] abstract override def suspend(actor: ActorCell) {
@ -414,7 +419,7 @@ abstract class ActorModelSpec(config: String) extends AkkaSpec(config) with Defa
}
}
for (run 1 to 3) {
flood(50000)
flood(10000)
assertDispatcher(dispatcher)(stops = run)
}
}