├── project ├── build.properties └── plugins.sbt ├── src └── test │ └── scala │ ├── com │ └── github │ │ ├── plokhotnyuk │ │ └── actors │ │ │ ├── Message.scala │ │ │ ├── AkkaMCUnboundedActorSpec.scala │ │ │ ├── AkkaSCOUnboundedActorSpec.scala │ │ │ ├── ConcurrencyUtils.scala │ │ │ ├── AkkaSCONonBlockingBoundedActorSpec.scala │ │ │ ├── AkkaMCNonBlockingBoundedActorSpec.scala │ │ │ ├── AkkaBoundedActorSpec.scala │ │ │ ├── MinimalistActorSpec.scala │ │ │ ├── ScalazActorSpec.scala │ │ │ ├── BenchmarkSpec.scala │ │ │ ├── LiftActorSpec.scala │ │ │ └── AkkaUnboundedActorSpec.scala │ │ └── gist │ │ └── viktorklang │ │ ├── Actor.scala │ │ └── ActorSpec.scala │ └── akka │ └── dispatch │ └── Mailboxes.scala ├── .gitignore ├── sbtAll.sh ├── sbtAll.bat ├── sbtAll_poolSize1.sh ├── .travis.yml ├── sbtAll_poolSize100.sh ├── LICENSE ├── README.md └── out0_poolSize100.txt /project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/Message.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | case class Message() -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.typesafe.sbt" % "sbt-license-report" % "1.2.0") 2 | 3 | addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.10") 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven or sbt 2 | target/ 3 | 4 | # Idea 5 | .idea/ 6 | *.iml 7 | *.ipr 8 | *.iws 9 | .buildpath 10 | 11 | # Eclipse 12 | .project 13 | .classpath 14 | .settings 15 | .scala_dependencies 16 | 17 | # Emacs 18 | *~ 19 | *# 20 | .#* 21 | .ensime 22 | TAGS 23 | -------------------------------------------------------------------------------- /sbtAll.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sbt -no-colors clean test:compile &>outX.txt 3 | sbt -no-colors -Dbenchmark.executorServiceType=akka-forkjoin-pool test &>>outX.txt 4 | sbt -no-colors -Dbenchmark.executorServiceType=java-forkjoin-pool test &>>outX.txt 5 | sbt -no-colors -Dbenchmark.executorServiceType=abq-thread-pool test &>>outX.txt 6 | sbt -no-colors -Dbenchmark.executorServiceType=lbq-thread-pool test &>>outX.txt 7 | -------------------------------------------------------------------------------- /sbtAll.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | call sbt -no-colors clean test:compile exit >outX.txt 3 | call sbt -no-colors -Dbenchmark.executorServiceType=akka-forkjoin-pool test >>outX.txt 4 | call sbt -no-colors -Dbenchmark.executorServiceType=java-forkjoin-pool test >>outX.txt 5 | call sbt -no-colors -Dbenchmark.executorServiceType=abq-thread-pool test >>outX.txt 6 | call sbt -no-colors -Dbenchmark.executorServiceType=lbq-thread-pool test >>outX.txt 7 | -------------------------------------------------------------------------------- /sbtAll_poolSize1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sbt -no-colors clean test:compile &>outX_poolSize1.txt 3 | sbt -no-colors -Dbenchmark.poolSize=1 -Dbenchmark.executorServiceType=akka-forkjoin-pool test &>>outX_poolSize1.txt 4 | sbt -no-colors -Dbenchmark.poolSize=1 -Dbenchmark.executorServiceType=java-forkjoin-pool test &>>outX_poolSize1.txt 5 | sbt -no-colors -Dbenchmark.poolSize=1 -Dbenchmark.executorServiceType=abq-thread-pool test &>>outX_poolSize1.txt 6 | sbt -no-colors -Dbenchmark.poolSize=1 -Dbenchmark.executorServiceType=lbq-thread-pool test &>>outX_poolSize1.txt 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: scala 2 | scala: 3 | - 2.11.11 4 | jdk: 5 | - oraclejdk8 6 | script: 7 | - cat /sys/devices/system/clocksource/clocksource0/current_clocksource 8 | - cat /proc/cpuinfo 9 | - cat /proc/meminfo 10 | - sbt -no-colors clean test:compile 11 | - sbt -no-colors -Dbenchmark.executorServiceType=akka-forkjoin-pool test 12 | - sbt -no-colors -Dbenchmark.executorServiceType=java-forkjoin-pool test 13 | - sbt -no-colors -Dbenchmark.executorServiceType=abq-thread-pool test 14 | - sbt -no-colors -Dbenchmark.executorServiceType=lbq-thread-pool test -------------------------------------------------------------------------------- /sbtAll_poolSize100.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sbt -no-colors clean test:compile &>outX_poolSize100.txt 3 | sbt -no-colors -Dbenchmark.poolSize=100 -Dbenchmark.executorServiceType=akka-forkjoin-pool test &>>outX_poolSize100.txt 4 | sbt -no-colors -Dbenchmark.poolSize=100 -Dbenchmark.executorServiceType=java-forkjoin-pool test &>>outX_poolSize100.txt 5 | sbt -no-colors -Dbenchmark.poolSize=100 -Dbenchmark.executorServiceType=abq-thread-pool test &>>outX_poolSize100.txt 6 | sbt -no-colors -Dbenchmark.poolSize=100 -Dbenchmark.executorServiceType=lbq-thread-pool test &>>outX_poolSize100.txt 7 | -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/AkkaMCUnboundedActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.typesafe.config.Config 4 | import com.typesafe.config.ConfigFactory._ 5 | 6 | class AkkaMCUnboundedActorSpec extends AkkaUnboundedActorSpec { 7 | override def config: Config = load(parseString( 8 | """ 9 | akka { 10 | log-dead-letters = 0 11 | log-dead-letters-during-shutdown = off 12 | actor { 13 | unstarted-push-timeout = 100s 14 | benchmark-dispatcher { 15 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 16 | throughput = 1024 17 | mailbox-type = "akka.dispatch.MultiConsumerUnboundedMailbox" 18 | } 19 | } 20 | } 21 | """)) 22 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/AkkaSCOUnboundedActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.typesafe.config.Config 4 | import com.typesafe.config.ConfigFactory._ 5 | 6 | class AkkaSCOUnboundedActorSpec extends AkkaUnboundedActorSpec { 7 | override def config: Config = load(parseString( 8 | """ 9 | akka { 10 | log-dead-letters = 0 11 | log-dead-letters-during-shutdown = off 12 | actor { 13 | unstarted-push-timeout = 100s 14 | benchmark-dispatcher { 15 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 16 | throughput = 1024 17 | mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" 18 | } 19 | } 20 | } 21 | """)) 22 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This software is licensed under the Apache 2 license, quoted below. 2 | 3 | Copyright (c) 2014 Andriy Plokhotnyuk, and respective contributors 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 | use this file except in compliance with the License. You may obtain a copy of 7 | the License at 8 | 9 | [http://www.apache.org/licenses/LICENSE-2.0] 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | License for the specific language governing permissions and limitations under 15 | the License. 16 | 17 | --------------- 18 | 19 | Licenses for dependency projects can be found by license reporting plugins. 20 | To build these reports use following commands for Maven or Sbt accordingly: 21 | mvn license:aggregate-add-third-party 22 | sbt dumpLicenseReport -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/ConcurrencyUtils.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import java.util.concurrent._ 4 | import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool 5 | 6 | class ParRunner(fs: Seq[() => Unit]) { 7 | val barrier = new CyclicBarrier(fs.size + 1) 8 | fs.map(f => new Thread { 9 | setDaemon(true) 10 | 11 | override def run(): Unit = { 12 | barrier.await() 13 | f() 14 | } 15 | }).foreach(_.start()) 16 | 17 | def start(): Unit = barrier.await() 18 | } 19 | 20 | abstract class JavaForkJoinTask(p: ForkJoinPool) extends ForkJoinTask[Unit] { 21 | p.execute(this) 22 | 23 | def getRawResult: Unit = () 24 | 25 | def setRawResult(unit: Unit): Unit = () 26 | } 27 | 28 | abstract class AkkaForkJoinTask(p: AkkaForkJoinPool) extends akka.dispatch.forkjoin.ForkJoinTask[Unit] { 29 | p.execute(this) 30 | 31 | def getRawResult: Unit = () 32 | 33 | def setRawResult(unit: Unit): Unit = () 34 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/AkkaSCONonBlockingBoundedActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.typesafe.config.Config 4 | import com.typesafe.config.ConfigFactory._ 5 | 6 | class AkkaSCONonBlockingBoundedActorSpec extends AkkaBoundedActorSpec { 7 | override def config: Config = load(parseString( 8 | """ 9 | akka { 10 | log-dead-letters = 0 11 | log-dead-letters-during-shutdown = off 12 | actor { 13 | unstarted-push-timeout = 100s 14 | benchmark-dispatcher { 15 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 16 | throughput = 1024 17 | mailbox-type = "akka.dispatch.NonBlockingBoundedMailbox" 18 | mailbox-capacity = 10000000 19 | } 20 | benchmark-dispatcher-2 { 21 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 22 | throughput = 1024 23 | mailbox-type = "akka.dispatch.NonBlockingBoundedMailbox" 24 | mailbox-capacity = 1 25 | } 26 | } 27 | } 28 | """)) 29 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/AkkaMCNonBlockingBoundedActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.typesafe.config.Config 4 | import com.typesafe.config.ConfigFactory._ 5 | 6 | class AkkaMCNonBlockingBoundedActorSpec extends AkkaBoundedActorSpec { 7 | override def config: Config = load(parseString( 8 | """ 9 | akka { 10 | log-dead-letters = 0 11 | log-dead-letters-during-shutdown = off 12 | actor { 13 | unstarted-push-timeout = 100s 14 | benchmark-dispatcher { 15 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 16 | throughput = 1024 17 | mailbox-type = "akka.dispatch.MultiConsumerNonBlockingBoundedMailbox" 18 | mailbox-capacity = 10000000 19 | } 20 | benchmark-dispatcher-2 { 21 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 22 | throughput = 1024 23 | mailbox-type = "akka.dispatch.MultiConsumerNonBlockingBoundedMailbox" 24 | mailbox-capacity = 1 25 | } 26 | } 27 | } 28 | """)) 29 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/AkkaBoundedActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.typesafe.config.ConfigFactory._ 4 | import com.typesafe.config.Config 5 | import akka.actor.{Actor, ActorRef, Props} 6 | import java.util.concurrent.CountDownLatch 7 | 8 | class AkkaBoundedActorSpec extends AkkaUnboundedActorSpec { 9 | override def config: Config = load(parseString( 10 | """ 11 | akka { 12 | log-dead-letters = 0 13 | log-dead-letters-during-shutdown = off 14 | actor { 15 | unstarted-push-timeout = 100s 16 | benchmark-dispatcher { 17 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 18 | throughput = 1024 19 | mailbox-type = "akka.dispatch.BoundedMailbox" 20 | mailbox-capacity = 10000000 21 | mailbox-push-timeout-time = 0 22 | } 23 | benchmark-dispatcher-2 { 24 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 25 | throughput = 1024 26 | mailbox-type = "akka.dispatch.BoundedMailbox" 27 | mailbox-capacity = 1 28 | mailbox-push-timeout-time = 0 29 | } 30 | } 31 | } 32 | """)) 33 | 34 | "Overflow throughput" in { 35 | val n = 5000000 36 | val l = new CountDownLatch(1) 37 | val a = blockableCountActor2(l) 38 | timed(n) { 39 | sendMessages(a, n) 40 | } 41 | l.countDown() 42 | } 43 | 44 | private def blockableCountActor2(l: CountDownLatch): ActorRef = 45 | actorOf(Props(classOf[BlockableCountAkkaActor2], l).withDispatcher("akka.actor.benchmark-dispatcher-2")) 46 | } 47 | 48 | private class BlockableCountAkkaActor2(l: CountDownLatch) extends Actor { 49 | def receive: Actor.Receive = { 50 | case _ => 51 | l.await() 52 | context.stop(self) 53 | } 54 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ```sh 2 | ☆ノノハ 3 | 从*’w’) 4 | (つactorsと) 5 | ``` 6 | 7 | Evaluation of API and performance of in-memory messaging for different actor implementations written on Scala: 8 | [Akka](https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Actor.scala) vs. 9 | [Lift](https://github.com/lift/framework/blob/master/core/actor/src/main/scala/net/liftweb/actor/LiftActor.scala) vs. 10 | [Scala](https://github.com/scala/scala/blob/master/src/actors/scala/actors/Actor.scala) vs. 11 | [Scalaz](https://github.com/scalaz/scalaz/blob/master/core/src/main/scala/scalaz/concurrent/Actor.scala) 12 | 13 | This project provides and tests alternative implementations of Minimalist actor and bounded/unbounded mailboxes for Akka: 14 | [Akka](https://github.com/plokhotnyuk/actors/blob/master/src/test/scala/akka/dispatch/Mailboxes.scala) vs. 15 | [Minimalist Scala Actor](https://github.com/plokhotnyuk/actors/blob/master/src/test/scala/com/github/gist/viktorklang/Actor.scala) 16 | also it provides alternative fork-join tasks which increase efficiency of actors and examples of their usage 17 | with Lift, Scala & Scalaz actors. 18 | 19 | [![Travis CI Build Status](https://secure.travis-ci.org/plokhotnyuk/actors.png)](http://travis-ci.org/plokhotnyuk/actors) 20 | 21 | [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/plokhotnyuk/actors?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 22 | 23 | ## Benchmarks and their goals 24 | 25 | * `Enqueueing` - memory footprint of internal actor queue per submitted message and submition throughput in a single thread 26 | * `Dequeueing` - message handling throughput in a single thread 27 | * `Initiation` - memory footprint of minimal actors and initiation time in a single thread 28 | * `Single-producer sending` - throughput of message sending from external thread to an actor 29 | * `Multi-producer sending` - throughput of message sending from several external threads to an actor 30 | * `Max throughput` - throughput of message sending from several external threads to several actors 31 | * `Ping latency` - average latency of sending of a ping message between two actors 32 | * `Ping throughput 10K` - throughput of executor service by sending of a ping message between 10K pairs of actors 33 | * `Overflow throughput` - throughput of overflow handing for bounded version of actors 34 | 35 | ## Hardware required 36 | - CPU: 2 cores or more 37 | - RAM: 6Gb or greater 38 | 39 | ## Software installed required 40 | - JDK: 1.8.0_x 41 | - sbt: 0.13.x 42 | 43 | ## Building & running benchmarks 44 | Before benchmark running check if your CPU works in most performant mode (not a powersave one). Check it on Linux by following command: 45 | `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` 46 | 47 | Use following command-line instructions to build from sources and run benchmarks with Java's ForkJoinPool in FIFO mode: 48 | ```sh 49 | sbt clean test &>outX.txt 50 | ``` 51 | 52 | Use `sbtAll.sh` scripts (for Windows: `sbtAll.bat`) to run benchmarks for the following types of executor services: 53 | - `akka-forkjoin-pool` for `akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool` 54 | - `java-forkjoin-pool` for `java.util.concurrent.ForkJoinPool` 55 | - `abq-thread-pool` for `java.util.concurrent.ThreadPoolExecutor` with `java.util.concurrent.ArrayBlockingQueue` 56 | - `lbq-thread-pool` for `java.util.concurrent.ThreadPoolExecutor` with `java.util.concurrent.LinkedBlockingQueue` 57 | 58 | Recommended values of JVM options which can be set for SBT_OPTS system variables: 59 | 60 | ```sh 61 | -server -Xms1g -Xmx1g -Xss1m -XX:NewSize=512m -XX:+TieredCompilation -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:-UseBiasedLocking -XX:+AlwaysPreTouch 62 | ``` 63 | 64 | ## Known issues 65 | 1. Benchmark freeze with Java ForkJoinPool baked by 1 thread on 8u40, 8u45, 8u51 and some early 8u60 ea builds, please see details here: 66 | https://bugs.openjdk.java.net/browse/JDK-8078490 67 | 68 | W/A is to upgrade to latest Java 8 build (8u60-b27 or above) or to use latest jsr166.jar (link to download http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166.jar) 69 | in working directory with following JVM option to pick it up: `-Xbootclasspath/p:jsr166.jar` 70 | 71 | ## Test result descriptions 72 | Results of running sbtAll.sh scripts on different environments with pool size (or number of worker threads) 73 | set to number of available processors, 1 or 100 values accordingly: 74 | 75 | #### out0.txt 76 | Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz (max 3.50GHz), RAM 16Gb DDR3-1600, Ubuntu 15.04, Linux 4.4.0-38-generic, Oracle JDK build 1.8.0_112-b15 64-bit 77 | -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/MinimalistActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import java.util.concurrent.CountDownLatch 4 | import com.github.gist.viktorklang.Actor 5 | import com.github.gist.viktorklang.Actor._ 6 | import com.github.plokhotnyuk.actors.BenchmarkSpec._ 7 | 8 | class MinimalistActorSpec extends BenchmarkSpec { 9 | private implicit val executorService = createExecutorService() 10 | 11 | "Enqueueing" in { 12 | val n = 40000000 13 | val l1 = new CountDownLatch(1) 14 | val l2 = new CountDownLatch(1) 15 | val a = blockableCountActor(l1, l2, n) 16 | footprintedAndTimed(n) { 17 | sendMessages(a, n) 18 | } 19 | l1.countDown() 20 | l2.await() 21 | } 22 | 23 | "Dequeueing" in { 24 | val n = 40000000 25 | val l1 = new CountDownLatch(1) 26 | val l2 = new CountDownLatch(1) 27 | val a = blockableCountActor(l1, l2, n) 28 | sendMessages(a, n) 29 | timed(n) { 30 | l1.countDown() 31 | l2.await() 32 | } 33 | } 34 | 35 | "Initiation" in { 36 | val es = createExecutorService() 37 | footprintedAndTimedCollect(2000000)({ 38 | val f = (_: Address) => (_: Any) => Stay 39 | () => Actor(f)(es) 40 | }, fullShutdown(es)) 41 | } 42 | 43 | "Single-producer sending" in { 44 | val n = 15000000 45 | val l = new CountDownLatch(1) 46 | val a = countActor(l, n) 47 | timed(n) { 48 | sendMessages(a, n) 49 | l.await() 50 | } 51 | } 52 | 53 | "Multi-producer sending" in { 54 | val n = roundToParallelism(15000000) 55 | val l = new CountDownLatch(1) 56 | val a = countActor(l, n) 57 | val r = new ParRunner((1 to parallelism).map(_ => () => sendMessages(a, n / parallelism))) 58 | timed(n) { 59 | r.start() 60 | l.await() 61 | } 62 | } 63 | 64 | "Max throughput" in { 65 | val n = roundToParallelism(30000000) 66 | val l = new CountDownLatch(parallelism) 67 | val r = new ParRunner((1 to parallelism).map { 68 | _ => 69 | val a = countActor(l, n / parallelism) 70 | () => sendMessages(a, n / parallelism) 71 | }) 72 | timed(n) { 73 | r.start() 74 | l.await() 75 | } 76 | } 77 | 78 | "Ping latency" in { 79 | pingLatency(3000000) 80 | } 81 | 82 | "Ping throughput 10K" in { 83 | pingThroughput(6000000, 10000) 84 | } 85 | 86 | def shutdown(): Unit = fullShutdown(executorService) 87 | 88 | private def pingLatency(n: Int): Unit = 89 | latencyTimed(n) { 90 | h => 91 | val l = new CountDownLatch(2) 92 | var a1: Address = null 93 | val a2 = Actor(_ => { 94 | var i = n / 2 95 | (m: Any) => 96 | h.record() 97 | if (i > 0) a1 ! m 98 | i -= 1 99 | if (i == 0) l.countDown() 100 | Stay 101 | }, batch = 1024) 102 | a1 = Actor(_ => { 103 | var i = n / 2 104 | (m: Any) => 105 | h.record() 106 | if (i > 0) a2 ! m 107 | i -= 1 108 | if (i == 0) l.countDown() 109 | Stay 110 | }, batch = 1024) 111 | a2 ! Message() 112 | l.await() 113 | } 114 | 115 | private def pingThroughput(n: Int, p: Int): Unit = { 116 | val l = new CountDownLatch(p * 2) 117 | val as = (1 to p).map { 118 | _ => 119 | var a1: Address = null 120 | val a2 = Actor(_ => { 121 | var i = n / p / 2 122 | (m: Any) => 123 | if (i > 0) a1 ! m 124 | i -= 1 125 | if (i == 0) l.countDown() 126 | Stay 127 | }, batch = 1024) 128 | a1 = Actor(_ => { 129 | var i = n / p / 2 130 | (m: Any) => 131 | if (i > 0) a2 ! m 132 | i -= 1 133 | if (i == 0) l.countDown() 134 | Stay 135 | }, batch = 1024) 136 | a2 137 | } 138 | timed(n) { 139 | as.foreach(_ ! Message()) 140 | l.await() 141 | } 142 | } 143 | 144 | private def blockableCountActor(l1: CountDownLatch, l2: CountDownLatch, n: Int): Address = 145 | Actor(_ => { 146 | var blocked = true 147 | var i = n - 1 148 | (_: Any) => 149 | if (blocked) { 150 | l1.await() 151 | blocked = false 152 | } else { 153 | i -= 1 154 | if (i == 0) l2.countDown() 155 | } 156 | Stay 157 | }, batch = 1024) 158 | 159 | private def countActor(l: CountDownLatch, n: Int): Address = 160 | Actor(_ => { 161 | var i = n 162 | (_: Any) => 163 | i -= 1 164 | if (i == 0) l.countDown() 165 | Stay 166 | }, batch = 1024) 167 | 168 | protected def sendMessages(a: Address, n: Int): Unit = { 169 | val m = Message() 170 | var i = n 171 | while (i > 0) { 172 | a ! m 173 | i -= 1 174 | } 175 | } 176 | } -------------------------------------------------------------------------------- /src/test/scala/akka/dispatch/Mailboxes.scala: -------------------------------------------------------------------------------- 1 | package akka.dispatch 2 | 3 | import akka.actor.{InternalActorRef, ActorRef, ActorSystem, DeadLetter} 4 | import akka.util.Unsafe.{instance => u} 5 | import com.typesafe.config.Config 6 | import java.util.concurrent.atomic.AtomicReference 7 | 8 | class MultiConsumerNonBlockingBoundedMailbox(capacity: Int = Int.MaxValue) extends MailboxType with ProducesMessageQueue[MessageQueue] { 9 | require(capacity > 0, "Mailbox capacity should be greater than 0") 10 | 11 | def this(settings: ActorSystem.Settings, config: Config) = this(config.getInt("mailbox-capacity")) 12 | 13 | override def create(owner: Option[ActorRef], system: Option[ActorSystem]): MessageQueue = new NBBQ(capacity) 14 | } 15 | 16 | final private class NBBQ(capacity: Int) extends AtomicReference(new NodeWithCount) with MessageQueue with MultipleConsumerSemantics { 17 | @volatile private var tail: NodeWithCount = get 18 | 19 | override def enqueue(receiver: ActorRef, handle: Envelope): Unit = 20 | if (offer(new NodeWithCount(handle))) onOverflow(receiver, handle) 21 | 22 | override def dequeue(): Envelope = poll(0) 23 | 24 | override def numberOfMessages: Int = Math.min(capacity, Math.max(0, get.count - tail.count)) 25 | 26 | override def hasMessages: Boolean = get ne tail 27 | 28 | override def cleanUp(owner: ActorRef, deadLetters: MessageQueue): Unit = drain(owner, deadLetters) 29 | 30 | @annotation.tailrec 31 | private def offer(n: NodeWithCount): Boolean = { 32 | val tc = tail.count 33 | val h = get 34 | val hc = h.count 35 | if (hc - tc < capacity) { 36 | n.count = hc + 1 37 | if (compareAndSet(h, n)) { 38 | h.lazySet(n) 39 | false 40 | } else offer(n) 41 | } else true 42 | } 43 | 44 | @annotation.tailrec 45 | private def poll(i: Int): Envelope = { 46 | val o = NBBQ.tailOffset 47 | val tn = tail 48 | val n = tn.get 49 | if ((n ne null) && u.compareAndSwapObject(this, o, tn, n)) { 50 | tn.lazySet(null) // prevent nepotism with generational GCs 51 | val e = n.e 52 | n.e = null // avoid possible memory leak when queue is empty 53 | e 54 | } else if (get ne tn) { 55 | if (i > 9999) Thread.`yield`() // Thread.spinYieldHint() should be here 56 | poll(i + 1) 57 | } else null 58 | } 59 | 60 | private def onOverflow(a: ActorRef, e: Envelope): Unit = 61 | a.asInstanceOf[InternalActorRef].provider.deadLetters.tell(DeadLetter(e.message, e.sender, a), e.sender) 62 | 63 | @annotation.tailrec 64 | private def drain(owner: ActorRef, deadLetters: MessageQueue): Unit = { 65 | val e = dequeue() 66 | if (e ne null) { 67 | deadLetters.enqueue(owner, e) 68 | drain(owner, deadLetters) 69 | } 70 | } 71 | } 72 | 73 | private object NBBQ { 74 | private val tailOffset = u.objectFieldOffset(classOf[NBBQ].getDeclaredField("tail")) 75 | } 76 | 77 | private class NodeWithCount(var e: Envelope = null) extends AtomicReference[NodeWithCount] { 78 | var count: Int = _ 79 | } 80 | 81 | class MultiConsumerUnboundedMailbox extends MailboxType with ProducesMessageQueue[MessageQueue] { 82 | def this(settings: ActorSystem.Settings, config: Config) = this() 83 | 84 | override def create(owner: Option[ActorRef], system: Option[ActorSystem]): MessageQueue = new UQ 85 | } 86 | 87 | final private class UQ extends AtomicReference(new Node) with MessageQueue with MultipleConsumerSemantics { 88 | @volatile private var tail: Node = get 89 | 90 | override def enqueue(receiver: ActorRef, handle: Envelope): Unit = { 91 | val n = new Node(handle) 92 | getAndSet(n).lazySet(n) 93 | } 94 | 95 | override def dequeue(): Envelope = poll(0) 96 | 97 | override def numberOfMessages: Int = count(tail, 0, Int.MaxValue) 98 | 99 | override def hasMessages: Boolean = get ne tail 100 | 101 | override def cleanUp(owner: ActorRef, deadLetters: MessageQueue): Unit = drain(owner, deadLetters) 102 | 103 | @annotation.tailrec 104 | private def poll(i: Int): Envelope = { 105 | val o = UQ.tailOffset 106 | val tn = tail 107 | val n = tn.get 108 | if ((n ne null) && u.compareAndSwapObject(this, o, tn, n)) { 109 | tn.lazySet(null) // prevent nepotism with generational GCs 110 | val e = n.e 111 | n.e = null // avoid possible memory leak when queue is empty 112 | e 113 | } else if (get ne tn) { 114 | if (i > 9999) Thread.`yield`() // Thread.spinYieldHint() should be here 115 | poll(i + 1) 116 | } else null 117 | } 118 | 119 | @annotation.tailrec 120 | private def count(tn: Node, i: Int, l: Int): Int = { 121 | val n = tn.get 122 | if (i == l) i 123 | else if (n ne null) count(n, i + 1, l) 124 | else if (tn ne get) count(tn, i, l) 125 | else i 126 | } 127 | 128 | @annotation.tailrec 129 | private def drain(owner: ActorRef, deadLetters: MessageQueue): Unit = { 130 | val e = dequeue() 131 | if (e ne null) { 132 | deadLetters.enqueue(owner, e) 133 | drain(owner, deadLetters) 134 | } 135 | } 136 | } 137 | 138 | private object UQ { 139 | private val tailOffset = u.objectFieldOffset(classOf[UQ].getDeclaredField("tail")) 140 | } 141 | 142 | private class Node(var e: Envelope = null) extends AtomicReference[Node] -------------------------------------------------------------------------------- /src/test/scala/com/github/gist/viktorklang/Actor.scala: -------------------------------------------------------------------------------- 1 | package com.github.gist.viktorklang 2 | 3 | /* 4 | Copyright 2012 Viktor Klang 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | */ 18 | 19 | // Initial version from Viktor Klang: https://gist.github.com/viktorklang/2362563 20 | import java.util.concurrent.atomic.AtomicReference 21 | import java.util.concurrent._ 22 | import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool 23 | import scala.annotation.tailrec 24 | 25 | object Actor { 26 | type Behavior = Any => Effect 27 | 28 | sealed trait Effect extends (Behavior => Behavior) 29 | 30 | case object Stay extends Effect { 31 | def apply(old: Behavior): Behavior = old 32 | } 33 | 34 | case class Become(like: Behavior) extends Effect { 35 | def apply(old: Behavior): Behavior = like 36 | } 37 | 38 | case object Die extends Effect { 39 | def apply(old: Behavior): Behavior = msg => sys.error("Dropping of message due to severe case of death: " + msg) 40 | } 41 | 42 | // The notion of an Address to where you can post messages to 43 | trait Address { 44 | def !(a: Any): Unit 45 | } 46 | 47 | // Seeded by the self-reference that yields the initial behavior 48 | // Reduces messages asynchronously by executor to behaviour in batch loop with configurable number of iterations 49 | // Memory visibility of behavior is guarded by volatile piggybacking or provided by executor 50 | def apply(initial: Address => Behavior, batch: Int = 5)(implicit e: Executor): Address = 51 | new AtomicReference[AnyRef]((self: Address) => Become(initial(self))) with Address { 52 | // Make the actor self aware by seeding its address to the initial behavior 53 | this ! this 54 | 55 | // Enqueue the message onto the mailbox and schedule for execution if the actor was suspended 56 | def !(a: Any): Unit = { 57 | val n = new Node(a) 58 | getAndSet(n) match { 59 | case h: Node => h.lazySet(n) 60 | case b => asyncAct(b.asInstanceOf[Behavior], n) 61 | } 62 | } 63 | 64 | private def asyncAct(b: Behavior, n: Node): Unit = e match { 65 | case p: AkkaForkJoinPool => p.execute(new akka.dispatch.forkjoin.ForkJoinTask[Unit] { 66 | def exec(): Boolean = { 67 | act(b, n, batch) 68 | false 69 | } 70 | 71 | def getRawResult: Unit = () 72 | 73 | def setRawResult(unit: Unit): Unit = () 74 | }) 75 | case p: ForkJoinPool => p.execute(new ForkJoinTask[Unit] { 76 | def exec(): Boolean = { 77 | act(b, n, batch) 78 | false 79 | } 80 | 81 | def getRawResult: Unit = () 82 | 83 | def setRawResult(unit: Unit): Unit = () 84 | }) 85 | case p => p.execute(new Runnable { 86 | def run(): Unit = act(b, n, batch) 87 | }) 88 | } 89 | 90 | private def asyncTrySuspend(b: Behavior, n: Node): Unit = e match { 91 | case p: ForkJoinPool => p.execute(new ForkJoinTask[Unit] { 92 | def exec(): Boolean = { 93 | trySuspend(b, n) 94 | false 95 | } 96 | 97 | def getRawResult: Unit = () 98 | 99 | def setRawResult(unit: Unit): Unit = () 100 | }) 101 | case p => p.execute(new Runnable { 102 | def run(): Unit = trySuspend(b, n) 103 | }) 104 | } 105 | 106 | private def trySuspend(b: Behavior, n: Node): Unit = 107 | if (!compareAndSet(n, b)) { 108 | val n1 = n.get 109 | if (n1 eq null) asyncTrySuspend(b, n) 110 | else act(b, n1, batch) 111 | } 112 | 113 | @tailrec private def act(b: Behavior, n: Node, i: Int): Unit = { 114 | val b1 = try b(n.a).apply(b) catch { 115 | case t: Throwable => 116 | asyncTrySuspend(b, n) 117 | rethrow(t) 118 | } 119 | val n1 = n.get 120 | if (n1 eq null) asyncTrySuspend(b1, n) 121 | else if (i > 0) act(b1, n1, i - 1) 122 | else { 123 | asyncAct(b1, n1) 124 | n.lazySet(null) // to help GC don't fall into nepotism: http://psy-lob-saw.blogspot.com/2016/03/gc-nepotism-and-linked-queues.html 125 | } 126 | } 127 | 128 | private def rethrow(t: Throwable): Nothing = { 129 | val ct = Thread.currentThread() 130 | if (t.isInstanceOf[InterruptedException]) ct.interrupt() 131 | ct.getUncaughtExceptionHandler.uncaughtException(ct, t) 132 | throw t 133 | } 134 | } 135 | } 136 | 137 | private class Node(val a: Any) extends AtomicReference[Node] 138 | //Usage example that creates an actor that will, after it's first message is received, Die 139 | //import Actor._ 140 | //implicit val e: java.util.concurrent.Executor = java.util.concurrent.Executors.newCachedThreadPool 141 | //val actor = Actor(self => msg => { println("self: " + self + " got msg " + msg); Die }) 142 | //actor ! "foo" 143 | //actor ! "foo" -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/ScalazActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.github.plokhotnyuk.actors.BenchmarkSpec._ 4 | import java.util.concurrent._ 5 | import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool 6 | import scalaz.concurrent.{Actor, Strategy} 7 | import scalaz.concurrent.Actor._ 8 | 9 | class ScalazActorSpec extends BenchmarkSpec { 10 | private val executorService = createExecutorService() 11 | private implicit val actorStrategy = executorService match { 12 | case p: AkkaForkJoinPool => new Strategy { 13 | def apply[A](a: => A): () => A = { 14 | new AkkaForkJoinTask(p) { 15 | def exec(): Boolean = { 16 | a 17 | false 18 | } 19 | } 20 | null 21 | } 22 | } 23 | case p: ForkJoinPool => new Strategy { 24 | def apply[A](a: => A): () => A = { 25 | new JavaForkJoinTask(p) { 26 | def exec(): Boolean = { 27 | a 28 | false 29 | } 30 | } 31 | null 32 | } 33 | } 34 | case p => new Strategy { 35 | def apply[A](a: => A): () => A = { 36 | p.execute(new Runnable { 37 | def run(): Unit = a 38 | }) 39 | null 40 | } 41 | } 42 | } 43 | 44 | "Enqueueing" in { 45 | val n = 40000000 46 | val l1 = new CountDownLatch(1) 47 | val l2 = new CountDownLatch(1) 48 | val a = blockableCountActor(l1, l2, n) 49 | footprintedAndTimed(n) { 50 | sendMessages(a, n) 51 | } 52 | l1.countDown() 53 | l2.await() 54 | } 55 | 56 | "Dequeueing" in { 57 | val n = 40000000 58 | val l1 = new CountDownLatch(1) 59 | val l2 = new CountDownLatch(1) 60 | val a = blockableCountActor(l1, l2, n) 61 | sendMessages(a, n) 62 | timed(n) { 63 | l1.countDown() 64 | l2.await() 65 | } 66 | } 67 | 68 | "Initiation" in { 69 | footprintedAndTimedCollect(10000000)(() => actor((_: Message) => ())) 70 | } 71 | 72 | "Single-producer sending" in { 73 | val n = 15000000 74 | val l = new CountDownLatch(1) 75 | val a = countActor(l, n) 76 | timed(n) { 77 | sendMessages(a, n) 78 | l.await() 79 | } 80 | } 81 | 82 | "Multi-producer sending" in { 83 | val n = roundToParallelism(15000000) 84 | val l = new CountDownLatch(1) 85 | val a = countActor(l, n) 86 | val r = new ParRunner((1 to parallelism).map(_ => () => sendMessages(a, n / parallelism))) 87 | timed(n) { 88 | r.start() 89 | l.await() 90 | } 91 | } 92 | 93 | "Max throughput" in { 94 | val n = roundToParallelism(30000000) 95 | val l = new CountDownLatch(parallelism) 96 | val r = new ParRunner((1 to parallelism).map { 97 | _ => 98 | val a = countActor(l, n / parallelism) 99 | () => sendMessages(a, n / parallelism) 100 | }) 101 | timed(n) { 102 | r.start() 103 | l.await() 104 | } 105 | } 106 | 107 | "Ping latency" in { 108 | pingLatency(3000000) 109 | } 110 | 111 | "Ping throughput 10K" in { 112 | pingThroughput(6000000, 10000) 113 | } 114 | 115 | def shutdown(): Unit = fullShutdown(executorService) 116 | 117 | private def pingLatency(n: Int): Unit = 118 | latencyTimed(n) { 119 | h => 120 | val l = new CountDownLatch(2) 121 | var a1: Actor[Message] = null 122 | val a2 = actor { 123 | var i = n / 2 124 | (m: Message) => 125 | h.record() 126 | if (i > 0) a1 ! m 127 | i -= 1 128 | if (i == 0) l.countDown() 129 | } 130 | a1 = actor { 131 | var i = n / 2 132 | (m: Message) => 133 | h.record() 134 | if (i > 0) a2 ! m 135 | i -= 1 136 | if (i == 0) l.countDown() 137 | } 138 | a2 ! Message() 139 | l.await() 140 | } 141 | 142 | private def pingThroughput(n: Int, p: Int): Unit = { 143 | val l = new CountDownLatch(p * 2) 144 | val as = (1 to p).map { 145 | _ => 146 | var a1: Actor[Message] = null 147 | val a2 = actor { 148 | var i = n / p / 2 149 | (m: Message) => 150 | if (i > 0) a1 ! m 151 | i -= 1 152 | if (i == 0) l.countDown() 153 | } 154 | a1 = actor { 155 | var i = n / p / 2 156 | (m: Message) => 157 | if (i > 0) a2 ! m 158 | i -= 1 159 | if (i == 0) l.countDown() 160 | } 161 | a2 162 | } 163 | timed(n) { 164 | as.foreach(_ ! Message()) 165 | l.await() 166 | } 167 | } 168 | 169 | private def blockableCountActor(l1: CountDownLatch, l2: CountDownLatch, n: Int): Actor[Message] = 170 | actor { 171 | var blocked = true 172 | var i = n - 1 173 | (_: Message) => 174 | if (blocked) { 175 | l1.await() 176 | blocked = false 177 | } else { 178 | i -= 1 179 | if (i == 0) l2.countDown() 180 | } 181 | } 182 | 183 | private def countActor(l: CountDownLatch, n: Int): Actor[Message] = 184 | actor { 185 | var i = n 186 | (_: Message) => 187 | i -= 1 188 | if (i == 0) l.countDown() 189 | } 190 | 191 | private def sendMessages(a: Actor[Message], n: Int): Unit = { 192 | val m = Message() 193 | var i = n 194 | while (i > 0) { 195 | a ! m 196 | i -= 1 197 | } 198 | } 199 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/BenchmarkSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool 4 | import com.github.plokhotnyuk.actors.BenchmarkSpec._ 5 | import com.sun.management.OperatingSystemMXBean 6 | import java.lang.management.ManagementFactory._ 7 | import java.util.concurrent._ 8 | import org.agrona.concurrent.HighResolutionTimer 9 | import org.HdrHistogram.Histogram 10 | import org.scalatest._ 11 | 12 | abstract class BenchmarkSpec extends FreeSpec with BeforeAndAfterAll with BeforeAndAfterEach { 13 | override def beforeAll(): Unit = { 14 | HighResolutionTimer.enable() 15 | } 16 | 17 | override def afterEach(): Unit = { 18 | usedMemory(0.1) // GC 19 | info("") 20 | } 21 | 22 | override def afterAll(): Unit = { 23 | shutdown() 24 | HighResolutionTimer.disable() 25 | } 26 | 27 | def shutdown(): Unit 28 | 29 | def timed[A](n: Int, printAvgLatency: Boolean = false)(benchmark: => A): A = { 30 | val t = System.nanoTime() 31 | val ct = osMXBean.getProcessCpuTime 32 | val r = benchmark 33 | val cd = osMXBean.getProcessCpuTime - ct 34 | val d = System.nanoTime() - t 35 | info(f"$n%,d ops") 36 | info(f"$d%,d ns") 37 | if (printAvgLatency) info(f"${d / n}%,d ns/op") 38 | else info(f"${(n * 1000000000L) / d}%,d ops/s") 39 | info(f"${(cd * 100.0) / d / processors}%2.1f %% of CPU usage") 40 | r 41 | } 42 | 43 | def latencyTimed[A](n: Int)(benchmark: LatencyHistogram => A): A = { 44 | val h = new LatencyHistogram 45 | val t = System.nanoTime() 46 | val ct = osMXBean.getProcessCpuTime 47 | val r = benchmark(h) 48 | val cd = osMXBean.getProcessCpuTime - ct 49 | val d = System.nanoTime() - t 50 | info(f"$n%,d ops") 51 | info(f"$d%,d ns") 52 | List(0.0, 0.5, 0.9, 0.99, 0.999, 0.9999, 0.99999, 1.0).foreach { 53 | x => info(f"p($x%1.5f) = ${h.getValueAtPercentile(x * 100)}%8d ns/op") 54 | } 55 | info(f"${(cd * 100.0) / d / processors}%2.1f %% of CPU usage") 56 | r 57 | } 58 | 59 | def footprintedAndTimed[A](n: Int)(benchmark: => A): A = { 60 | val u = usedMemory() 61 | val r = timed(n)(benchmark) 62 | val m = usedMemory() - u 63 | val b = bytesPerInstance(m, n) 64 | info(f"$b%,d bytes per instance") 65 | r 66 | } 67 | 68 | def footprintedAndTimedCollect[A](n: Int)(construct: () => A, teardown: => Unit = ()): Seq[A] = { 69 | val r = Array.ofDim(n).asInstanceOf[Array[A]] 70 | val u = usedMemory() 71 | timed(n, printAvgLatency = true) { 72 | val as = r 73 | var i = n 74 | while (i > 0) { 75 | i -= 1 76 | as(i) = construct() 77 | } 78 | } 79 | teardown 80 | val m = usedMemory() - u 81 | val b = bytesPerInstance(m, n) 82 | info(f"$b%,d bytes per instance") 83 | r 84 | } 85 | } 86 | 87 | object BenchmarkSpec { 88 | private val processors = Runtime.getRuntime.availableProcessors 89 | private val executorServiceType = System.getProperty("benchmark.executorServiceType", "java-forkjoin-pool") 90 | private val poolSize = System.getProperty("benchmark.poolSize", processors.toString).toInt 91 | private val osMXBean = newPlatformMXBeanProxy(getPlatformMBeanServer, OPERATING_SYSTEM_MXBEAN_NAME, classOf[OperatingSystemMXBean]) 92 | private val memoryMXBean = getMemoryMXBean 93 | println(s"Executor service type: $executorServiceType") 94 | 95 | val parallelism: Int = System.getProperty("benchmark.parallelism", processors.toString).toInt 96 | 97 | def roundToParallelism(n: Int): Int = (n / parallelism) * parallelism 98 | 99 | def createExecutorService(size: Int = poolSize): ExecutorService = 100 | executorServiceType match { 101 | case "akka-forkjoin-pool" => new AkkaForkJoinPool(size, akka.dispatch.forkjoin.ForkJoinPool.defaultForkJoinWorkerThreadFactory, null) 102 | case "java-forkjoin-pool" => new ForkJoinPool(size, ForkJoinPool.defaultForkJoinWorkerThreadFactory, null, true) 103 | case "lbq-thread-pool" => new ThreadPoolExecutor(size, size, 1, TimeUnit.HOURS, 104 | new LinkedBlockingQueue[Runnable](), Executors.defaultThreadFactory(), new ThreadPoolExecutor.DiscardPolicy()) 105 | case "abq-thread-pool" => new ThreadPoolExecutor(size, size, 1, TimeUnit.HOURS, 106 | new ArrayBlockingQueue[Runnable](1000000), Executors.defaultThreadFactory(), new ThreadPoolExecutor.DiscardPolicy()) 107 | case _ => throw new IllegalArgumentException("Unsupported value of benchmark.executorServiceType property") 108 | } 109 | 110 | def bytesPerInstance(m: Long, n: Int): Int = Math.round(m.toDouble / n).toInt 111 | 112 | def usedMemory(precision: Double = 0.001): Long = { 113 | def getUsed: Long = memoryMXBean.getHeapMemoryUsage.getUsed 114 | 115 | @annotation.tailrec 116 | def getHeapMemoryUsage(prev: Long, i: Int = 10): Long = { 117 | Thread.sleep(10) 118 | val curr = getUsed 119 | val diff = prev - curr 120 | if (diff < 0 || diff > precision * curr) getHeapMemoryUsage(curr) 121 | else if (i > 0) getHeapMemoryUsage(curr, i - 1) 122 | else curr 123 | } 124 | 125 | val prev = getUsed 126 | System.gc() 127 | getHeapMemoryUsage(prev) 128 | } 129 | 130 | def fullShutdown(e: ExecutorService): Unit = { 131 | e.shutdownNow() 132 | e.awaitTermination(1, TimeUnit.MINUTES) 133 | } 134 | } 135 | 136 | class LatencyHistogram extends Histogram(1000000000L, 2) { 137 | private var t: Long = 0 138 | 139 | def record(): Unit = { 140 | val t1 = System.nanoTime() 141 | if (t != 0) recordValue(t1 - t) 142 | t = t1 143 | } 144 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/gist/viktorklang/ActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.gist.viktorklang 2 | 3 | import java.util.concurrent._ 4 | import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool 5 | import com.github.gist.viktorklang.Actor._ 6 | import org.scalatest.{FreeSpec, Matchers} 7 | 8 | class ActorSpec extends FreeSpec with Matchers { 9 | val NumOfMessages = 100000 10 | val NumOfThreads = 4 11 | 12 | "actor with Akka fork-join pool executor" - { 13 | implicit val e = new AkkaForkJoinPool(NumOfThreads, akka.dispatch.forkjoin.ForkJoinPool.defaultForkJoinWorkerThreadFactory, null, true) 14 | actorTests(NumOfMessages) 15 | } 16 | 17 | "actor with Java fork-join pool executor" - { 18 | implicit val e = new ForkJoinPool(NumOfThreads, ForkJoinPool.defaultForkJoinWorkerThreadFactory, null, true) 19 | actorTests(NumOfMessages) 20 | } 21 | 22 | "actor with fixed thread pool executor" - { 23 | implicit val e = Executors.newFixedThreadPool(NumOfThreads, new ThreadFactory { 24 | private val defaultThreadFactory = Executors.defaultThreadFactory() 25 | 26 | def newThread(r: Runnable): Thread = { 27 | val t = defaultThreadFactory.newThread(r) 28 | t.setDaemon(true) 29 | t 30 | } 31 | }) 32 | actorTests(NumOfMessages) 33 | } 34 | 35 | def actorTests(n: Int)(implicit e: Executor): Unit = { 36 | "execute code async" in { 37 | val l = new CountDownLatch(1) 38 | Actor(_ => _ => { 39 | l.countDown() 40 | Stay 41 | }) ! 1 42 | assertCountDown(l) 43 | } 44 | 45 | "exchange messages with another actor without loss" in { 46 | val l = new CountDownLatch(n) 47 | lazy val a1: Address = Actor(_ => { 48 | case i: Int => 49 | if (i == l.getCount) { 50 | if (i != 0) a2 ! i - 1 51 | l.countDown() 52 | l.countDown() 53 | } 54 | Stay 55 | }) 56 | lazy val a2 = Actor(_ => { 57 | case i: Int => 58 | a1 ! i - 1 59 | Stay 60 | }) 61 | a1 ! n 62 | assertCountDown(l) 63 | } 64 | 65 | "create child actor and send messages to it recursively" in { 66 | val l = new CountDownLatch(1) 67 | 68 | def a: Address = Actor(_ => { 69 | case i: Int => 70 | if (i > 0) a ! i - 1 else l.countDown() 71 | Stay 72 | }) 73 | 74 | a ! n 75 | assertCountDown(l) 76 | } 77 | 78 | "handle messages in order of sending by each thread" in { 79 | val nRounded = (n / NumOfThreads) * NumOfThreads 80 | val l = new CountDownLatch(nRounded) 81 | val ms = collection.mutable.Map[Int, Int]() 82 | val a = Actor(_ => { 83 | case m: (Int, Int) @unchecked => 84 | val (j, i) = m 85 | if (ms.getOrElse(j, 0) + 1 == i) { 86 | ms.put(j, i) 87 | l.countDown() 88 | } 89 | Stay 90 | }) 91 | for (j <- 1 to NumOfThreads) fork { 92 | for (i <- 1 to nRounded / NumOfThreads) a ! j -> i 93 | } 94 | assertCountDown(l) 95 | } 96 | 97 | "doesn't handle messages in simultaneous threads" in { 98 | val nRounded = (n / NumOfThreads) * NumOfThreads 99 | val l = new CountDownLatch(1) 100 | val expectedSum = nRounded * (nRounded + 1L) / 2 101 | 102 | def accumulator(m: Any, sum: Long = 0L): Effect = m match { 103 | case i: Int => 104 | if (sum + i == expectedSum) l.countDown() 105 | Become(m => accumulator(m, sum + i)) 106 | } 107 | 108 | val a = Actor(_ => m => accumulator(m)) 109 | val nPerThread = nRounded / NumOfThreads 110 | for (j <- 1 to NumOfThreads) fork { 111 | val off = (j - 1) * nPerThread 112 | for (i <- 1 to nPerThread) a ! i + off 113 | } 114 | assertCountDown(l) 115 | } 116 | 117 | "redirect unhandled errors to uncaught exception handler of thread" in { 118 | val l = new CountDownLatch(1) 119 | withSystemErrRedirect(_ => l.countDown()) { 120 | Actor(_ => _ => { 121 | throw null 122 | Stay 123 | }) ! 1 124 | assertCountDown(l) 125 | } 126 | } 127 | 128 | "handle messages with previous behaviour after unhandled errors" in { 129 | val l = new CountDownLatch(1) 130 | withSystemErrRedirect(_ => ()) { // ignore err output that will be flooded with stack traces 131 | val q = 1000 // 1 / frequency of exceptions 132 | val expectedSum = n * (n + 1L) / 2 - q * (n / q * (n / q + 1L) / 2) 133 | 134 | def failingAccumulator(m: Any, sum: Long = 0L): Effect = m match { 135 | case i: Int => 136 | if (i % q == 0) throw null 137 | if (sum + i == expectedSum) l.countDown() 138 | Become(m => failingAccumulator(m, sum + i)) 139 | } 140 | 141 | val a = Actor(_ => m => failingAccumulator(m)) 142 | for (i <- 1 to n) { 143 | a ! i 144 | } 145 | assertCountDown(l) 146 | } 147 | } 148 | 149 | "don't starve tasks arriving from external submit under high internal traffic" in { 150 | (1 to NumOfThreads).foreach { 151 | _ => 152 | lazy val a: Actor.Address = Actor(_ => { 153 | _ => 154 | a ! "loop" 155 | Stay 156 | }) 157 | a ! "start" 158 | } 159 | val l = new CountDownLatch(1) 160 | Actor(_ => { 161 | _ => 162 | l.countDown() 163 | Stay 164 | }) ! "all fine" 165 | assertCountDown(l) 166 | } 167 | } 168 | 169 | private def withSystemErrRedirect[A](w: Int => Unit)(f: => A): A = { 170 | val err = System.err 171 | try { 172 | System.setErr(new java.io.PrintStream(new java.io.OutputStream { 173 | override def write(b: Int): Unit = w(b) 174 | })) 175 | f 176 | } finally System.setErr(err) 177 | } 178 | 179 | private def assertCountDown(l: CountDownLatch, timeout: Long = 3000): Unit = 180 | l.await(timeout, TimeUnit.MILLISECONDS).shouldBe(true) 181 | 182 | private def fork(f: => Unit): Unit = new Thread { 183 | override def run(): Unit = f 184 | }.start() 185 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/LiftActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import com.github.plokhotnyuk.actors.BenchmarkSpec._ 4 | import java.util.concurrent.{CountDownLatch, ForkJoinPool} 5 | import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool 6 | import net.liftweb.actor.{ILAExecute, LAScheduler, LiftActor} 7 | import net.liftweb.common.Full 8 | 9 | class LiftActorSpec extends BenchmarkSpec { 10 | LAScheduler.createExecutor = () => new ILAExecute { 11 | private val executorService = createExecutorService() 12 | 13 | def execute(f: () => Unit): Unit = executorService match { 14 | case p: AkkaForkJoinPool => new AkkaForkJoinTask(p) { 15 | def exec(): Boolean = { 16 | f() 17 | false 18 | } 19 | } 20 | case p: ForkJoinPool => new JavaForkJoinTask(p) { 21 | def exec(): Boolean = { 22 | f() 23 | false 24 | } 25 | } 26 | case p => p.execute(new Runnable { 27 | def run(): Unit = f() 28 | }) 29 | } 30 | 31 | def shutdown(): Unit = fullShutdown(executorService) 32 | } 33 | 34 | "Enqueueing" in { 35 | val n = 10000000 36 | val l1 = new CountDownLatch(1) 37 | val l2 = new CountDownLatch(1) 38 | val a = blockableCountActor(l1, l2, n) 39 | footprintedAndTimed(n) { 40 | sendMessages(a, n) 41 | } 42 | l1.countDown() 43 | l2.await() 44 | } 45 | 46 | "Dequeueing" in { 47 | val n = 10000000 48 | val l1 = new CountDownLatch(1) 49 | val l2 = new CountDownLatch(1) 50 | val a = blockableCountActor(l1, l2, n) 51 | sendMessages(a, n) 52 | timed(n) { 53 | l1.countDown() 54 | l2.await() 55 | } 56 | } 57 | 58 | "Initiation" in { 59 | footprintedAndTimedCollect(10000000)(() => new LiftActor { 60 | def messageHandler: PartialFunction[Any, Unit] = { 61 | case _ => 62 | } 63 | }) 64 | } 65 | 66 | "Single-producer sending" in { 67 | val n = 6000000 68 | val l = new CountDownLatch(1) 69 | val a = countActor(l, n) 70 | timed(n) { 71 | sendMessages(a, n) 72 | l.await() 73 | } 74 | } 75 | 76 | "Multi-producer sending" in { 77 | val n = roundToParallelism(6000000) 78 | val l = new CountDownLatch(1) 79 | val a = countActor(l, n) 80 | val r = new ParRunner((1 to parallelism).map(_ => () => sendMessages(a, n / parallelism))) 81 | timed(n) { 82 | r.start() 83 | l.await() 84 | } 85 | } 86 | 87 | "Max throughput" in { 88 | val n = roundToParallelism(12000000) 89 | val l = new CountDownLatch(parallelism) 90 | val r = new ParRunner((1 to parallelism).map { 91 | _ => 92 | val a = countActor(l, n / parallelism) 93 | () => sendMessages(a, n / parallelism) 94 | }) 95 | timed(n) { 96 | r.start() 97 | l.await() 98 | } 99 | } 100 | 101 | "Ping latency" in { 102 | pingLatency(1500000) 103 | } 104 | 105 | "Ping throughput 10K" in { 106 | pingThroughput(2000000, 10000) 107 | } 108 | 109 | def shutdown(): Unit = LAScheduler.shutdown() 110 | 111 | private def pingLatency(n: Int): Unit = { 112 | latencyTimed(n) { 113 | h => 114 | val l = new CountDownLatch(2) 115 | var a1: LiftActor = null 116 | val a2 = new LiftActor { 117 | private var i = n / 2 118 | 119 | override val highPriorityReceive: Full[PartialFunction[Any, Unit]] = Full[PartialFunction[Any, Unit]]({ 120 | case m => 121 | h.record() 122 | if (i > 0) a1 ! m 123 | i -= 1 124 | if (i == 0) l.countDown() 125 | }) 126 | 127 | def messageHandler: PartialFunction[Any, Unit] = { 128 | case _ => 129 | } 130 | } 131 | a1 = new LiftActor { 132 | private var i = n / 2 133 | 134 | override val highPriorityReceive: Full[PartialFunction[Any, Unit]] = Full[PartialFunction[Any, Unit]]({ 135 | case m => 136 | h.record() 137 | if (i > 0) a2 ! m 138 | i -= 1 139 | if (i == 0) l.countDown() 140 | }) 141 | 142 | def messageHandler: PartialFunction[Any, Unit] = { 143 | case _ => 144 | } 145 | } 146 | a2 ! Message() 147 | l.await() 148 | } 149 | } 150 | 151 | private def pingThroughput(n: Int, p: Int): Unit = { 152 | val l = new CountDownLatch(p * 2) 153 | val as = (1 to p).map { 154 | _ => 155 | var a1: LiftActor = null 156 | val a2 = new LiftActor { 157 | private var i = n / p / 2 158 | 159 | override val highPriorityReceive: Full[PartialFunction[Any, Unit]] = Full[PartialFunction[Any, Unit]]({ 160 | case m => 161 | if (i > 0) a1 ! m 162 | i -= 1 163 | if (i == 0) l.countDown() 164 | }) 165 | 166 | def messageHandler: PartialFunction[Any, Unit] = { 167 | case _ => 168 | } 169 | } 170 | a1 = new LiftActor { 171 | private var i = n / p / 2 172 | 173 | override val highPriorityReceive: Full[PartialFunction[Any, Unit]] = Full[PartialFunction[Any, Unit]]({ 174 | case m => 175 | if (i > 0) a2 ! m 176 | i -= 1 177 | if (i == 0) l.countDown() 178 | }) 179 | 180 | def messageHandler: PartialFunction[Any, Unit] = { 181 | case _ => 182 | } 183 | } 184 | a2 185 | } 186 | timed(n) { 187 | as.foreach(_ ! Message()) 188 | l.await() 189 | } 190 | } 191 | 192 | private def blockableCountActor(l1: CountDownLatch, l2: CountDownLatch, n: Int): LiftActor = 193 | new LiftActor { 194 | private var blocked = true 195 | private var i = n - 1 196 | 197 | override val highPriorityReceive: Full[PartialFunction[Any, Unit]] = Full[PartialFunction[Any, Unit]]({ 198 | case _ => 199 | if (blocked) { 200 | l1.await() 201 | blocked = false 202 | } else { 203 | i -= 1 204 | if (i == 0) l2.countDown() 205 | } 206 | }) 207 | 208 | def messageHandler: PartialFunction[Any, Unit] = { 209 | case _ => 210 | } 211 | } 212 | 213 | private def countActor(l: CountDownLatch, n: Int): LiftActor = 214 | new LiftActor { 215 | private var i = n 216 | 217 | override val highPriorityReceive: Full[PartialFunction[Any, Unit]] = Full[PartialFunction[Any, Unit]]({ 218 | case _ => 219 | i -= 1 220 | if (i == 0) l.countDown() 221 | }) 222 | 223 | def messageHandler: PartialFunction[Any, Unit] = { 224 | case _ => 225 | } 226 | } 227 | 228 | private def sendMessages(a: LiftActor, n: Int): Unit = { 229 | val m = Message() 230 | var i = n 231 | while (i > 0) { 232 | a ! m 233 | i -= 1 234 | } 235 | } 236 | } -------------------------------------------------------------------------------- /src/test/scala/com/github/plokhotnyuk/actors/AkkaUnboundedActorSpec.scala: -------------------------------------------------------------------------------- 1 | package com.github.plokhotnyuk.actors 2 | 3 | import akka.actor._ 4 | import akka.dispatch.{DispatcherPrerequisites, ExecutorServiceConfigurator, ExecutorServiceFactory} 5 | import akka.pattern.ask 6 | import akka.util.Timeout 7 | import com.github.plokhotnyuk.actors.BenchmarkSpec._ 8 | import com.typesafe.config.ConfigFactory._ 9 | import com.typesafe.config.Config 10 | import java.util.concurrent.{CountDownLatch, ExecutorService, ThreadFactory, TimeUnit} 11 | import scala.concurrent.Await 12 | 13 | class AkkaUnboundedActorSpec extends BenchmarkSpec { 14 | def config: Config = load(parseString( 15 | """ 16 | akka { 17 | log-dead-letters = 0 18 | log-dead-letters-during-shutdown = off 19 | actor { 20 | unstarted-push-timeout = 100s 21 | benchmark-dispatcher { 22 | executor = "com.github.plokhotnyuk.actors.CustomExecutorServiceConfigurator" 23 | throughput = 1024 24 | } 25 | } 26 | } 27 | """)) 28 | 29 | val actorSystem = ActorSystem("system", config) 30 | val root: ActorRef = actorSystem.actorOf(Props(classOf[RootAkkaActor]).withDispatcher("akka.actor.benchmark-dispatcher")) 31 | implicit val timeout = Timeout(1, TimeUnit.MINUTES) 32 | 33 | "Enqueueing" in { 34 | val n = 10000000 35 | val l1 = new CountDownLatch(1) 36 | val l2 = new CountDownLatch(1) 37 | val a = blockableCountActor(l1, l2, n) 38 | footprintedAndTimed(n) { 39 | sendMessages(a, n) 40 | } 41 | l1.countDown() 42 | l2.await() 43 | } 44 | 45 | "Dequeueing" in { 46 | val n = 10000000 47 | val l1 = new CountDownLatch(1) 48 | val l2 = new CountDownLatch(1) 49 | val a = blockableCountActor(l1, l2, n) 50 | sendMessages(a, n) 51 | timed(n) { 52 | l1.countDown() 53 | l2.await() 54 | } 55 | } 56 | 57 | "Initiation" in { 58 | footprintedAndTimedCollect(100000){ 59 | val p = Props(classOf[MinimalAkkaActor]).withDispatcher("akka.actor.benchmark-dispatcher") 60 | val c = Await.result(root ? "context", timeout.duration).asInstanceOf[ActorContext] 61 | () => c.actorOf(p) 62 | } 63 | } 64 | 65 | "Single-producer sending" in { 66 | val n = 6000000 67 | val l = new CountDownLatch(1) 68 | val a = countActor(l, n) 69 | timed(n) { 70 | sendMessages(a, n) 71 | l.await() 72 | } 73 | } 74 | 75 | "Multi-producer sending" in { 76 | val n = roundToParallelism(6000000) 77 | val l = new CountDownLatch(1) 78 | val a = countActor(l, n) 79 | val r = new ParRunner((1 to parallelism).map(_ => () => sendMessages(a, n / parallelism))) 80 | timed(n) { 81 | r.start() 82 | l.await() 83 | } 84 | } 85 | 86 | "Max throughput" in { 87 | val n = roundToParallelism(12000000) 88 | val l = new CountDownLatch(parallelism) 89 | val r = new ParRunner((1 to parallelism).map { 90 | _ => 91 | val a = countActor(l, n / parallelism) 92 | () => sendMessages(a, n / parallelism) 93 | }) 94 | timed(n) { 95 | r.start() 96 | l.await() 97 | } 98 | } 99 | 100 | "Ping latency" in { 101 | pingLatency(1500000) 102 | } 103 | 104 | "Ping throughput 10K" in { 105 | pingThroughput(2000000, 10000) 106 | } 107 | 108 | def shutdown(): Unit = { 109 | actorSystem.terminate() 110 | Await.result(actorSystem.whenTerminated, timeout.duration) 111 | } 112 | 113 | private def pingLatency(n: Int): Unit = 114 | latencyTimed(n) { 115 | h => 116 | val l = new CountDownLatch(2) 117 | val a1 = pingLatencyActor(l, n / 2, h) 118 | val a2 = pingLatencyActor(l, n / 2, h) 119 | a1.tell(Message(), a2) 120 | l.await() 121 | } 122 | 123 | private def pingThroughput(n: Int, p: Int): Unit = { 124 | val l = new CountDownLatch(p * 2) 125 | val as = (1 to p).map(_ => (pingThroughputActor(l, n / p / 2), pingThroughputActor(l, n / p / 2))) 126 | timed(n) { 127 | as.foreach { 128 | case (a1, a2) => a1.tell(Message(), a2) 129 | } 130 | l.await() 131 | } 132 | } 133 | 134 | private def pingLatencyActor(l: CountDownLatch, n: Int, h: LatencyHistogram): ActorRef = 135 | actorOf(Props(classOf[PingLatencyAkkaActor], l, n, h).withDispatcher("akka.actor.benchmark-dispatcher")) 136 | 137 | private def pingThroughputActor(l: CountDownLatch, n: Int): ActorRef = 138 | actorOf(Props(classOf[PingThroughputAkkaActor], l, n).withDispatcher("akka.actor.benchmark-dispatcher")) 139 | 140 | private def blockableCountActor(l1: CountDownLatch, l2: CountDownLatch, n: Int): ActorRef = 141 | actorOf(Props(classOf[BlockableCountAkkaActor], l1, l2, n).withDispatcher("akka.actor.benchmark-dispatcher")) 142 | 143 | private def countActor(l: CountDownLatch, n: Int): ActorRef = 144 | actorOf(Props(classOf[CountAkkaActor], l, n).withDispatcher("akka.actor.benchmark-dispatcher")) 145 | 146 | protected def sendMessages(a: ActorRef, n: Int): Unit = { 147 | val m = Message() 148 | var i = n 149 | while (i > 0) { 150 | a ! m 151 | i -= 1 152 | } 153 | } 154 | 155 | protected def actorOf(p: Props): ActorRef = Await.result(root ? p, timeout.duration).asInstanceOf[ActorRef] 156 | } 157 | 158 | private class PingLatencyAkkaActor(l: CountDownLatch, n: Int, h: LatencyHistogram) extends Actor { 159 | private var i = n 160 | 161 | def receive: Actor.Receive = { 162 | case m => 163 | h.record() 164 | if (i > 0) sender ! m 165 | i -= 1 166 | if (i == 0) { 167 | l.countDown() 168 | context.stop(self) 169 | } 170 | } 171 | } 172 | 173 | private class PingThroughputAkkaActor(l: CountDownLatch, n: Int) extends Actor { 174 | private var i = n 175 | 176 | def receive: Actor.Receive = { 177 | case m => 178 | if (i > 0) sender ! m 179 | i -= 1 180 | if (i == 0) { 181 | l.countDown() 182 | context.stop(self) 183 | } 184 | } 185 | } 186 | 187 | private class CountAkkaActor(l: CountDownLatch, n: Int) extends Actor { 188 | private var i = n 189 | 190 | def receive: Actor.Receive = { 191 | case _ => 192 | i -= 1 193 | if (i == 0) { 194 | l.countDown() 195 | context.stop(self) 196 | } 197 | } 198 | } 199 | 200 | private class BlockableCountAkkaActor(l1: CountDownLatch, l2: CountDownLatch, n: Int) extends Actor { 201 | private var blocked = true 202 | private var i = n - 1 203 | 204 | def receive: Actor.Receive = { 205 | case _ => 206 | if (blocked) { 207 | l1.await() 208 | blocked = false 209 | } else { 210 | i -= 1 211 | if (i == 0) { 212 | l2.countDown() 213 | context.stop(self) 214 | } 215 | } 216 | } 217 | } 218 | 219 | private class RootAkkaActor extends Actor { 220 | def receive: Actor.Receive = { 221 | case p: Props => 222 | sender ! context.actorOf(p) 223 | case "context" => 224 | sender ! this.context 225 | } 226 | } 227 | 228 | private class MinimalAkkaActor extends Actor { 229 | def receive: Actor.Receive = { 230 | case _ => 231 | } 232 | } 233 | 234 | private class CustomExecutorServiceConfigurator(config: Config, prerequisites: DispatcherPrerequisites) extends ExecutorServiceConfigurator(config, prerequisites) { 235 | def createExecutorServiceFactory(id: String, threadFactory: ThreadFactory): ExecutorServiceFactory = new ExecutorServiceFactory { 236 | def createExecutorService: ExecutorService = BenchmarkSpec.createExecutorService() 237 | } 238 | } -------------------------------------------------------------------------------- /out0_poolSize100.txt: -------------------------------------------------------------------------------- 1 | [info] Loading global plugins from /home/andriy/.sbt/0.13/plugins 2 | [info] Loading project definition from /home/andriy/Projects/com/github/plokhotnyuk/actors/project 3 | [info] Set current project to actors (in build file:/home/andriy/Projects/com/github/plokhotnyuk/actors/) 4 | [success] Total time: 0 s, completed Jul 12, 2017 9:20:29 PM 5 | [info] Updating {file:/home/andriy/Projects/com/github/plokhotnyuk/actors/}actors... 6 | [info] Resolving org.scala-lang#scala-library;2.12.2 ... 7 | [info] Resolving com.typesafe.akka#akka-actor_2.12;2.5.3 ... 8 | [info] Resolving com.typesafe#config;1.3.1 ... 9 | [info] Resolving org.scala-lang.modules#scala-java8-compat_2.12;0.8.0 ... 10 | [info] Resolving net.liftweb#lift-actor_2.12;3.1.0 ... 11 | [info] Resolving net.liftweb#lift-common_2.12;3.1.0 ... 12 | [info] Resolving org.slf4j#slf4j-api;1.7.2 ... 13 | [info] Resolving org.scala-lang.modules#scala-xml_2.12;1.0.5 ... 14 | [info] Resolving org.scala-lang.modules#scala-parser-combinators_2.12;1.0.4 ... 15 | [info] Resolving org.scalaz#scalaz-concurrent_2.12;7.3.0-M14 ... 16 | [info] Resolving org.scalaz#scalaz-core_2.12;7.3.0-M14 ... 17 | [info] Resolving org.scalaz#scalaz-effect_2.12;7.3.0-M14 ... 18 | [info] Resolving org.scalatest#scalatest_2.12;3.0.3 ... 19 | [info] Resolving org.scalactic#scalactic_2.12;3.0.3 ... 20 | [info] Resolving org.scala-lang#scala-reflect;2.12.2 ... 21 | [info] Resolving org.hdrhistogram#HdrHistogram;2.1.9 ... 22 | [info] Resolving org.agrona#agrona;0.9.6 ... 23 | [info] Resolving org.scala-lang#scala-compiler;2.12.2 ... 24 | [info] Resolving org.scala-lang.modules#scala-xml_2.12;1.0.6 ... 25 | [info] Resolving jline#jline;2.14.3 ... 26 | [info] Done updating. 27 | [info] Compiling 15 Scala sources to /home/andriy/Projects/com/github/plokhotnyuk/actors/target/scala-2.12/test-classes... 28 | [warn] -optimise is deprecated: In 2.12, -optimise enables -opt:l:classpath. Check -opt:help for using the Scala 2.12 optimizer. 29 | [warn] /home/andriy/Projects/com/github/plokhotnyuk/actors/src/test/scala/akka/dispatch/Mailboxes.scala:17: private setter of tail in class NBBQ is never used 30 | [warn] @volatile private var tail: NodeWithCount = get 31 | [warn] ^ 32 | [warn] /home/andriy/Projects/com/github/plokhotnyuk/actors/src/test/scala/akka/dispatch/Mailboxes.scala:88: private setter of tail in class UQ is never used 33 | [warn] @volatile private var tail: Node = get 34 | [warn] ^ 35 | [warn] three warnings found 36 | [success] Total time: 15 s, completed Jul 12, 2017 9:20:44 PM 37 | [info] Loading global plugins from /home/andriy/.sbt/0.13/plugins 38 | [info] Loading project definition from /home/andriy/Projects/com/github/plokhotnyuk/actors/project 39 | [info] Set current project to actors (in build file:/home/andriy/Projects/com/github/plokhotnyuk/actors/) 40 | [info] ActorSpec: 41 | [info] actor with Akka fork-join pool executor 42 | [info] - execute code async 43 | [info] - exchange messages with another actor without loss 44 | [info] - create child actor and send messages to it recursively 45 | [info] - handle messages in order of sending by each thread 46 | [info] - doesn't handle messages in simultaneous threads 47 | [info] - redirect unhandled errors to uncaught exception handler of thread 48 | Exception in thread "ForkJoinPool-1-worker-7" java.lang.NullPointerException 49 | [info] - handle messages with previous behaviour after unhandled errors 50 | [info] - don't starve tasks arriving from external submit under high internal traffic 51 | [info] actor with Java fork-join pool executor 52 | [info] - execute code async 53 | [info] - exchange messages with another actor without loss 54 | [info] - create child actor and send messages to it recursively 55 | [info] - handle messages in order of sending by each thread 56 | [info] - doesn't handle messages in simultaneous threads 57 | [info] - redirect unhandled errors to uncaught exception handler of thread 58 | java.lang.NullPointerException 59 | java.lang.NullPointerException 60 | [info] - handle messages with previous behaviour after unhandled errors 61 | java.lang.NullPointerException 62 | [info] - don't starve tasks arriving from external submit under high internal traffic 63 | Exception in thread "ForkJoinPool-1-worker-0" java.lang.NullPointerException 64 | [info] actor with fixed thread pool executor 65 | [info] - execute code async 66 | [info] - exchange messages with another actor without loss 67 | [info] - create child actor and send messages to it recursively 68 | [info] - handle messages in order of sending by each thread 69 | [info] - doesn't handle messages in simultaneous threads 70 | [info] - redirect unhandled errors to uncaught exception handler of thread 71 | [info] - handle messages with previous behaviour after unhandled errors 72 | [info] - don't starve tasks arriving from external submit under high internal traffic 73 | Exception in thread "pool-3-thread-101" java.lang.NullPointerException 74 | [info] AkkaBoundedActorSpec: 75 | Executor service type: akka-forkjoin-pool 76 | [info] - Enqueueing 77 | [info] + 10,000,000 ops 78 | [info] + 799,138,039 ns 79 | [info] + 12,513,482 ops/s 80 | [info] + 14.2 % of CPU usage 81 | [info] + 48 bytes per instance 82 | [info] + 83 | [info] - Dequeueing 84 | [info] + 10,000,000 ops 85 | [info] + 1,003,630,832 ns 86 | [info] + 9,963,823 ops/s 87 | [info] + 14.8 % of CPU usage 88 | [info] + 89 | [info] - Initiation 90 | [info] + 100,000 ops 91 | [info] + 4,500,884,029 ns 92 | [info] + 45,008 ns/op 93 | [info] + 93.7 % of CPU usage 94 | [info] + 607 bytes per instance 95 | [info] + 96 | [info] - Single-producer sending 97 | [info] + 6,000,000 ops 98 | [info] + 1,388,624,771 ns 99 | [info] + 4,320,821 ops/s 100 | [info] + 24.7 % of CPU usage 101 | [info] + 102 | [info] - Multi-producer sending 103 | [info] + 6,000,000 ops 104 | [info] + 1,298,329,556 ns 105 | [info] + 4,621,322 ops/s 106 | [info] + 34.0 % of CPU usage 107 | [info] + 108 | [info] - Max throughput 109 | [info] + 12,000,000 ops 110 | [info] + 1,162,512,439 ns 111 | [info] + 10,322,470 ops/s 112 | [info] + 95.5 % of CPU usage 113 | [info] + 114 | [info] - Ping latency 115 | [info] + 1,500,000 ops 116 | [info] + 2,095,801,020 ns 117 | [info] + p(0.00000) = 284 ns/op 118 | [info] + p(0.50000) = 1327 ns/op 119 | [info] + p(0.90000) = 1911 ns/op 120 | [info] + p(0.99000) = 2559 ns/op 121 | [info] + p(0.99900) = 7807 ns/op 122 | [info] + p(0.99990) = 15359 ns/op 123 | [info] + p(0.99999) = 44799 ns/op 124 | [info] + p(1.00000) = 1769471 ns/op 125 | [info] + 77.4 % of CPU usage 126 | [info] + 127 | [info] - Ping throughput 10K 128 | [info] + 2,000,000 ops 129 | [info] + 765,700,730 ns 130 | [info] + 2,611,986 ops/s 131 | [info] + 99.3 % of CPU usage 132 | [info] + 133 | [info] - Overflow throughput 134 | [info] + 5,000,000 ops 135 | [info] + 533,704,448 ns 136 | [info] + 9,368,481 ops/s 137 | [info] + 16.2 % of CPU usage 138 | [info] + 139 | [info] AkkaMCNonBlockingBoundedActorSpec: 140 | Executor service type: akka-forkjoin-pool 141 | [info] - Enqueueing 142 | [info] + 10,000,000 ops 143 | [info] + 480,338,774 ns 144 | [info] + 20,818,639 ops/s 145 | [info] + 14.8 % of CPU usage 146 | [info] + 48 bytes per instance 147 | [info] + 148 | [info] - Dequeueing 149 | [info] + 10,000,000 ops 150 | [info] + 835,540,339 ns 151 | [info] + 11,968,303 ops/s 152 | [info] + 14.5 % of CPU usage 153 | [info] + 154 | [info] - Initiation 155 | [info] + 100,000 ops 156 | [info] + 1,155,963,669 ns 157 | [info] + 11,559 ns/op 158 | [info] + 62.7 % of CPU usage 159 | [info] + 417 bytes per instance 160 | [info] + 161 | [info] - Single-producer sending 162 | [info] + 6,000,000 ops 163 | [info] + 875,372,901 ns 164 | [info] + 6,854,221 ops/s 165 | [info] + 23.8 % of CPU usage 166 | [info] + 167 | [info] - Multi-producer sending 168 | [info] + 6,000,000 ops 169 | [info] + 1,286,449,620 ns 170 | [info] + 4,663,999 ops/s 171 | [info] + 77.1 % of CPU usage 172 | [info] + 173 | [info] - Max throughput 174 | [info] + 12,000,000 ops 175 | [info] + 583,182,579 ns 176 | [info] + 20,576,746 ops/s 177 | [info] + 91.5 % of CPU usage 178 | [info] + 179 | [info] - Ping latency 180 | [info] + 1,500,000 ops 181 | [info] + 1,632,932,960 ns 182 | [info] + p(0.00000) = 225 ns/op 183 | [info] + p(0.50000) = 991 ns/op 184 | [info] + p(0.90000) = 1559 ns/op 185 | [info] + p(0.99000) = 2287 ns/op 186 | [info] + p(0.99900) = 10815 ns/op 187 | [info] + p(0.99990) = 13247 ns/op 188 | [info] + p(0.99999) = 41727 ns/op 189 | [info] + p(1.00000) = 1417215 ns/op 190 | [info] + 83.5 % of CPU usage 191 | [info] + 192 | [info] - Ping throughput 10K 193 | [info] + 2,000,000 ops 194 | [info] + 733,202,062 ns 195 | [info] + 2,727,761 ops/s 196 | [info] + 99.4 % of CPU usage 197 | [info] + 198 | [info] - Overflow throughput 199 | [info] + 5,000,000 ops 200 | [info] + 725,635,458 ns 201 | [info] + 6,890,512 ops/s 202 | [info] + 22.6 % of CPU usage 203 | [info] + 204 | [info] AkkaMCUnboundedActorSpec: 205 | Executor service type: akka-forkjoin-pool 206 | [info] - Enqueueing 207 | [info] + 10,000,000 ops 208 | [info] + 659,288,996 ns 209 | [info] + 15,167,855 ops/s 210 | [info] + 13.8 % of CPU usage 211 | [info] + 48 bytes per instance 212 | [info] + 213 | [info] - Dequeueing 214 | [info] + 10,000,000 ops 215 | [info] + 1,148,201,174 ns 216 | [info] + 8,709,275 ops/s 217 | [info] + 14.9 % of CPU usage 218 | [info] + 219 | [info] - Initiation 220 | [info] + 100,000 ops 221 | [info] + 1,562,566,189 ns 222 | [info] + 15,625 ns/op 223 | [info] + 61.1 % of CPU usage 224 | [info] + 436 bytes per instance 225 | [info] + 226 | [info] - Single-producer sending 227 | [info] + 6,000,000 ops 228 | [info] + 1,078,143,922 ns 229 | [info] + 5,565,119 ops/s 230 | [info] + 21.7 % of CPU usage 231 | [info] + 232 | [info] - Multi-producer sending 233 | [info] + 6,000,000 ops 234 | [info] + 934,341,950 ns 235 | [info] + 6,421,631 ops/s 236 | [info] + 34.9 % of CPU usage 237 | [info] + 238 | [info] - Max throughput 239 | [info] + 12,000,000 ops 240 | [info] + 1,137,483,142 ns 241 | [info] + 10,549,606 ops/s 242 | [info] + 96.7 % of CPU usage 243 | [info] + 244 | [info] - Ping latency 245 | [info] + 1,500,000 ops 246 | [info] + 1,514,401,816 ns 247 | [info] + p(0.00000) = 237 ns/op 248 | [info] + p(0.50000) = 823 ns/op 249 | [info] + p(0.90000) = 1199 ns/op 250 | [info] + p(0.99000) = 2559 ns/op 251 | [info] + p(0.99900) = 8511 ns/op 252 | [info] + p(0.99990) = 25727 ns/op 253 | [info] + p(0.99999) = 749567 ns/op 254 | [info] + p(1.00000) = 56098815 ns/op 255 | [info] + 99.0 % of CPU usage 256 | [info] + 257 | [info] - Ping throughput 10K 258 | [info] + 2,000,000 ops 259 | [info] + 962,566,024 ns 260 | [info] + 2,077,779 ops/s 261 | [info] + 99.1 % of CPU usage 262 | [info] + 263 | [info] AkkaSCONonBlockingBoundedActorSpec: 264 | Executor service type: akka-forkjoin-pool 265 | [info] - Enqueueing 266 | [info] + 10,000,000 ops 267 | [info] + 641,539,181 ns 268 | [info] + 15,587,512 ops/s 269 | [info] + 13.8 % of CPU usage 270 | [info] + 48 bytes per instance 271 | [info] + 272 | [info] - Dequeueing 273 | [info] + 10,000,000 ops 274 | [info] + 914,593,971 ns 275 | [info] + 10,933,813 ops/s 276 | [info] + 14.6 % of CPU usage 277 | [info] + 278 | [info] - Initiation 279 | [info] + 100,000 ops 280 | [info] + 4,298,395,884 ns 281 | [info] + 42,983 ns/op 282 | [info] + 92.7 % of CPU usage 283 | [info] + 441 bytes per instance 284 | [info] + 285 | [info] - Single-producer sending 286 | [info] + 6,000,000 ops 287 | [info] + 831,487,498 ns 288 | [info] + 7,215,983 ops/s 289 | [info] + 23.2 % of CPU usage 290 | [info] + 291 | [info] - Multi-producer sending 292 | [info] + 6,000,000 ops 293 | [info] + 1,651,445,128 ns 294 | [info] + 3,633,181 ops/s 295 | [info] + 72.5 % of CPU usage 296 | [info] + 297 | [info] - Max throughput 298 | [info] + 12,000,000 ops 299 | [info] + 715,865,697 ns 300 | [info] + 16,762,920 ops/s 301 | [info] + 91.7 % of CPU usage 302 | [info] + 303 | [info] - Ping latency 304 | [info] + 1,500,000 ops 305 | [info] + 1,900,536,832 ns 306 | [info] + p(0.00000) = 256 ns/op 307 | [info] + p(0.50000) = 1143 ns/op 308 | [info] + p(0.90000) = 1831 ns/op 309 | [info] + p(0.99000) = 2767 ns/op 310 | [info] + p(0.99900) = 13823 ns/op 311 | [info] + p(0.99990) = 17151 ns/op 312 | [info] + p(0.99999) = 49919 ns/op 313 | [info] + p(1.00000) = 115199 ns/op 314 | [info] + 85.8 % of CPU usage 315 | [info] + 316 | [info] - Ping throughput 10K 317 | [info] + 2,000,000 ops 318 | [info] + 682,669,245 ns 319 | [info] + 2,929,676 ops/s 320 | [info] + 98.1 % of CPU usage 321 | [info] + 322 | [info] - Overflow throughput 323 | [info] + 5,000,000 ops 324 | [info] + 488,189,831 ns 325 | [info] + 10,241,917 ops/s 326 | [info] + 17.2 % of CPU usage 327 | [info] + 328 | [info] AkkaSCOUnboundedActorSpec: 329 | Executor service type: akka-forkjoin-pool 330 | [info] - Enqueueing 331 | [info] + 10,000,000 ops 332 | [info] + 433,413,604 ns 333 | [info] + 23,072,649 ops/s 334 | [info] + 14.4 % of CPU usage 335 | [info] + 48 bytes per instance 336 | [info] + 337 | [info] - Dequeueing 338 | [info] + 10,000,000 ops 339 | [info] + 807,255,021 ns 340 | [info] + 12,387,659 ops/s 341 | [info] + 14.7 % of CPU usage 342 | [info] + 343 | [info] - Initiation 344 | [info] + 100,000 ops 345 | [info] + 1,276,971,782 ns 346 | [info] + 12,769 ns/op 347 | [info] + 58.8 % of CPU usage 348 | [info] + 417 bytes per instance 349 | [info] + 350 | [info] - Single-producer sending 351 | [info] + 6,000,000 ops 352 | [info] + 1,066,150,170 ns 353 | [info] + 5,627,725 ops/s 354 | [info] + 23.3 % of CPU usage 355 | [info] + 356 | [info] - Multi-producer sending 357 | [info] + 6,000,000 ops 358 | [info] + 993,909,467 ns 359 | [info] + 6,036,767 ops/s 360 | [info] + 38.1 % of CPU usage 361 | [info] + 362 | [info] - Max throughput 363 | [info] + 12,000,000 ops 364 | [info] + 647,348,691 ns 365 | [info] + 18,537,150 ops/s 366 | [info] + 92.1 % of CPU usage 367 | [info] + 368 | [info] - Ping latency 369 | [info] + 1,500,000 ops 370 | [info] + 1,569,024,440 ns 371 | [info] + p(0.00000) = 214 ns/op 372 | [info] + p(0.50000) = 931 ns/op 373 | [info] + p(0.90000) = 1511 ns/op 374 | [info] + p(0.99000) = 2271 ns/op 375 | [info] + p(0.99900) = 10751 ns/op 376 | [info] + p(0.99990) = 12863 ns/op 377 | [info] + p(0.99999) = 33535 ns/op 378 | [info] + p(1.00000) = 10092543 ns/op 379 | [info] + 84.6 % of CPU usage 380 | [info] + 381 | [info] - Ping throughput 10K 382 | [info] + 2,000,000 ops 383 | [info] + 691,792,093 ns 384 | [info] + 2,891,042 ops/s 385 | [info] + 99.0 % of CPU usage 386 | [info] + 387 | [info] AkkaUnboundedActorSpec: 388 | Executor service type: akka-forkjoin-pool 389 | [info] - Enqueueing 390 | [info] + 10,000,000 ops 391 | [info] + 332,364,900 ns 392 | [info] + 30,087,412 ops/s 393 | [info] + 15.4 % of CPU usage 394 | [info] + 48 bytes per instance 395 | [info] + 396 | [info] - Dequeueing 397 | [info] + 10,000,000 ops 398 | [info] + 1,314,908,300 ns 399 | [info] + 7,605,093 ops/s 400 | [info] + 14.7 % of CPU usage 401 | [info] + 402 | [info] - Initiation 403 | [info] + 100,000 ops 404 | [info] + 4,063,749,835 ns 405 | [info] + 40,637 ns/op 406 | [info] + 94.7 % of CPU usage 407 | [info] + 443 bytes per instance 408 | [info] + 409 | [info] - Single-producer sending 410 | [info] + 6,000,000 ops 411 | [info] + 1,135,983,028 ns 412 | [info] + 5,281,769 ops/s 413 | [info] + 23.0 % of CPU usage 414 | [info] + 415 | [info] - Multi-producer sending 416 | [info] + 6,000,000 ops 417 | [info] + 935,023,451 ns 418 | [info] + 6,416,951 ops/s 419 | [info] + 68.3 % of CPU usage 420 | [info] + 421 | [info] - Max throughput 422 | [info] + 12,000,000 ops 423 | [info] + 459,821,998 ns 424 | [info] + 26,097,055 ops/s 425 | [info] + 87.3 % of CPU usage 426 | [info] + 427 | [info] - Ping latency 428 | [info] + 1,500,000 ops 429 | [info] + 1,763,652,609 ns 430 | [info] + p(0.00000) = 256 ns/op 431 | [info] + p(0.50000) = 1079 ns/op 432 | [info] + p(0.90000) = 1671 ns/op 433 | [info] + p(0.99000) = 2511 ns/op 434 | [info] + p(0.99900) = 9599 ns/op 435 | [info] + p(0.99990) = 15167 ns/op 436 | [info] + p(0.99999) = 36607 ns/op 437 | [info] + p(1.00000) = 303103 ns/op 438 | [info] + 81.9 % of CPU usage 439 | [info] + 440 | [info] - Ping throughput 10K 441 | [info] + 2,000,000 ops 442 | [info] + 1,003,464,191 ns 443 | [info] + 1,993,095 ops/s 444 | [info] + 98.9 % of CPU usage 445 | [info] + 446 | SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 447 | SLF4J: Defaulting to no-operation (NOP) logger implementation 448 | SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 449 | [info] LiftActorSpec: 450 | Executor service type: akka-forkjoin-pool 451 | [info] - Enqueueing 452 | [info] + 10,000,000 ops 453 | [info] + 392,721,077 ns 454 | [info] + 25,463,364 ops/s 455 | [info] + 13.7 % of CPU usage 456 | [info] + 23 bytes per instance 457 | [info] + 458 | [info] - Dequeueing 459 | [info] + 10,000,000 ops 460 | [info] + 650,763,447 ns 461 | [info] + 15,366,566 ops/s 462 | [info] + 15.0 % of CPU usage 463 | [info] + 464 | [info] - Initiation 465 | [info] + 10,000,000 ops 466 | [info] + 914,278,917 ns 467 | [info] + 91 ns/op 468 | [info] + 15.9 % of CPU usage 469 | [info] + 72 bytes per instance 470 | [info] + 471 | [info] - Single-producer sending 472 | [info] + 6,000,000 ops 473 | [info] + 698,073,683 ns 474 | [info] + 8,595,081 ops/s 475 | [info] + 28.5 % of CPU usage 476 | [info] + 477 | [info] - Multi-producer sending 478 | [info] + 6,000,000 ops 479 | [info] + 822,792,033 ns 480 | [info] + 7,292,243 ops/s 481 | [info] + 37.8 % of CPU usage 482 | [info] + 483 | [info] - Max throughput 484 | [info] + 12,000,000 ops 485 | [info] + 367,428,541 ns 486 | [info] + 32,659,411 ops/s 487 | [info] + 89.8 % of CPU usage 488 | [info] + 489 | [info] - Ping latency 490 | [info] + 1,500,000 ops 491 | [info] + 2,286,959,704 ns 492 | [info] + p(0.00000) = 386 ns/op 493 | [info] + p(0.50000) = 1375 ns/op 494 | [info] + p(0.90000) = 2143 ns/op 495 | [info] + p(0.99000) = 3503 ns/op 496 | [info] + p(0.99900) = 12735 ns/op 497 | [info] + p(0.99990) = 32127 ns/op 498 | [info] + p(0.99999) = 98303 ns/op 499 | [info] + p(1.00000) = 663551 ns/op 500 | [info] + 52.3 % of CPU usage 501 | [info] + 502 | [info] - Ping throughput 10K 503 | [info] + 2,000,000 ops 504 | [info] + 1,293,306,041 ns 505 | [info] + 1,546,424 ops/s 506 | [info] + 91.4 % of CPU usage 507 | [info] + 508 | Executor service type: akka-forkjoin-pool 509 | [info] MinimalistActorSpec: 510 | [info] - Enqueueing 511 | [info] + 40,000,000 ops 512 | [info] + 626,666,199 ns 513 | [info] + 63,829,834 ops/s 514 | [info] + 12.8 % of CPU usage 515 | [info] + 24 bytes per instance 516 | [info] + 517 | [info] - Dequeueing 518 | [info] + 40,000,000 ops 519 | [info] + 263,754,761 ns 520 | [info] + 151,656,030 ops/s 521 | [info] + 41.2 % of CPU usage 522 | [info] + 523 | [info] - Initiation 524 | [info] + 2,000,000 ops 525 | [info] + 995,523,115 ns 526 | [info] + 497 ns/op 527 | [info] + 97.4 % of CPU usage 528 | [info] + 25 bytes per instance 529 | [info] + 530 | [info] - Single-producer sending 531 | [info] + 15,000,000 ops 532 | [info] + 182,999,162 ns 533 | [info] + 81,967,588 ops/s 534 | [info] + 33.5 % of CPU usage 535 | [info] + 536 | [info] - Multi-producer sending 537 | [info] + 15,000,000 ops 538 | [info] + 1,241,293,803 ns 539 | [info] + 12,084,165 ops/s 540 | [info] + 98.2 % of CPU usage 541 | [info] + 542 | [info] - Max throughput 543 | [info] + 30,000,000 ops 544 | [info] + 1,316,861,545 ns 545 | [info] + 22,781,438 ops/s 546 | [info] + 99.3 % of CPU usage 547 | [info] + 548 | [info] - Ping latency 549 | [info] + 3,000,000 ops 550 | [info] + 3,603,941,507 ns 551 | [info] + p(0.00000) = 112 ns/op 552 | [info] + p(0.50000) = 481 ns/op 553 | [info] + p(0.90000) = 867 ns/op 554 | [info] + p(0.99000) = 1423 ns/op 555 | [info] + p(0.99900) = 4735 ns/op 556 | [info] + p(0.99990) = 46847 ns/op 557 | [info] + p(0.99999) = 20185087 ns/op 558 | [info] + p(1.00000) = 88080383 ns/op 559 | [info] + 99.1 % of CPU usage 560 | [info] + 561 | [info] - Ping throughput 10K 562 | [info] + 6,000,000 ops 563 | [info] + 1,166,336,739 ns 564 | [info] + 5,144,311 ops/s 565 | [info] + 99.8 % of CPU usage 566 | [info] + 567 | Executor service type: akka-forkjoin-pool 568 | [info] ScalazActorSpec: 569 | [info] - Enqueueing 570 | [info] + 40,000,000 ops 571 | [info] + 902,059,559 ns 572 | [info] + 44,342,970 ops/s 573 | [info] + 12.6 % of CPU usage 574 | [info] + 24 bytes per instance 575 | [info] + 576 | [info] - Dequeueing 577 | [info] + 40,000,000 ops 578 | [info] + 285,468,860 ns 579 | [info] + 140,120,361 ops/s 580 | [info] + 24.5 % of CPU usage 581 | [info] + 582 | [info] - Initiation 583 | [info] + 10,000,000 ops 584 | [info] + 354,501,545 ns 585 | [info] + 35 ns/op 586 | [info] + 23.3 % of CPU usage 587 | [info] + 88 bytes per instance 588 | [info] + 589 | [info] - Single-producer sending 590 | [info] + 15,000,000 ops 591 | [info] + 301,205,025 ns 592 | [info] + 49,799,965 ops/s 593 | [info] + 79.3 % of CPU usage 594 | [info] + 595 | [info] - Multi-producer sending 596 | [info] + 15,000,000 ops 597 | [info] + 492,363,406 ns 598 | [info] + 30,465,302 ops/s 599 | [info] + 87.8 % of CPU usage 600 | [info] + 601 | [info] - Max throughput 602 | [info] + 30,000,000 ops 603 | [info] + 693,019,445 ns 604 | [info] + 43,288,828 ops/s 605 | [info] + 93.4 % of CPU usage 606 | [info] + 607 | [info] - Ping latency 608 | [info] + 3,000,000 ops 609 | [info] + 2,537,854,617 ns 610 | [info] + p(0.00000) = 81 ns/op 611 | [info] + p(0.50000) = 411 ns/op 612 | [info] + p(0.90000) = 811 ns/op 613 | [info] + p(0.99000) = 2335 ns/op 614 | [info] + p(0.99900) = 9535 ns/op 615 | [info] + p(0.99990) = 36351 ns/op 616 | [info] + p(0.99999) = 712703 ns/op 617 | [info] + p(1.00000) = 80216063 ns/op 618 | [info] + 99.3 % of CPU usage 619 | [info] + 620 | [info] - Ping throughput 10K 621 | [info] + 6,000,000 ops 622 | [info] + 1,149,387,239 ns 623 | [info] + 5,220,172 ops/s 624 | [info] + 99.5 % of CPU usage 625 | [info] + 626 | [info] Run completed in 3 minutes, 11 seconds. 627 | [info] Total number of tests run: 99 628 | [info] Suites: completed 10, aborted 0 629 | [info] Tests: succeeded 99, failed 0, canceled 0, ignored 0, pending 0 630 | [info] All tests passed. 631 | [success] Total time: 193 s, completed Jul 12, 2017 9:24:01 PM 632 | [info] Loading global plugins from /home/andriy/.sbt/0.13/plugins 633 | [info] Loading project definition from /home/andriy/Projects/com/github/plokhotnyuk/actors/project 634 | [info] Set current project to actors (in build file:/home/andriy/Projects/com/github/plokhotnyuk/actors/) 635 | [info] ActorSpec: 636 | [info] actor with Akka fork-join pool executor 637 | [info] - execute code async 638 | [info] - exchange messages with another actor without loss 639 | [info] - create child actor and send messages to it recursively 640 | [info] - handle messages in order of sending by each thread 641 | [info] - doesn't handle messages in simultaneous threads 642 | [info] - redirect unhandled errors to uncaught exception handler of thread 643 | Exception in thread "ForkJoinPool-1-worker-1" java.lang.NullPointerException 644 | at com.github.gist.viktorklang.ActorSpec.failingAccumulator$1(ActorSpec.scala:136) 645 | at com.github.gist.viktorklang.ActorSpec.$anonfun$actorTests$34(ActorSpec.scala:138) 646 | at com.github.gist.viktorklang.Actor$$anon$1.com$github$gist$viktorklang$Actor$$anon$$act(Actor.scala:114) 647 | at com.github.gist.viktorklang.Actor$$anon$1$$anon$2.exec(Actor.scala:67) 648 | at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) 649 | at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) 650 | at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) 651 | at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 652 | [info] - handle messages with previous behaviour after unhandled errors 653 | [info] - don't starve tasks arriving from external submit under high internal traffic 654 | [info] actor with Java fork-join pool executor 655 | [info] - execute code async 656 | [info] - exchange messages with another actor without loss 657 | [info] - create child actor and send messages to it recursively 658 | [info] - handle messages in order of sending by each thread 659 | [info] - doesn't handle messages in simultaneous threads 660 | [info] - redirect unhandled errors to uncaught exception handler of thread 661 | Exception in thread "ForkJoinPool-1-worker-3" java.lang.NullPointerException 662 | at com.github.gist.viktorklang.ActorSpec.failingAccumulator$1(ActorSpec.scala:136) 663 | at com.github.gist.viktorklang.ActorSpec.$anonfun$actorTests$34(ActorSpec.scala:138) 664 | at com.github.gist.viktorklang.Actor$$anon$1.com$github$gist$viktorklang$Actor$$anon$$act(Actor.scala:114) 665 | at com.github.gist.viktorklang.Actor$$anon$1$$anon$3.exec(Actor.scala:77) 666 | at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 667 | at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) 668 | at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) 669 | at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 670 | [info] - handle messages with previous behaviour after unhandled errors 671 | [info] - don't starve tasks arriving from external submit under high internal traffic 672 | [info] actor with fixed thread pool executor 673 | [info] - execute code async 674 | [info] - exchange messages with another actor without loss 675 | [info] - create child actor and send messages to it recursively 676 | [info] - handle messages in order of sending by each thread 677 | [info] - doesn't handle messages in simultaneous threads 678 | [info] - redirect unhandled errors to uncaught exception handler of thread 679 | [info] - handle messages with previous behaviour after unhandled errors 680 | [info] - don't starve tasks arriving from external submit under high internal traffic 681 | Exception in thread "pool-3-thread-102" java.lang.NullPointerException 682 | Exception in thread "pool-3-thread-98" java.lang.NullPointerException 683 | [info] AkkaBoundedActorSpec: 684 | Executor service type: java-forkjoin-pool 685 | [info] - Enqueueing 686 | [info] + 10,000,000 ops 687 | [info] + 929,397,520 ns 688 | [info] + 10,759,658 ops/s 689 | [info] + 14.0 % of CPU usage 690 | [info] + 48 bytes per instance 691 | [info] + 692 | [info] - Dequeueing 693 | [info] + 10,000,000 ops 694 | [info] + 982,574,077 ns 695 | [info] + 10,177,349 ops/s 696 | [info] + 14.2 % of CPU usage 697 | [info] + 698 | [info] - Initiation 699 | [info] + 100,000 ops 700 | [info] + 1,095,919,468 ns 701 | [info] + 10,959 ns/op 702 | [info] + 48.8 % of CPU usage 703 | [info] + 599 bytes per instance 704 | [info] + 705 | [info] - Single-producer sending 706 | [info] + 6,000,000 ops 707 | [info] + 1,312,217,379 ns 708 | [info] + 4,572,413 ops/s 709 | [info] + 24.4 % of CPU usage 710 | [info] + 711 | [info] - Multi-producer sending 712 | [info] + 6,000,000 ops 713 | [info] + 1,207,259,819 ns 714 | [info] + 4,969,932 ops/s 715 | [info] + 32.6 % of CPU usage 716 | [info] + 717 | [info] - Max throughput 718 | [info] + 12,000,000 ops 719 | [info] + 695,153,131 ns 720 | [info] + 17,262,383 ops/s 721 | [info] + 95.5 % of CPU usage 722 | [info] + 723 | [info] - Ping latency 724 | [info] + 1,500,000 ops 725 | [info] + 1,649,254,628 ns 726 | [info] + p(0.00000) = 243 ns/op 727 | [info] + p(0.50000) = 1047 ns/op 728 | [info] + p(0.90000) = 1503 ns/op 729 | [info] + p(0.99000) = 2207 ns/op 730 | [info] + p(0.99900) = 5535 ns/op 731 | [info] + p(0.99990) = 10559 ns/op 732 | [info] + p(0.99999) = 31359 ns/op 733 | [info] + p(1.00000) = 411647 ns/op 734 | [info] + 59.4 % of CPU usage 735 | [info] + 736 | [info] - Ping throughput 10K 737 | [info] + 2,000,000 ops 738 | [info] + 741,422,198 ns 739 | [info] + 2,697,518 ops/s 740 | [info] + 98.6 % of CPU usage 741 | [info] + 742 | [info] - Overflow throughput 743 | [info] + 5,000,000 ops 744 | [info] + 1,241,890,516 ns 745 | [info] + 4,026,119 ops/s 746 | [info] + 18.0 % of CPU usage 747 | [info] + 748 | [info] AkkaMCNonBlockingBoundedActorSpec: 749 | Executor service type: java-forkjoin-pool 750 | [info] - Enqueueing 751 | [info] + 10,000,000 ops 752 | [info] + 663,118,880 ns 753 | [info] + 15,080,252 ops/s 754 | [info] + 13.9 % of CPU usage 755 | [info] + 48 bytes per instance 756 | [info] + 757 | [info] - Dequeueing 758 | [info] + 10,000,000 ops 759 | [info] + 807,212,715 ns 760 | [info] + 12,388,308 ops/s 761 | [info] + 15.3 % of CPU usage 762 | [info] + 763 | [info] - Initiation 764 | [info] + 100,000 ops 765 | [info] + 1,200,837,578 ns 766 | [info] + 12,008 ns/op 767 | [info] + 51.3 % of CPU usage 768 | [info] + 436 bytes per instance 769 | [info] + 770 | [info] - Single-producer sending 771 | [info] + 6,000,000 ops 772 | [info] + 1,234,820,566 ns 773 | [info] + 4,859,005 ops/s 774 | [info] + 25.1 % of CPU usage 775 | [info] + 776 | [info] - Multi-producer sending 777 | [info] + 6,000,000 ops 778 | [info] + 1,340,963,377 ns 779 | [info] + 4,474,395 ops/s 780 | [info] + 82.3 % of CPU usage 781 | [info] + 782 | [info] - Max throughput 783 | [info] + 12,000,000 ops 784 | [info] + 484,582,560 ns 785 | [info] + 24,763,582 ops/s 786 | [info] + 92.9 % of CPU usage 787 | [info] + 788 | [info] - Ping latency 789 | [info] + 1,500,000 ops 790 | [info] + 1,513,768,453 ns 791 | [info] + p(0.00000) = 219 ns/op 792 | [info] + p(0.50000) = 951 ns/op 793 | [info] + p(0.90000) = 1423 ns/op 794 | [info] + p(0.99000) = 2023 ns/op 795 | [info] + p(0.99900) = 6271 ns/op 796 | [info] + p(0.99990) = 10303 ns/op 797 | [info] + p(0.99999) = 28287 ns/op 798 | [info] + p(1.00000) = 430079 ns/op 799 | [info] + 63.5 % of CPU usage 800 | [info] + 801 | [info] - Ping throughput 10K 802 | [info] + 2,000,000 ops 803 | [info] + 971,466,652 ns 804 | [info] + 2,058,742 ops/s 805 | [info] + 99.3 % of CPU usage 806 | [info] + 807 | [info] - Overflow throughput 808 | [info] + 5,000,000 ops 809 | [info] + 700,129,980 ns 810 | [info] + 7,141,531 ops/s 811 | [info] + 21.1 % of CPU usage 812 | [info] + 813 | [info] AkkaMCUnboundedActorSpec: 814 | Executor service type: java-forkjoin-pool 815 | [info] - Enqueueing 816 | [info] + 10,000,000 ops 817 | [info] + 309,408,267 ns 818 | [info] + 32,319,756 ops/s 819 | [info] + 14.1 % of CPU usage 820 | [info] + 48 bytes per instance 821 | [info] + 822 | [info] - Dequeueing 823 | [info] + 10,000,000 ops 824 | [info] + 1,123,108,730 ns 825 | [info] + 8,903,857 ops/s 826 | [info] + 14.2 % of CPU usage 827 | [info] + 828 | [info] - Initiation 829 | [info] + 100,000 ops 830 | [info] + 1,049,964,611 ns 831 | [info] + 10,499 ns/op 832 | [info] + 47.3 % of CPU usage 833 | [info] + 407 bytes per instance 834 | [info] + 835 | [info] - Single-producer sending 836 | [info] + 6,000,000 ops 837 | [info] + 677,551,379 ns 838 | [info] + 8,855,417 ops/s 839 | [info] + 21.2 % of CPU usage 840 | [info] + 841 | [info] - Multi-producer sending 842 | [info] + 6,000,000 ops 843 | [info] + 675,017,069 ns 844 | [info] + 8,888,664 ops/s 845 | [info] + 35.2 % of CPU usage 846 | [info] + 847 | [info] - Max throughput 848 | [info] + 12,000,000 ops 849 | [info] + 599,095,177 ns 850 | [info] + 20,030,206 ops/s 851 | [info] + 79.9 % of CPU usage 852 | [info] + 853 | [info] - Ping latency 854 | [info] + 1,500,000 ops 855 | [info] + 1,976,191,257 ns 856 | [info] + p(0.00000) = 258 ns/op 857 | [info] + p(0.50000) = 1255 ns/op 858 | [info] + p(0.90000) = 1871 ns/op 859 | [info] + p(0.99000) = 2623 ns/op 860 | [info] + p(0.99900) = 7071 ns/op 861 | [info] + p(0.99990) = 13311 ns/op 862 | [info] + p(0.99999) = 37375 ns/op 863 | [info] + p(1.00000) = 765951 ns/op 864 | [info] + 63.5 % of CPU usage 865 | [info] + 866 | [info] - Ping throughput 10K 867 | [info] + 2,000,000 ops 868 | [info] + 930,650,633 ns 869 | [info] + 2,149,034 ops/s 870 | [info] + 99.1 % of CPU usage 871 | [info] + 872 | [info] AkkaSCONonBlockingBoundedActorSpec: 873 | Executor service type: java-forkjoin-pool 874 | [info] - Enqueueing 875 | [info] + 10,000,000 ops 876 | [info] + 684,357,505 ns 877 | [info] + 14,612,245 ops/s 878 | [info] + 13.7 % of CPU usage 879 | [info] + 48 bytes per instance 880 | [info] + 881 | [info] - Dequeueing 882 | [info] + 10,000,000 ops 883 | [info] + 841,184,330 ns 884 | [info] + 11,888,000 ops/s 885 | [info] + 14.4 % of CPU usage 886 | [info] + 887 | [info] - Initiation 888 | [info] + 100,000 ops 889 | [info] + 1,369,472,266 ns 890 | [info] + 13,694 ns/op 891 | [info] + 58.8 % of CPU usage 892 | [info] + 416 bytes per instance 893 | [info] + 894 | [info] - Single-producer sending 895 | [info] + 6,000,000 ops 896 | [info] + 1,182,876,540 ns 897 | [info] + 5,072,380 ops/s 898 | [info] + 23.0 % of CPU usage 899 | [info] + 900 | [info] - Multi-producer sending 901 | [info] + 6,000,000 ops 902 | [info] + 1,693,943,814 ns 903 | [info] + 3,542,030 ops/s 904 | [info] + 81.0 % of CPU usage 905 | [info] + 906 | [info] - Max throughput 907 | [info] + 12,000,000 ops 908 | [info] + 531,590,569 ns 909 | [info] + 22,573,763 ops/s 910 | [info] + 86.5 % of CPU usage 911 | [info] + 912 | [info] - Ping latency 913 | [info] + 1,500,000 ops 914 | [info] + 1,554,560,140 ns 915 | [info] + p(0.00000) = 215 ns/op 916 | [info] + p(0.50000) = 971 ns/op 917 | [info] + p(0.90000) = 1463 ns/op 918 | [info] + p(0.99000) = 2191 ns/op 919 | [info] + p(0.99900) = 6975 ns/op 920 | [info] + p(0.99990) = 12159 ns/op 921 | [info] + p(0.99999) = 48383 ns/op 922 | [info] + p(1.00000) = 622591 ns/op 923 | [info] + 62.2 % of CPU usage 924 | [info] + 925 | [info] - Ping throughput 10K 926 | [info] + 2,000,000 ops 927 | [info] + 813,369,216 ns 928 | [info] + 2,458,907 ops/s 929 | [info] + 98.4 % of CPU usage 930 | [info] + 931 | [info] - Overflow throughput 932 | [info] + 5,000,000 ops 933 | [info] + 553,508,442 ns 934 | [info] + 9,033,285 ops/s 935 | [info] + 21.9 % of CPU usage 936 | [info] + 937 | [info] AkkaSCOUnboundedActorSpec: 938 | Executor service type: java-forkjoin-pool 939 | [info] - Enqueueing 940 | [info] + 10,000,000 ops 941 | [info] + 304,219,215 ns 942 | [info] + 32,871,033 ops/s 943 | [info] + 14.4 % of CPU usage 944 | [info] + 48 bytes per instance 945 | [info] + 946 | [info] - Dequeueing 947 | [info] + 10,000,000 ops 948 | [info] + 832,622,220 ns 949 | [info] + 12,010,248 ops/s 950 | [info] + 15.0 % of CPU usage 951 | [info] + 952 | [info] - Initiation 953 | [info] + 100,000 ops 954 | [info] + 1,477,407,643 ns 955 | [info] + 14,774 ns/op 956 | [info] + 86.4 % of CPU usage 957 | [info] + 607 bytes per instance 958 | [info] + 959 | [info] - Single-producer sending 960 | [info] + 6,000,000 ops 961 | [info] + 778,832,705 ns 962 | [info] + 7,703,836 ops/s 963 | [info] + 23.0 % of CPU usage 964 | [info] + 965 | [info] - Multi-producer sending 966 | [info] + 6,000,000 ops 967 | [info] + 740,858,902 ns 968 | [info] + 8,098,708 ops/s 969 | [info] + 37.3 % of CPU usage 970 | [info] + 971 | [info] - Max throughput 972 | [info] + 12,000,000 ops 973 | [info] + 427,351,311 ns 974 | [info] + 28,079,941 ops/s 975 | [info] + 86.6 % of CPU usage 976 | [info] + 977 | [info] - Ping latency 978 | [info] + 1,500,000 ops 979 | [info] + 1,508,117,011 ns 980 | [info] + p(0.00000) = 209 ns/op 981 | [info] + p(0.50000) = 943 ns/op 982 | [info] + p(0.90000) = 1431 ns/op 983 | [info] + p(0.99000) = 2031 ns/op 984 | [info] + p(0.99900) = 5855 ns/op 985 | [info] + p(0.99990) = 9791 ns/op 986 | [info] + p(0.99999) = 42495 ns/op 987 | [info] + p(1.00000) = 638975 ns/op 988 | [info] + 65.2 % of CPU usage 989 | [info] + 990 | [info] - Ping throughput 10K 991 | [info] + 2,000,000 ops 992 | [info] + 900,765,603 ns 993 | [info] + 2,220,333 ops/s 994 | [info] + 99.8 % of CPU usage 995 | [info] + 996 | [info] AkkaUnboundedActorSpec: 997 | Executor service type: java-forkjoin-pool 998 | [info] - Enqueueing 999 | [info] + 10,000,000 ops 1000 | [info] + 475,032,717 ns 1001 | [info] + 21,051,181 ops/s 1002 | [info] + 15.0 % of CPU usage 1003 | [info] + 48 bytes per instance 1004 | [info] + 1005 | [info] - Dequeueing 1006 | [info] + 10,000,000 ops 1007 | [info] + 936,449,808 ns 1008 | [info] + 10,678,628 ops/s 1009 | [info] + 14.7 % of CPU usage 1010 | [info] + 1011 | [info] - Initiation 1012 | [info] + 100,000 ops 1013 | [info] + 1,197,197,085 ns 1014 | [info] + 11,971 ns/op 1015 | [info] + 52.0 % of CPU usage 1016 | [info] + 438 bytes per instance 1017 | [info] + 1018 | [info] - Single-producer sending 1019 | [info] + 6,000,000 ops 1020 | [info] + 1,177,472,828 ns 1021 | [info] + 5,095,658 ops/s 1022 | [info] + 22.5 % of CPU usage 1023 | [info] + 1024 | [info] - Multi-producer sending 1025 | [info] + 6,000,000 ops 1026 | [info] + 1,022,245,487 ns 1027 | [info] + 5,869,431 ops/s 1028 | [info] + 65.2 % of CPU usage 1029 | [info] + 1030 | [info] - Max throughput 1031 | [info] + 12,000,000 ops 1032 | [info] + 603,911,783 ns 1033 | [info] + 19,870,451 ops/s 1034 | [info] + 89.2 % of CPU usage 1035 | [info] + 1036 | [info] - Ping latency 1037 | [info] + 1,500,000 ops 1038 | [info] + 1,637,101,931 ns 1039 | [info] + p(0.00000) = 231 ns/op 1040 | [info] + p(0.50000) = 1019 ns/op 1041 | [info] + p(0.90000) = 1575 ns/op 1042 | [info] + p(0.99000) = 2335 ns/op 1043 | [info] + p(0.99900) = 4927 ns/op 1044 | [info] + p(0.99990) = 10431 ns/op 1045 | [info] + p(0.99999) = 31871 ns/op 1046 | [info] + p(1.00000) = 954367 ns/op 1047 | [info] + 62.0 % of CPU usage 1048 | [info] + 1049 | [info] - Ping throughput 10K 1050 | [info] + 2,000,000 ops 1051 | [info] + 857,366,283 ns 1052 | [info] + 2,332,725 ops/s 1053 | [info] + 99.7 % of CPU usage 1054 | [info] + 1055 | SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 1056 | SLF4J: Defaulting to no-operation (NOP) logger implementation 1057 | SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 1058 | [info] LiftActorSpec: 1059 | Executor service type: java-forkjoin-pool 1060 | [info] - Enqueueing 1061 | [info] + 10,000,000 ops 1062 | [info] + 387,581,380 ns 1063 | [info] + 25,801,033 ops/s 1064 | [info] + 13.9 % of CPU usage 1065 | [info] + 23 bytes per instance 1066 | [info] + 1067 | [info] - Dequeueing 1068 | [info] + 10,000,000 ops 1069 | [info] + 466,240,610 ns 1070 | [info] + 21,448,153 ops/s 1071 | [info] + 15.3 % of CPU usage 1072 | [info] + 1073 | [info] - Initiation 1074 | [info] + 10,000,000 ops 1075 | [info] + 672,011,368 ns 1076 | [info] + 67 ns/op 1077 | [info] + 16.0 % of CPU usage 1078 | [info] + 72 bytes per instance 1079 | [info] + 1080 | [info] - Single-producer sending 1081 | [info] + 6,000,000 ops 1082 | [info] + 741,678,495 ns 1083 | [info] + 8,089,758 ops/s 1084 | [info] + 29.0 % of CPU usage 1085 | [info] + 1086 | [info] - Multi-producer sending 1087 | [info] + 6,000,000 ops 1088 | [info] + 787,666,679 ns 1089 | [info] + 7,617,435 ops/s 1090 | [info] + 38.2 % of CPU usage 1091 | [info] + 1092 | [info] - Max throughput 1093 | [info] + 12,000,000 ops 1094 | [info] + 315,539,758 ns 1095 | [info] + 38,030,072 ops/s 1096 | [info] + 87.2 % of CPU usage 1097 | [info] + 1098 | [info] - Ping latency 1099 | [info] + 1,500,000 ops 1100 | [info] + 2,006,875,444 ns 1101 | [info] + p(0.00000) = 342 ns/op 1102 | [info] + p(0.50000) = 1223 ns/op 1103 | [info] + p(0.90000) = 1855 ns/op 1104 | [info] + p(0.99000) = 3503 ns/op 1105 | [info] + p(0.99900) = 11711 ns/op 1106 | [info] + p(0.99990) = 50431 ns/op 1107 | [info] + p(0.99999) = 206847 ns/op 1108 | [info] + p(1.00000) = 5210111 ns/op 1109 | [info] + 46.9 % of CPU usage 1110 | [info] + 1111 | [info] - Ping throughput 10K 1112 | [info] + 2,000,000 ops 1113 | [info] + 2,574,409,648 ns 1114 | [info] + 776,877 ops/s 1115 | [info] + 77.6 % of CPU usage 1116 | [info] + 1117 | Executor service type: java-forkjoin-pool 1118 | [info] MinimalistActorSpec: 1119 | [info] - Enqueueing 1120 | [info] + 40,000,000 ops 1121 | [info] + 900,200,659 ns 1122 | [info] + 44,434,537 ops/s 1123 | [info] + 12.8 % of CPU usage 1124 | [info] + 24 bytes per instance 1125 | [info] + 1126 | [info] - Dequeueing 1127 | [info] + 40,000,000 ops 1128 | [info] + 297,468,461 ns 1129 | [info] + 134,468,036 ops/s 1130 | [info] + 23.1 % of CPU usage 1131 | [info] + 1132 | [info] - Initiation 1133 | [info] + 2,000,000 ops 1134 | [info] + 1,746,725,267 ns 1135 | [info] + 873 ns/op 1136 | [info] + 98.6 % of CPU usage 1137 | [info] + 26 bytes per instance 1138 | [info] + 1139 | [info] - Single-producer sending 1140 | [info] + 15,000,000 ops 1141 | [info] + 293,710,937 ns 1142 | [info] + 51,070,621 ops/s 1143 | [info] + 32.8 % of CPU usage 1144 | [info] + 1145 | [info] - Multi-producer sending 1146 | [info] + 15,000,000 ops 1147 | [info] + 776,058,937 ns 1148 | [info] + 19,328,428 ops/s 1149 | [info] + 94.7 % of CPU usage 1150 | [info] + 1151 | [info] - Max throughput 1152 | [info] + 30,000,000 ops 1153 | [info] + 974,160,252 ns 1154 | [info] + 30,795,754 ops/s 1155 | [info] + 98.9 % of CPU usage 1156 | [info] + 1157 | [info] - Ping latency 1158 | [info] + 3,000,000 ops 1159 | [info] + 3,495,406,459 ns 1160 | [info] + p(0.00000) = 115 ns/op 1161 | [info] + p(0.50000) = 523 ns/op 1162 | [info] + p(0.90000) = 935 ns/op 1163 | [info] + p(0.99000) = 1511 ns/op 1164 | [info] + p(0.99900) = 3279 ns/op 1165 | [info] + p(0.99990) = 52991 ns/op 1166 | [info] + p(0.99999) = 20185087 ns/op 1167 | [info] + p(1.00000) = 92274687 ns/op 1168 | [info] + 99.3 % of CPU usage 1169 | [info] + 1170 | [info] - Ping throughput 10K 1171 | [info] + 6,000,000 ops 1172 | [info] + 1,659,452,834 ns 1173 | [info] + 3,615,649 ops/s 1174 | [info] + 99.8 % of CPU usage 1175 | [info] + 1176 | Executor service type: java-forkjoin-pool 1177 | [info] ScalazActorSpec: 1178 | [info] - Enqueueing 1179 | [info] + 40,000,000 ops 1180 | [info] + 902,101,276 ns 1181 | [info] + 44,340,919 ops/s 1182 | [info] + 12.7 % of CPU usage 1183 | [info] + 24 bytes per instance 1184 | [info] + 1185 | [info] - Dequeueing 1186 | [info] + 40,000,000 ops 1187 | [info] + 273,381,425 ns 1188 | [info] + 146,315,719 ops/s 1189 | [info] + 23.3 % of CPU usage 1190 | [info] + 1191 | [info] - Initiation 1192 | [info] + 10,000,000 ops 1193 | [info] + 368,816,569 ns 1194 | [info] + 36 ns/op 1195 | [info] + 20.7 % of CPU usage 1196 | [info] + 88 bytes per instance 1197 | [info] + 1198 | [info] - Single-producer sending 1199 | [info] + 15,000,000 ops 1200 | [info] + 404,139,247 ns 1201 | [info] + 37,115,920 ops/s 1202 | [info] + 79.2 % of CPU usage 1203 | [info] + 1204 | [info] - Multi-producer sending 1205 | [info] + 15,000,000 ops 1206 | [info] + 626,342,664 ns 1207 | [info] + 23,948,552 ops/s 1208 | [info] + 87.8 % of CPU usage 1209 | [info] + 1210 | [info] - Max throughput 1211 | [info] + 30,000,000 ops 1212 | [info] + 715,058,158 ns 1213 | [info] + 41,954,629 ops/s 1214 | [info] + 94.9 % of CPU usage 1215 | [info] + 1216 | [info] - Ping latency 1217 | [info] + 3,000,000 ops 1218 | [info] + 2,031,407,292 ns 1219 | [info] + p(0.00000) = 85 ns/op 1220 | [info] + p(0.50000) = 385 ns/op 1221 | [info] + p(0.90000) = 695 ns/op 1222 | [info] + p(0.99000) = 1119 ns/op 1223 | [info] + p(0.99900) = 4415 ns/op 1224 | [info] + p(0.99990) = 26623 ns/op 1225 | [info] + p(0.99999) = 93695 ns/op 1226 | [info] + p(1.00000) = 84410367 ns/op 1227 | [info] + 98.7 % of CPU usage 1228 | [info] + 1229 | [info] - Ping throughput 10K 1230 | [info] + 6,000,000 ops 1231 | [info] + 1,217,220,533 ns 1232 | [info] + 4,929,262 ops/s 1233 | [info] + 99.6 % of CPU usage 1234 | [info] + 1235 | [info] Run completed in 3 minutes, 3 seconds. 1236 | [info] Total number of tests run: 99 1237 | [info] Suites: completed 10, aborted 0 1238 | [info] Tests: succeeded 99, failed 0, canceled 0, ignored 0, pending 0 1239 | [info] All tests passed. 1240 | [success] Total time: 184 s, completed Jul 12, 2017 9:27:11 PM 1241 | [info] Loading global plugins from /home/andriy/.sbt/0.13/plugins 1242 | [info] Loading project definition from /home/andriy/Projects/com/github/plokhotnyuk/actors/project 1243 | [info] Set current project to actors (in build file:/home/andriy/Projects/com/github/plokhotnyuk/actors/) 1244 | [info] ActorSpec: 1245 | [info] actor with Akka fork-join pool executor 1246 | [info] - execute code async 1247 | [info] - exchange messages with another actor without loss 1248 | [info] - create child actor and send messages to it recursively 1249 | [info] - handle messages in order of sending by each thread 1250 | [info] - doesn't handle messages in simultaneous threads 1251 | [info] - redirect unhandled errors to uncaught exception handler of thread 1252 | Exception in thread "ForkJoinPool-1-worker-7" java.lang.NullPointerException 1253 | at com.github.gist.viktorklang.ActorSpec.failingAccumulator$1(ActorSpec.scala:136) 1254 | at com.github.gist.viktorklang.ActorSpec.$anonfun$actorTests$34(ActorSpec.scala:138) 1255 | at com.github.gist.viktorklang.Actor$$anon$1.com$github$gist$viktorklang$Actor$$anon$$act(Actor.scala:114) 1256 | at com.github.gist.viktorklang.Actor$$anon$1$$anon$2.exec(Actor.scala:67) 1257 | at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) 1258 | at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) 1259 | at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) 1260 | at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 1261 | [info] - handle messages with previous behaviour after unhandled errors 1262 | [info] - don't starve tasks arriving from external submit under high internal traffic 1263 | [info] actor with Java fork-join pool executor 1264 | [info] - execute code async 1265 | [info] - exchange messages with another actor without loss 1266 | [info] - create child actor and send messages to it recursively 1267 | [info] - handle messages in order of sending by each thread 1268 | [info] - doesn't handle messages in simultaneous threads 1269 | [info] - redirect unhandled errors to uncaught exception handler of thread 1270 | [info] - handle messages with previous behaviour after unhandled errors 1271 | Exception in thread "ForkJoinPool-1-worker-2" java.lang.NullPointerException 1272 | at com.github.gist.viktorklang.ActorSpec.failingAccumulator$1(ActorSpec.scala:136) 1273 | at com.github.gist.viktorklang.ActorSpec.$anonfun$actorTests$34(ActorSpec.scala:138) 1274 | at com.github.gist.viktorklang.Actor$$anon$1.com$github$gist$viktorklang$Actor$$anon$$act(Actor.scala:114) 1275 | at com.github.gist.viktorklang.Actor$$anon$1$$anon$3.exec(Actor.scala:77) 1276 | at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 1277 | at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) 1278 | at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) 1279 | at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) 1280 | [info] - don't starve tasks arriving from external submit under high internal traffic 1281 | [info] actor with fixed thread pool executor 1282 | [info] - execute code async 1283 | [info] - exchange messages with another actor without loss 1284 | [info] - create child actor and send messages to it recursively 1285 | [info] - handle messages in order of sending by each thread 1286 | [info] - doesn't handle messages in simultaneous threads 1287 | [info] - redirect unhandled errors to uncaught exception handler of thread 1288 | [info] - handle messages with previous behaviour after unhandled errors 1289 | [info] - don't starve tasks arriving from external submit under high internal traffic 1290 | [info] AkkaBoundedActorSpec: 1291 | Executor service type: abq-thread-pool 1292 | [info] - Enqueueing 1293 | [info] + 10,000,000 ops 1294 | [info] + 731,193,417 ns 1295 | [info] + 13,676,271 ops/s 1296 | [info] + 14.7 % of CPU usage 1297 | [info] + 48 bytes per instance 1298 | [info] + 1299 | [info] - Dequeueing 1300 | [info] + 10,000,000 ops 1301 | [info] + 1,438,532,321 ns 1302 | [info] + 6,951,529 ops/s 1303 | [info] + 15.6 % of CPU usage 1304 | [info] + 1305 | [info] - Initiation 1306 | [info] + 100,000 ops 1307 | [info] + 1,402,210,379 ns 1308 | [info] + 14,022 ns/op 1309 | [info] + 45.6 % of CPU usage 1310 | [info] + 584 bytes per instance 1311 | [info] + 1312 | [info] - Single-producer sending 1313 | [info] + 6,000,000 ops 1314 | [info] + 1,336,013,876 ns 1315 | [info] + 4,490,971 ops/s 1316 | [info] + 24.3 % of CPU usage 1317 | [info] + 1318 | [info] - Multi-producer sending 1319 | [info] + 6,000,000 ops 1320 | [info] + 1,355,853,862 ns 1321 | [info] + 4,425,255 ops/s 1322 | [info] + 30.7 % of CPU usage 1323 | [info] + 1324 | [info] - Max throughput 1325 | [info] + 12,000,000 ops 1326 | [info] + 580,014,049 ns 1327 | [info] + 20,689,154 ops/s 1328 | [info] + 80.8 % of CPU usage 1329 | [info] + 1330 | [info] - Ping latency 1331 | [info] + 1,500,000 ops 1332 | [info] + 5,256,216,885 ns 1333 | [info] + p(0.00000) = 324 ns/op 1334 | [info] + p(0.50000) = 461 ns/op 1335 | [info] + p(0.90000) = 2463 ns/op 1336 | [info] + p(0.99000) = 76799 ns/op 1337 | [info] + p(0.99900) = 160767 ns/op 1338 | [info] + p(0.99990) = 250879 ns/op 1339 | [info] + p(0.99999) = 323583 ns/op 1340 | [info] + p(1.00000) = 991231 ns/op 1341 | [info] + 18.0 % of CPU usage 1342 | [info] + 1343 | [info] - Ping throughput 10K 1344 | [info] + 2,000,000 ops 1345 | [info] + 1,901,831,136 ns 1346 | [info] + 1,051,618 ops/s 1347 | [info] + 38.5 % of CPU usage 1348 | [info] + 1349 | [info] - Overflow throughput 1350 | [info] + 5,000,000 ops 1351 | [info] + 656,638,172 ns 1352 | [info] + 7,614,543 ops/s 1353 | [info] + 14.8 % of CPU usage 1354 | [info] + 1355 | [info] AkkaMCNonBlockingBoundedActorSpec: 1356 | Executor service type: abq-thread-pool 1357 | [info] - Enqueueing 1358 | [info] + 10,000,000 ops 1359 | [info] + 487,295,947 ns 1360 | [info] + 20,521,410 ops/s 1361 | [info] + 14.6 % of CPU usage 1362 | [info] + 48 bytes per instance 1363 | [info] + 1364 | [info] - Dequeueing 1365 | [info] + 10,000,000 ops 1366 | [info] + 851,752,076 ns 1367 | [info] + 11,740,505 ops/s 1368 | [info] + 15.6 % of CPU usage 1369 | [info] + 1370 | [info] - Initiation 1371 | [info] + 100,000 ops 1372 | [info] + 1,072,545,554 ns 1373 | [info] + 10,725 ns/op 1374 | [info] + 43.1 % of CPU usage 1375 | [info] + 379 bytes per instance 1376 | [info] + 1377 | [info] - Single-producer sending 1378 | [info] + 6,000,000 ops 1379 | [info] + 857,421,510 ns 1380 | [info] + 6,997,725 ops/s 1381 | [info] + 24.1 % of CPU usage 1382 | [info] + 1383 | [info] - Multi-producer sending 1384 | [info] + 6,000,000 ops 1385 | [info] + 1,327,178,368 ns 1386 | [info] + 4,520,869 ops/s 1387 | [info] + 73.0 % of CPU usage 1388 | [info] + 1389 | [info] - Max throughput 1390 | [info] + 12,000,000 ops 1391 | [info] + 521,688,294 ns 1392 | [info] + 23,002,241 ops/s 1393 | [info] + 68.5 % of CPU usage 1394 | [info] + 1395 | [info] - Ping latency 1396 | [info] + 1,500,000 ops 1397 | [info] + 7,482,941,733 ns 1398 | [info] + p(0.00000) = 278 ns/op 1399 | [info] + p(0.50000) = 611 ns/op 1400 | [info] + p(0.90000) = 19455 ns/op 1401 | [info] + p(0.99000) = 54015 ns/op 1402 | [info] + p(0.99900) = 98303 ns/op 1403 | [info] + p(0.99990) = 163839 ns/op 1404 | [info] + p(0.99999) = 344063 ns/op 1405 | [info] + p(1.00000) = 1638399 ns/op 1406 | [info] + 17.9 % of CPU usage 1407 | [info] + 1408 | [info] - Ping throughput 10K 1409 | [info] + 2,000,000 ops 1410 | [info] + 1,910,260,643 ns 1411 | [info] + 1,046,977 ops/s 1412 | [info] + 37.4 % of CPU usage 1413 | [info] + 1414 | [info] - Overflow throughput 1415 | [info] + 5,000,000 ops 1416 | [info] + 493,825,050 ns 1417 | [info] + 10,125,043 ops/s 1418 | [info] + 19.0 % of CPU usage 1419 | [info] + 1420 | [info] AkkaMCUnboundedActorSpec: 1421 | Executor service type: abq-thread-pool 1422 | [info] - Enqueueing 1423 | [info] + 10,000,000 ops 1424 | [info] + 437,795,947 ns 1425 | [info] + 22,841,691 ops/s 1426 | [info] + 14.3 % of CPU usage 1427 | [info] + 48 bytes per instance 1428 | [info] + 1429 | [info] - Dequeueing 1430 | [info] + 10,000,000 ops 1431 | [info] + 855,003,268 ns 1432 | [info] + 11,695,861 ops/s 1433 | [info] + 15.5 % of CPU usage 1434 | [info] + 1435 | [info] - Initiation 1436 | [info] + 100,000 ops 1437 | [info] + 1,063,247,874 ns 1438 | [info] + 10,632 ns/op 1439 | [info] + 42.7 % of CPU usage 1440 | [info] + 400 bytes per instance 1441 | [info] + 1442 | [info] - Single-producer sending 1443 | [info] + 6,000,000 ops 1444 | [info] + 786,317,528 ns 1445 | [info] + 7,630,505 ops/s 1446 | [info] + 21.8 % of CPU usage 1447 | [info] + 1448 | [info] - Multi-producer sending 1449 | [info] + 6,000,000 ops 1450 | [info] + 720,922,535 ns 1451 | [info] + 8,322,669 ops/s 1452 | [info] + 33.5 % of CPU usage 1453 | [info] + 1454 | [info] - Max throughput 1455 | [info] + 12,000,000 ops 1456 | [info] + 456,255,682 ns 1457 | [info] + 26,301,042 ops/s 1458 | [info] + 61.1 % of CPU usage 1459 | [info] + 1460 | [info] - Ping latency 1461 | [info] + 1,500,000 ops 1462 | [info] + 5,929,800,872 ns 1463 | [info] + p(0.00000) = 250 ns/op 1464 | [info] + p(0.50000) = 447 ns/op 1465 | [info] + p(0.90000) = 12735 ns/op 1466 | [info] + p(0.99000) = 65023 ns/op 1467 | [info] + p(0.99900) = 127999 ns/op 1468 | [info] + p(0.99990) = 212991 ns/op 1469 | [info] + p(0.99999) = 350207 ns/op 1470 | [info] + p(1.00000) = 806911 ns/op 1471 | [info] + 17.7 % of CPU usage 1472 | [info] + 1473 | [info] - Ping throughput 10K 1474 | [info] + 2,000,000 ops 1475 | [info] + 1,948,703,968 ns 1476 | [info] + 1,026,323 ops/s 1477 | [info] + 37.2 % of CPU usage 1478 | [info] + 1479 | [info] AkkaSCONonBlockingBoundedActorSpec: 1480 | Executor service type: abq-thread-pool 1481 | [info] - Enqueueing 1482 | [info] + 10,000,000 ops 1483 | [info] + 476,318,558 ns 1484 | [info] + 20,994,353 ops/s 1485 | [info] + 13.9 % of CPU usage 1486 | [info] + 48 bytes per instance 1487 | [info] + 1488 | [info] - Dequeueing 1489 | [info] + 10,000,000 ops 1490 | [info] + 883,346,820 ns 1491 | [info] + 11,320,581 ops/s 1492 | [info] + 16.1 % of CPU usage 1493 | [info] + 1494 | [info] - Initiation 1495 | [info] + 100,000 ops 1496 | [info] + 1,097,053,257 ns 1497 | [info] + 10,970 ns/op 1498 | [info] + 45.9 % of CPU usage 1499 | [info] + 400 bytes per instance 1500 | [info] + 1501 | [info] - Single-producer sending 1502 | [info] + 6,000,000 ops 1503 | [info] + 828,587,307 ns 1504 | [info] + 7,241,240 ops/s 1505 | [info] + 22.9 % of CPU usage 1506 | [info] + 1507 | [info] - Multi-producer sending 1508 | [info] + 6,000,000 ops 1509 | [info] + 1,405,284,835 ns 1510 | [info] + 4,269,597 ops/s 1511 | [info] + 77.7 % of CPU usage 1512 | [info] + 1513 | [info] - Max throughput 1514 | [info] + 12,000,000 ops 1515 | [info] + 501,856,353 ns 1516 | [info] + 23,911,224 ops/s 1517 | [info] + 69.7 % of CPU usage 1518 | [info] + 1519 | [info] - Ping latency 1520 | [info] + 1,500,000 ops 1521 | [info] + 7,910,657,730 ns 1522 | [info] + p(0.00000) = 272 ns/op 1523 | [info] + p(0.50000) = 643 ns/op 1524 | [info] + p(0.90000) = 19711 ns/op 1525 | [info] + p(0.99000) = 56575 ns/op 1526 | [info] + p(0.99900) = 99839 ns/op 1527 | [info] + p(0.99990) = 169983 ns/op 1528 | [info] + p(0.99999) = 362495 ns/op 1529 | [info] + p(1.00000) = 679935 ns/op 1530 | [info] + 17.7 % of CPU usage 1531 | [info] + 1532 | [info] - Ping throughput 10K 1533 | [info] + 2,000,000 ops 1534 | [info] + 1,615,142,708 ns 1535 | [info] + 1,238,280 ops/s 1536 | [info] + 39.3 % of CPU usage 1537 | [info] + 1538 | [info] - Overflow throughput 1539 | [info] + 5,000,000 ops 1540 | [info] + 403,926,065 ns 1541 | [info] + 12,378,502 ops/s 1542 | [info] + 17.6 % of CPU usage 1543 | [info] + 1544 | [info] AkkaSCOUnboundedActorSpec: 1545 | Executor service type: abq-thread-pool 1546 | [info] - Enqueueing 1547 | [info] + 10,000,000 ops 1548 | [info] + 435,687,320 ns 1549 | [info] + 22,952,240 ops/s 1550 | [info] + 14.3 % of CPU usage 1551 | [info] + 48 bytes per instance 1552 | [info] + 1553 | [info] - Dequeueing 1554 | [info] + 10,000,000 ops 1555 | [info] + 843,074,797 ns 1556 | [info] + 11,861,343 ops/s 1557 | [info] + 15.3 % of CPU usage 1558 | [info] + 1559 | [info] - Initiation 1560 | [info] + 100,000 ops 1561 | [info] + 1,413,574,219 ns 1562 | [info] + 14,135 ns/op 1563 | [info] + 43.7 % of CPU usage 1564 | [info] + 379 bytes per instance 1565 | [info] + 1566 | [info] - Single-producer sending 1567 | [info] + 6,000,000 ops 1568 | [info] + 1,006,026,288 ns 1569 | [info] + 5,964,058 ops/s 1570 | [info] + 22.1 % of CPU usage 1571 | [info] + 1572 | [info] - Multi-producer sending 1573 | [info] + 6,000,000 ops 1574 | [info] + 925,570,239 ns 1575 | [info] + 6,482,490 ops/s 1576 | [info] + 35.7 % of CPU usage 1577 | [info] + 1578 | [info] - Max throughput 1579 | [info] + 12,000,000 ops 1580 | [info] + 412,335,741 ns 1581 | [info] + 29,102,497 ops/s 1582 | [info] + 74.6 % of CPU usage 1583 | [info] + 1584 | [info] - Ping latency 1585 | [info] + 1,500,000 ops 1586 | [info] + 7,271,509,877 ns 1587 | [info] + p(0.00000) = 278 ns/op 1588 | [info] + p(0.50000) = 575 ns/op 1589 | [info] + p(0.90000) = 19327 ns/op 1590 | [info] + p(0.99000) = 53247 ns/op 1591 | [info] + p(0.99900) = 96767 ns/op 1592 | [info] + p(0.99990) = 167935 ns/op 1593 | [info] + p(0.99999) = 368639 ns/op 1594 | [info] + p(1.00000) = 892927 ns/op 1595 | [info] + 17.8 % of CPU usage 1596 | [info] + 1597 | [info] - Ping throughput 10K 1598 | [info] + 2,000,000 ops 1599 | [info] + 1,841,294,306 ns 1600 | [info] + 1,086,192 ops/s 1601 | [info] + 37.7 % of CPU usage 1602 | [info] + 1603 | Executor service type: abq-thread-pool 1604 | [info] AkkaUnboundedActorSpec: 1605 | [info] - Enqueueing 1606 | [info] + 10,000,000 ops 1607 | [info] + 470,451,590 ns 1608 | [info] + 21,256,172 ops/s 1609 | [info] + 14.9 % of CPU usage 1610 | [info] + 48 bytes per instance 1611 | [info] + 1612 | [info] - Dequeueing 1613 | [info] + 10,000,000 ops 1614 | [info] + 1,251,420,082 ns 1615 | [info] + 7,990,921 ops/s 1616 | [info] + 15.7 % of CPU usage 1617 | [info] + 1618 | [info] - Initiation 1619 | [info] + 100,000 ops 1620 | [info] + 1,380,566,008 ns 1621 | [info] + 13,805 ns/op 1622 | [info] + 43.4 % of CPU usage 1623 | [info] + 400 bytes per instance 1624 | [info] + 1625 | [info] - Single-producer sending 1626 | [info] + 6,000,000 ops 1627 | [info] + 913,989,876 ns 1628 | [info] + 6,564,624 ops/s 1629 | [info] + 23.0 % of CPU usage 1630 | [info] + 1631 | [info] - Multi-producer sending 1632 | [info] + 6,000,000 ops 1633 | [info] + 1,052,892,400 ns 1634 | [info] + 5,698,588 ops/s 1635 | [info] + 62.8 % of CPU usage 1636 | [info] + 1637 | [info] - Max throughput 1638 | [info] + 12,000,000 ops 1639 | [info] + 480,645,232 ns 1640 | [info] + 24,966,439 ops/s 1641 | [info] + 70.0 % of CPU usage 1642 | [info] + 1643 | [info] - Ping latency 1644 | [info] + 1,500,000 ops 1645 | [info] + 7,928,243,518 ns 1646 | [info] + p(0.00000) = 274 ns/op 1647 | [info] + p(0.50000) = 619 ns/op 1648 | [info] + p(0.90000) = 19967 ns/op 1649 | [info] + p(0.99000) = 53503 ns/op 1650 | [info] + p(0.99900) = 95743 ns/op 1651 | [info] + p(0.99990) = 165887 ns/op 1652 | [info] + p(0.99999) = 378879 ns/op 1653 | [info] + p(1.00000) = 712703 ns/op 1654 | [info] + 17.7 % of CPU usage 1655 | [info] + 1656 | [info] - Ping throughput 10K 1657 | [info] + 2,000,000 ops 1658 | [info] + 2,237,467,999 ns 1659 | [info] + 893,867 ops/s 1660 | [info] + 38.1 % of CPU usage 1661 | [info] + 1662 | SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 1663 | SLF4J: Defaulting to no-operation (NOP) logger implementation 1664 | SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 1665 | [info] LiftActorSpec: 1666 | Executor service type: abq-thread-pool 1667 | [info] - Enqueueing 1668 | [info] + 10,000,000 ops 1669 | [info] + 382,616,376 ns 1670 | [info] + 26,135,838 ops/s 1671 | [info] + 13.4 % of CPU usage 1672 | [info] + 24 bytes per instance 1673 | [info] + 1674 | [info] - Dequeueing 1675 | [info] + 10,000,000 ops 1676 | [info] + 568,698,971 ns 1677 | [info] + 17,583,995 ops/s 1678 | [info] + 15.4 % of CPU usage 1679 | [info] + 1680 | [info] - Initiation 1681 | [info] + 10,000,000 ops 1682 | [info] + 914,285,904 ns 1683 | [info] + 91 ns/op 1684 | [info] + 16.0 % of CPU usage 1685 | [info] + 72 bytes per instance 1686 | [info] + 1687 | [info] - Single-producer sending 1688 | [info] + 6,000,000 ops 1689 | [info] + 731,133,006 ns 1690 | [info] + 8,206,441 ops/s 1691 | [info] + 29.6 % of CPU usage 1692 | [info] + 1693 | [info] - Multi-producer sending 1694 | [info] + 6,000,000 ops 1695 | [info] + 780,425,692 ns 1696 | [info] + 7,688,111 ops/s 1697 | [info] + 40.4 % of CPU usage 1698 | [info] + 1699 | [info] - Max throughput 1700 | [info] + 12,000,000 ops 1701 | [info] + 349,482,304 ns 1702 | [info] + 34,336,502 ops/s 1703 | [info] + 92.3 % of CPU usage 1704 | [info] + 1705 | [info] - Ping latency 1706 | [info] + 1,500,000 ops 1707 | [info] + 5,856,027,714 ns 1708 | [info] + p(0.00000) = 456 ns/op 1709 | [info] + p(0.50000) = 675 ns/op 1710 | [info] + p(0.90000) = 3567 ns/op 1711 | [info] + p(0.99000) = 70655 ns/op 1712 | [info] + p(0.99900) = 149503 ns/op 1713 | [info] + p(0.99990) = 234495 ns/op 1714 | [info] + p(0.99999) = 323583 ns/op 1715 | [info] + p(1.00000) = 3653631 ns/op 1716 | [info] + 20.0 % of CPU usage 1717 | [info] + 1718 | [info] - Ping throughput 10K 1719 | [info] + 2,000,000 ops 1720 | [info] + 1,463,177,365 ns 1721 | [info] + 1,366,888 ops/s 1722 | [info] + 43.1 % of CPU usage 1723 | [info] + 1724 | Executor service type: abq-thread-pool 1725 | [info] MinimalistActorSpec: 1726 | [info] - Enqueueing 1727 | [info] + 40,000,000 ops 1728 | [info] + 899,857,848 ns 1729 | [info] + 44,451,465 ops/s 1730 | [info] + 12.6 % of CPU usage 1731 | [info] + 24 bytes per instance 1732 | [info] + 1733 | [info] - Dequeueing 1734 | [info] + 40,000,000 ops 1735 | [info] + 262,822,948 ns 1736 | [info] + 152,193,711 ops/s 1737 | [info] + 20.5 % of CPU usage 1738 | [info] + 1739 | [info] - Initiation 1740 | [info] + 2,000,000 ops 1741 | [info] + 16,835,466,988 ns 1742 | [info] + 8,417 ns/op 1743 | [info] + 17.3 % of CPU usage 1744 | [info] + 24 bytes per instance 1745 | [info] + 1746 | [info] - Single-producer sending 1747 | [info] + 15,000,000 ops 1748 | [info] + 503,437,935 ns 1749 | [info] + 29,795,132 ops/s 1750 | [info] + 29.1 % of CPU usage 1751 | [info] + 1752 | [info] - Multi-producer sending 1753 | [info] + 15,000,000 ops 1754 | [info] + 693,644,154 ns 1755 | [info] + 21,624,920 ops/s 1756 | [info] + 73.0 % of CPU usage 1757 | [info] + 1758 | [info] - Max throughput 1759 | [info] + 30,000,000 ops 1760 | [info] + 352,675,744 ns 1761 | [info] + 85,063,973 ops/s 1762 | [info] + 59.9 % of CPU usage 1763 | [info] + 1764 | [info] - Ping latency 1765 | [info] + 3,000,000 ops 1766 | [info] + 14,107,033,799 ns 1767 | [info] + p(0.00000) = 176 ns/op 1768 | [info] + p(0.50000) = 563 ns/op 1769 | [info] + p(0.90000) = 22015 ns/op 1770 | [info] + p(0.99000) = 59391 ns/op 1771 | [info] + p(0.99900) = 109055 ns/op 1772 | [info] + p(0.99990) = 179199 ns/op 1773 | [info] + p(0.99999) = 415743 ns/op 1774 | [info] + p(1.00000) = 1196031 ns/op 1775 | [info] + 17.4 % of CPU usage 1776 | [info] + 1777 | [info] - Ping throughput 10K 1778 | [info] + 6,000,000 ops 1779 | [info] + 3,899,411,612 ns 1780 | [info] + 1,538,693 ops/s 1781 | [info] + 24.9 % of CPU usage 1782 | [info] + 1783 | Executor service type: abq-thread-pool 1784 | [info] ScalazActorSpec: 1785 | [info] - Enqueueing 1786 | [info] + 40,000,000 ops 1787 | [info] + 625,914,595 ns 1788 | [info] + 63,906,482 ops/s 1789 | [info] + 12.8 % of CPU usage 1790 | [info] + 24 bytes per instance 1791 | [info] + 1792 | [info] - Dequeueing 1793 | [info] + 40,000,000 ops 1794 | [info] + 221,481,224 ns 1795 | [info] + 180,602,216 ops/s 1796 | [info] + 22.0 % of CPU usage 1797 | [info] + 1798 | [info] - Initiation 1799 | [info] + 10,000,000 ops 1800 | [info] + 301,570,605 ns 1801 | [info] + 30 ns/op 1802 | [info] + 22.0 % of CPU usage 1803 | [info] + 88 bytes per instance 1804 | [info] + 1805 | [info] - Single-producer sending 1806 | [info] + 15,000,000 ops 1807 | [info] + 260,671,030 ns 1808 | [info] + 57,543,793 ops/s 1809 | [info] + 38.4 % of CPU usage 1810 | [info] + 1811 | [info] - Multi-producer sending 1812 | [info] + 15,000,000 ops 1813 | [info] + 622,433,338 ns 1814 | [info] + 24,098,966 ops/s 1815 | [info] + 87.0 % of CPU usage 1816 | [info] + 1817 | [info] - Max throughput 1818 | [info] + 30,000,000 ops 1819 | [info] + 275,536,347 ns 1820 | [info] + 108,878,557 ops/s 1821 | [info] + 60.8 % of CPU usage 1822 | [info] + 1823 | [info] - Ping latency 1824 | [info] + 3,000,000 ops 1825 | [info] + 15,907,073,778 ns 1826 | [info] + p(0.00000) = 178 ns/op 1827 | [info] + p(0.50000) = 675 ns/op 1828 | [info] + p(0.90000) = 25471 ns/op 1829 | [info] + p(0.99000) = 51967 ns/op 1830 | [info] + p(0.99900) = 84479 ns/op 1831 | [info] + p(0.99990) = 127999 ns/op 1832 | [info] + p(0.99999) = 378879 ns/op 1833 | [info] + p(1.00000) = 1474559 ns/op 1834 | [info] + 17.5 % of CPU usage 1835 | [info] + 1836 | [info] - Ping throughput 10K 1837 | [info] + 6,000,000 ops 1838 | [info] + 3,393,706,130 ns 1839 | [info] + 1,767,978 ops/s 1840 | [info] + 26.3 % of CPU usage 1841 | [info] + 1842 | [info] Run completed in 4 minutes, 22 seconds. 1843 | [info] Total number of tests run: 99 1844 | [info] Suites: completed 10, aborted 0 1845 | [info] Tests: succeeded 99, failed 0, canceled 0, ignored 0, pending 0 1846 | [info] All tests passed. 1847 | [success] Total time: 264 s, completed Jul 12, 2017 9:31:40 PM 1848 | [info] Loading global plugins from /home/andriy/.sbt/0.13/plugins 1849 | [info] Loading project definition from /home/andriy/Projects/com/github/plokhotnyuk/actors/project 1850 | [info] Set current project to actors (in build file:/home/andriy/Projects/com/github/plokhotnyuk/actors/) 1851 | [info] ActorSpec: 1852 | [info] actor with Akka fork-join pool executor 1853 | [info] - execute code async 1854 | [info] - exchange messages with another actor without loss 1855 | [info] - create child actor and send messages to it recursively 1856 | [info] - handle messages in order of sending by each thread 1857 | [info] - doesn't handle messages in simultaneous threads 1858 | [info] - redirect unhandled errors to uncaught exception handler of thread 1859 | Exception in thread "ForkJoinPool-1-worker-5" java.lang.NullPointerException 1860 | at com.github.gist.viktorklang.ActorSpec.failingAccumulator$1(ActorSpec.scala:136) 1861 | at com.github.gist.viktorklang.ActorSpec.$anonfun$actorTests$34(ActorSpec.scala:138) 1862 | at com.github.gist.viktorklang.Actor$$anon$1.com$github$gist$viktorklang$Actor$$anon$$act(Actor.scala:114) 1863 | at com.github.gist.viktorklang.Actor$$anon$1$$anon$2.exec(Actor.scala:67) 1864 | at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) 1865 | at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) 1866 | at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) 1867 | at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 1868 | [info] - handle messages with previous behaviour after unhandled errors 1869 | [info] - don't starve tasks arriving from external submit under high internal traffic 1870 | [info] actor with Java fork-join pool executor 1871 | [info] - execute code async 1872 | [info] - exchange messages with another actor without loss 1873 | [info] - create child actor and send messages to it recursively 1874 | [info] - handle messages in order of sending by each thread 1875 | [info] - doesn't handle messages in simultaneous threads 1876 | [info] - redirect unhandled errors to uncaught exception handler of thread 1877 | [info] - handle messages with previous behaviour after unhandled errors 1878 | [info] - don't starve tasks arriving from external submit under high internal traffic 1879 | [info] actor with fixed thread pool executor 1880 | [info] - execute code async 1881 | [info] - exchange messages with another actor without loss 1882 | [info] - create child actor and send messages to it recursively 1883 | [info] - handle messages in order of sending by each thread 1884 | [info] - doesn't handle messages in simultaneous threads 1885 | [info] - redirect unhandled errors to uncaught exception handler of thread 1886 | [info] - handle messages with previous behaviour after unhandled errors 1887 | [info] - don't starve tasks arriving from external submit under high internal traffic 1888 | Exception in thread "pool-3-thread-101" java.lang.NullPointerException 1889 | Exception in thread "pool-3-thread-102" java.lang.NullPointerException 1890 | [info] AkkaBoundedActorSpec: 1891 | Executor service type: lbq-thread-pool 1892 | [info] - Enqueueing 1893 | [info] + 10,000,000 ops 1894 | [info] + 450,842,844 ns 1895 | [info] + 22,180,678 ops/s 1896 | [info] + 15.0 % of CPU usage 1897 | [info] + 48 bytes per instance 1898 | [info] + 1899 | [info] - Dequeueing 1900 | [info] + 10,000,000 ops 1901 | [info] + 1,423,279,381 ns 1902 | [info] + 7,026,027 ops/s 1903 | [info] + 16.8 % of CPU usage 1904 | [info] + 1905 | [info] - Initiation 1906 | [info] + 100,000 ops 1907 | [info] + 1,299,557,923 ns 1908 | [info] + 12,995 ns/op 1909 | [info] + 48.8 % of CPU usage 1910 | [info] + 584 bytes per instance 1911 | [info] + 1912 | [info] - Single-producer sending 1913 | [info] + 6,000,000 ops 1914 | [info] + 1,241,656,519 ns 1915 | [info] + 4,832,254 ops/s 1916 | [info] + 23.8 % of CPU usage 1917 | [info] + 1918 | [info] - Multi-producer sending 1919 | [info] + 6,000,000 ops 1920 | [info] + 1,572,908,501 ns 1921 | [info] + 3,814,589 ops/s 1922 | [info] + 29.5 % of CPU usage 1923 | [info] + 1924 | [info] - Max throughput 1925 | [info] + 12,000,000 ops 1926 | [info] + 559,088,327 ns 1927 | [info] + 21,463,513 ops/s 1928 | [info] + 86.7 % of CPU usage 1929 | [info] + 1930 | [info] - Ping latency 1931 | [info] + 1,500,000 ops 1932 | [info] + 6,349,995,197 ns 1933 | [info] + p(0.00000) = 376 ns/op 1934 | [info] + p(0.50000) = 687 ns/op 1935 | [info] + p(0.90000) = 5375 ns/op 1936 | [info] + p(0.99000) = 82943 ns/op 1937 | [info] + p(0.99900) = 189439 ns/op 1938 | [info] + p(0.99990) = 307199 ns/op 1939 | [info] + p(0.99999) = 425983 ns/op 1940 | [info] + p(1.00000) = 1040383 ns/op 1941 | [info] + 18.3 % of CPU usage 1942 | [info] + 1943 | [info] - Ping throughput 10K 1944 | [info] + 2,000,000 ops 1945 | [info] + 1,662,898,923 ns 1946 | [info] + 1,202,718 ops/s 1947 | [info] + 38.2 % of CPU usage 1948 | [info] + 1949 | [info] - Overflow throughput 1950 | [info] + 5,000,000 ops 1951 | [info] + 1,225,010,213 ns 1952 | [info] + 4,081,598 ops/s 1953 | [info] + 20.6 % of CPU usage 1954 | [info] + 1955 | [info] AkkaMCNonBlockingBoundedActorSpec: 1956 | Executor service type: lbq-thread-pool 1957 | [info] - Enqueueing 1958 | [info] + 10,000,000 ops 1959 | [info] + 337,872,686 ns 1960 | [info] + 29,596,947 ops/s 1961 | [info] + 14.4 % of CPU usage 1962 | [info] + 48 bytes per instance 1963 | [info] + 1964 | [info] - Dequeueing 1965 | [info] + 10,000,000 ops 1966 | [info] + 857,588,902 ns 1967 | [info] + 11,660,598 ops/s 1968 | [info] + 17.1 % of CPU usage 1969 | [info] + 1970 | [info] - Initiation 1971 | [info] + 100,000 ops 1972 | [info] + 1,075,554,612 ns 1973 | [info] + 10,755 ns/op 1974 | [info] + 46.3 % of CPU usage 1975 | [info] + 400 bytes per instance 1976 | [info] + 1977 | [info] - Single-producer sending 1978 | [info] + 6,000,000 ops 1979 | [info] + 869,314,330 ns 1980 | [info] + 6,901,991 ops/s 1981 | [info] + 23.7 % of CPU usage 1982 | [info] + 1983 | [info] - Multi-producer sending 1984 | [info] + 6,000,000 ops 1985 | [info] + 1,231,151,285 ns 1986 | [info] + 4,873,487 ops/s 1987 | [info] + 70.6 % of CPU usage 1988 | [info] + 1989 | [info] - Max throughput 1990 | [info] + 12,000,000 ops 1991 | [info] + 504,961,367 ns 1992 | [info] + 23,764,194 ops/s 1993 | [info] + 75.3 % of CPU usage 1994 | [info] + 1995 | [info] - Ping latency 1996 | [info] + 1,500,000 ops 1997 | [info] + 6,854,566,225 ns 1998 | [info] + p(0.00000) = 432 ns/op 1999 | [info] + p(0.50000) = 1003 ns/op 2000 | [info] + p(0.90000) = 12351 ns/op 2001 | [info] + p(0.99000) = 62463 ns/op 2002 | [info] + p(0.99900) = 122367 ns/op 2003 | [info] + p(0.99990) = 202751 ns/op 2004 | [info] + p(0.99999) = 393215 ns/op 2005 | [info] + p(1.00000) = 1622015 ns/op 2006 | [info] + 18.4 % of CPU usage 2007 | [info] + 2008 | [info] - Ping throughput 10K 2009 | [info] + 2,000,000 ops 2010 | [info] + 1,561,827,020 ns 2011 | [info] + 1,280,551 ops/s 2012 | [info] + 38.2 % of CPU usage 2013 | [info] + 2014 | [info] - Overflow throughput 2015 | [info] + 5,000,000 ops 2016 | [info] + 1,003,767,441 ns 2017 | [info] + 4,981,233 ops/s 2018 | [info] + 29.5 % of CPU usage 2019 | [info] + 2020 | [info] AkkaMCUnboundedActorSpec: 2021 | Executor service type: lbq-thread-pool 2022 | [info] - Enqueueing 2023 | [info] + 10,000,000 ops 2024 | [info] + 666,480,315 ns 2025 | [info] + 15,004,194 ops/s 2026 | [info] + 13.7 % of CPU usage 2027 | [info] + 48 bytes per instance 2028 | [info] + 2029 | [info] - Dequeueing 2030 | [info] + 10,000,000 ops 2031 | [info] + 845,318,898 ns 2032 | [info] + 11,829,855 ops/s 2033 | [info] + 16.0 % of CPU usage 2034 | [info] + 2035 | [info] - Initiation 2036 | [info] + 100,000 ops 2037 | [info] + 1,393,181,499 ns 2038 | [info] + 13,931 ns/op 2039 | [info] + 45.0 % of CPU usage 2040 | [info] + 379 bytes per instance 2041 | [info] + 2042 | [info] - Single-producer sending 2043 | [info] + 6,000,000 ops 2044 | [info] + 1,020,423,191 ns 2045 | [info] + 5,879,913 ops/s 2046 | [info] + 21.6 % of CPU usage 2047 | [info] + 2048 | [info] - Multi-producer sending 2049 | [info] + 6,000,000 ops 2050 | [info] + 729,957,046 ns 2051 | [info] + 8,219,661 ops/s 2052 | [info] + 33.0 % of CPU usage 2053 | [info] + 2054 | [info] - Max throughput 2055 | [info] + 12,000,000 ops 2056 | [info] + 362,410,361 ns 2057 | [info] + 33,111,636 ops/s 2058 | [info] + 87.3 % of CPU usage 2059 | [info] + 2060 | [info] - Ping latency 2061 | [info] + 1,500,000 ops 2062 | [info] + 6,259,026,727 ns 2063 | [info] + p(0.00000) = 294 ns/op 2064 | [info] + p(0.50000) = 707 ns/op 2065 | [info] + p(0.90000) = 12159 ns/op 2066 | [info] + p(0.99000) = 57343 ns/op 2067 | [info] + p(0.99900) = 111615 ns/op 2068 | [info] + p(0.99990) = 188415 ns/op 2069 | [info] + p(0.99999) = 342015 ns/op 2070 | [info] + p(1.00000) = 1417215 ns/op 2071 | [info] + 18.2 % of CPU usage 2072 | [info] + 2073 | [info] - Ping throughput 10K 2074 | [info] + 2,000,000 ops 2075 | [info] + 1,444,194,422 ns 2076 | [info] + 1,384,855 ops/s 2077 | [info] + 40.6 % of CPU usage 2078 | [info] + 2079 | [info] AkkaSCONonBlockingBoundedActorSpec: 2080 | Executor service type: lbq-thread-pool 2081 | [info] - Enqueueing 2082 | [info] + 10,000,000 ops 2083 | [info] + 469,427,884 ns 2084 | [info] + 21,302,526 ops/s 2085 | [info] + 14.6 % of CPU usage 2086 | [info] + 48 bytes per instance 2087 | [info] + 2088 | [info] - Dequeueing 2089 | [info] + 10,000,000 ops 2090 | [info] + 872,330,471 ns 2091 | [info] + 11,463,545 ops/s 2092 | [info] + 16.2 % of CPU usage 2093 | [info] + 2094 | [info] - Initiation 2095 | [info] + 100,000 ops 2096 | [info] + 1,439,520,015 ns 2097 | [info] + 14,395 ns/op 2098 | [info] + 46.6 % of CPU usage 2099 | [info] + 400 bytes per instance 2100 | [info] + 2101 | [info] - Single-producer sending 2102 | [info] + 6,000,000 ops 2103 | [info] + 1,136,110,643 ns 2104 | [info] + 5,281,175 ops/s 2105 | [info] + 22.8 % of CPU usage 2106 | [info] + 2107 | [info] - Multi-producer sending 2108 | [info] + 6,000,000 ops 2109 | [info] + 1,365,085,938 ns 2110 | [info] + 4,395,327 ops/s 2111 | [info] + 76.5 % of CPU usage 2112 | [info] + 2113 | [info] - Max throughput 2114 | [info] + 12,000,000 ops 2115 | [info] + 444,633,286 ns 2116 | [info] + 26,988,532 ops/s 2117 | [info] + 86.6 % of CPU usage 2118 | [info] + 2119 | [info] - Ping latency 2120 | [info] + 1,500,000 ops 2121 | [info] + 6,325,679,052 ns 2122 | [info] + p(0.00000) = 318 ns/op 2123 | [info] + p(0.50000) = 727 ns/op 2124 | [info] + p(0.90000) = 8447 ns/op 2125 | [info] + p(0.99000) = 64255 ns/op 2126 | [info] + p(0.99900) = 130047 ns/op 2127 | [info] + p(0.99990) = 211967 ns/op 2128 | [info] + p(0.99999) = 391167 ns/op 2129 | [info] + p(1.00000) = 1171455 ns/op 2130 | [info] + 18.3 % of CPU usage 2131 | [info] + 2132 | [info] - Ping throughput 10K 2133 | [info] + 2,000,000 ops 2134 | [info] + 1,475,601,416 ns 2135 | [info] + 1,355,379 ops/s 2136 | [info] + 41.5 % of CPU usage 2137 | [info] + 2138 | [info] - Overflow throughput 2139 | [info] + 5,000,000 ops 2140 | [info] + 726,885,163 ns 2141 | [info] + 6,878,665 ops/s 2142 | [info] + 31.6 % of CPU usage 2143 | [info] + 2144 | [info] AkkaSCOUnboundedActorSpec: 2145 | Executor service type: lbq-thread-pool 2146 | [info] - Enqueueing 2147 | [info] + 10,000,000 ops 2148 | [info] + 302,505,050 ns 2149 | [info] + 33,057,299 ops/s 2150 | [info] + 14.9 % of CPU usage 2151 | [info] + 48 bytes per instance 2152 | [info] + 2153 | [info] - Dequeueing 2154 | [info] + 10,000,000 ops 2155 | [info] + 1,013,364,234 ns 2156 | [info] + 9,868,120 ops/s 2157 | [info] + 17.3 % of CPU usage 2158 | [info] + 2159 | [info] - Initiation 2160 | [info] + 100,000 ops 2161 | [info] + 1,359,860,701 ns 2162 | [info] + 13,598 ns/op 2163 | [info] + 43.9 % of CPU usage 2164 | [info] + 400 bytes per instance 2165 | [info] + 2166 | [info] - Single-producer sending 2167 | [info] + 6,000,000 ops 2168 | [info] + 1,039,202,123 ns 2169 | [info] + 5,773,660 ops/s 2170 | [info] + 22.9 % of CPU usage 2171 | [info] + 2172 | [info] - Multi-producer sending 2173 | [info] + 6,000,000 ops 2174 | [info] + 724,728,259 ns 2175 | [info] + 8,278,965 ops/s 2176 | [info] + 33.1 % of CPU usage 2177 | [info] + 2178 | [info] - Max throughput 2179 | [info] + 12,000,000 ops 2180 | [info] + 385,329,042 ns 2181 | [info] + 31,142,215 ops/s 2182 | [info] + 78.8 % of CPU usage 2183 | [info] + 2184 | [info] - Ping latency 2185 | [info] + 1,500,000 ops 2186 | [info] + 6,195,444,753 ns 2187 | [info] + p(0.00000) = 292 ns/op 2188 | [info] + p(0.50000) = 575 ns/op 2189 | [info] + p(0.90000) = 4159 ns/op 2190 | [info] + p(0.99000) = 77311 ns/op 2191 | [info] + p(0.99900) = 159743 ns/op 2192 | [info] + p(0.99990) = 266239 ns/op 2193 | [info] + p(0.99999) = 413695 ns/op 2194 | [info] + p(1.00000) = 1884159 ns/op 2195 | [info] + 18.0 % of CPU usage 2196 | [info] + 2197 | [info] - Ping throughput 10K 2198 | [info] + 2,000,000 ops 2199 | [info] + 1,502,507,227 ns 2200 | [info] + 1,331,108 ops/s 2201 | [info] + 41.3 % of CPU usage 2202 | [info] + 2203 | Executor service type: lbq-thread-pool 2204 | [info] AkkaUnboundedActorSpec: 2205 | [info] - Enqueueing 2206 | [info] + 10,000,000 ops 2207 | [info] + 481,326,256 ns 2208 | [info] + 20,775,928 ops/s 2209 | [info] + 15.3 % of CPU usage 2210 | [info] + 48 bytes per instance 2211 | [info] + 2212 | [info] - Dequeueing 2213 | [info] + 10,000,000 ops 2214 | [info] + 1,016,884,897 ns 2215 | [info] + 9,833,954 ops/s 2216 | [info] + 15.7 % of CPU usage 2217 | [info] + 2218 | [info] - Initiation 2219 | [info] + 100,000 ops 2220 | [info] + 1,405,596,518 ns 2221 | [info] + 14,055 ns/op 2222 | [info] + 46.5 % of CPU usage 2223 | [info] + 400 bytes per instance 2224 | [info] + 2225 | [info] - Single-producer sending 2226 | [info] + 6,000,000 ops 2227 | [info] + 1,127,761,683 ns 2228 | [info] + 5,320,272 ops/s 2229 | [info] + 22.2 % of CPU usage 2230 | [info] + 2231 | [info] - Multi-producer sending 2232 | [info] + 6,000,000 ops 2233 | [info] + 1,043,949,661 ns 2234 | [info] + 5,747,403 ops/s 2235 | [info] + 63.1 % of CPU usage 2236 | [info] + 2237 | [info] - Max throughput 2238 | [info] + 12,000,000 ops 2239 | [info] + 492,423,312 ns 2240 | [info] + 24,369,276 ops/s 2241 | [info] + 71.6 % of CPU usage 2242 | [info] + 2243 | [info] - Ping latency 2244 | [info] + 1,500,000 ops 2245 | [info] + 6,419,835,057 ns 2246 | [info] + p(0.00000) = 322 ns/op 2247 | [info] + p(0.50000) = 707 ns/op 2248 | [info] + p(0.90000) = 7455 ns/op 2249 | [info] + p(0.99000) = 69119 ns/op 2250 | [info] + p(0.99900) = 141311 ns/op 2251 | [info] + p(0.99990) = 225279 ns/op 2252 | [info] + p(0.99999) = 335871 ns/op 2253 | [info] + p(1.00000) = 1507327 ns/op 2254 | [info] + 18.3 % of CPU usage 2255 | [info] + 2256 | [info] - Ping throughput 10K 2257 | [info] + 2,000,000 ops 2258 | [info] + 1,467,779,940 ns 2259 | [info] + 1,362,602 ops/s 2260 | [info] + 41.4 % of CPU usage 2261 | [info] + 2262 | SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 2263 | SLF4J: Defaulting to no-operation (NOP) logger implementation 2264 | SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 2265 | [info] LiftActorSpec: 2266 | Executor service type: lbq-thread-pool 2267 | [info] - Enqueueing 2268 | [info] + 10,000,000 ops 2269 | [info] + 553,647,406 ns 2270 | [info] + 18,062,037 ops/s 2271 | [info] + 13.3 % of CPU usage 2272 | [info] + 23 bytes per instance 2273 | [info] + 2274 | [info] - Dequeueing 2275 | [info] + 10,000,000 ops 2276 | [info] + 391,683,344 ns 2277 | [info] + 25,530,827 ops/s 2278 | [info] + 16.0 % of CPU usage 2279 | [info] + 2280 | [info] - Initiation 2281 | [info] + 10,000,000 ops 2282 | [info] + 660,213,653 ns 2283 | [info] + 66 ns/op 2284 | [info] + 16.5 % of CPU usage 2285 | [info] + 72 bytes per instance 2286 | [info] + 2287 | [info] - Single-producer sending 2288 | [info] + 6,000,000 ops 2289 | [info] + 1,016,227,017 ns 2290 | [info] + 5,904,192 ops/s 2291 | [info] + 27.8 % of CPU usage 2292 | [info] + 2293 | [info] - Multi-producer sending 2294 | [info] + 6,000,000 ops 2295 | [info] + 775,054,975 ns 2296 | [info] + 7,741,386 ops/s 2297 | [info] + 37.6 % of CPU usage 2298 | [info] + 2299 | [info] - Max throughput 2300 | [info] + 12,000,000 ops 2301 | [info] + 308,934,289 ns 2302 | [info] + 38,843,211 ops/s 2303 | [info] + 91.8 % of CPU usage 2304 | [info] + 2305 | [info] - Ping latency 2306 | [info] + 1,500,000 ops 2307 | [info] + 6,691,967,234 ns 2308 | [info] + p(0.00000) = 504 ns/op 2309 | [info] + p(0.50000) = 879 ns/op 2310 | [info] + p(0.90000) = 4607 ns/op 2311 | [info] + p(0.99000) = 79359 ns/op 2312 | [info] + p(0.99900) = 186367 ns/op 2313 | [info] + p(0.99990) = 307199 ns/op 2314 | [info] + p(0.99999) = 434175 ns/op 2315 | [info] + p(1.00000) = 5406719 ns/op 2316 | [info] + 19.9 % of CPU usage 2317 | [info] + 2318 | [info] - Ping throughput 10K 2319 | [info] + 2,000,000 ops 2320 | [info] + 1,153,443,180 ns 2321 | [info] + 1,733,938 ops/s 2322 | [info] + 35.0 % of CPU usage 2323 | [info] + 2324 | Executor service type: lbq-thread-pool 2325 | [info] MinimalistActorSpec: 2326 | [info] - Enqueueing 2327 | [info] + 40,000,000 ops 2328 | [info] + 626,578,266 ns 2329 | [info] + 63,838,792 ops/s 2330 | [info] + 12.6 % of CPU usage 2331 | [info] + 24 bytes per instance 2332 | [info] + 2333 | [info] - Dequeueing 2334 | [info] + 40,000,000 ops 2335 | [info] + 266,791,638 ns 2336 | [info] + 149,929,736 ops/s 2337 | [info] + 20.6 % of CPU usage 2338 | [info] + 2339 | [info] - Initiation 2340 | [info] + 2,000,000 ops 2341 | [info] + 1,073,538,778 ns 2342 | [info] + 536 ns/op 2343 | [info] + 42.7 % of CPU usage 2344 | [info] + 41 bytes per instance 2345 | [info] + 2346 | [info] - Single-producer sending 2347 | [info] + 15,000,000 ops 2348 | [info] + 509,933,345 ns 2349 | [info] + 29,415,609 ops/s 2350 | [info] + 27.2 % of CPU usage 2351 | [info] + 2352 | [info] - Multi-producer sending 2353 | [info] + 15,000,000 ops 2354 | [info] + 558,675,340 ns 2355 | [info] + 26,849,225 ops/s 2356 | [info] + 94.2 % of CPU usage 2357 | [info] + 2358 | [info] - Max throughput 2359 | [info] + 30,000,000 ops 2360 | [info] + 264,811,466 ns 2361 | [info] + 113,288,145 ops/s 2362 | [info] + 83.6 % of CPU usage 2363 | [info] + 2364 | [info] - Ping latency 2365 | [info] + 3,000,000 ops 2366 | [info] + 2,372,089,820 ns 2367 | [info] + p(0.00000) = 217 ns/op 2368 | [info] + p(0.50000) = 377 ns/op 2369 | [info] + p(0.90000) = 2447 ns/op 2370 | [info] + p(0.99000) = 2975 ns/op 2371 | [info] + p(0.99900) = 3743 ns/op 2372 | [info] + p(0.99990) = 11775 ns/op 2373 | [info] + p(0.99999) = 423935 ns/op 2374 | [info] + p(1.00000) = 1556479 ns/op 2375 | [info] + 24.7 % of CPU usage 2376 | [info] + 2377 | [info] - Ping throughput 10K 2378 | [info] + 6,000,000 ops 2379 | [info] + 3,513,858,895 ns 2380 | [info] + 1,707,524 ops/s 2381 | [info] + 33.4 % of CPU usage 2382 | [info] + 2383 | Executor service type: lbq-thread-pool 2384 | [info] ScalazActorSpec: 2385 | [info] - Enqueueing 2386 | [info] + 40,000,000 ops 2387 | [info] + 638,249,071 ns 2388 | [info] + 62,671,458 ops/s 2389 | [info] + 12.7 % of CPU usage 2390 | [info] + 24 bytes per instance 2391 | [info] + 2392 | [info] - Dequeueing 2393 | [info] + 40,000,000 ops 2394 | [info] + 231,404,728 ns 2395 | [info] + 172,857,315 ops/s 2396 | [info] + 24.3 % of CPU usage 2397 | [info] + 2398 | [info] - Initiation 2399 | [info] + 10,000,000 ops 2400 | [info] + 281,648,416 ns 2401 | [info] + 28 ns/op 2402 | [info] + 21.3 % of CPU usage 2403 | [info] + 88 bytes per instance 2404 | [info] + 2405 | [info] - Single-producer sending 2406 | [info] + 15,000,000 ops 2407 | [info] + 343,537,770 ns 2408 | [info] + 43,663,321 ops/s 2409 | [info] + 41.8 % of CPU usage 2410 | [info] + 2411 | [info] - Multi-producer sending 2412 | [info] + 15,000,000 ops 2413 | [info] + 556,051,414 ns 2414 | [info] + 26,975,922 ops/s 2415 | [info] + 94.2 % of CPU usage 2416 | [info] + 2417 | [info] - Max throughput 2418 | [info] + 30,000,000 ops 2419 | [info] + 224,808,378 ns 2420 | [info] + 133,446,983 ops/s 2421 | [info] + 77.8 % of CPU usage 2422 | [info] + 2423 | [info] - Ping latency 2424 | [info] + 3,000,000 ops 2425 | [info] + 1,709,656,157 ns 2426 | [info] + p(0.00000) = 181 ns/op 2427 | [info] + p(0.50000) = 279 ns/op 2428 | [info] + p(0.90000) = 1751 ns/op 2429 | [info] + p(0.99000) = 2543 ns/op 2430 | [info] + p(0.99900) = 3855 ns/op 2431 | [info] + p(0.99990) = 14591 ns/op 2432 | [info] + p(0.99999) = 327679 ns/op 2433 | [info] + p(1.00000) = 815103 ns/op 2434 | [info] + 24.9 % of CPU usage 2435 | [info] + 2436 | [info] - Ping throughput 10K 2437 | [info] + 6,000,000 ops 2438 | [info] + 3,102,917,112 ns 2439 | [info] + 1,933,664 ops/s 2440 | [info] + 33.7 % of CPU usage 2441 | [info] + 2442 | [info] Run completed in 3 minutes, 33 seconds. 2443 | [info] Total number of tests run: 99 2444 | [info] Suites: completed 10, aborted 0 2445 | [info] Tests: succeeded 99, failed 0, canceled 0, ignored 0, pending 0 2446 | [info] All tests passed. 2447 | [success] Total time: 215 s, completed Jul 12, 2017 9:35:20 PM 2448 | --------------------------------------------------------------------------------