Merge pull request #22091 from akka/wip-22085-ActorModelSpec-allocations-patriknw
reduce allocations in ActorModelSpec, #22085
This commit is contained in:
commit
bdcf703c22
1 changed files with 10 additions and 5 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue