Merge pull request #17476 from akka/wip-17445-typed-PerformanceSpec-patriknw
=typ #17445 Reduce number of iterations in typed.PerformanceSpec
This commit is contained in:
commit
8a8663d2ed
1 changed files with 16 additions and 10 deletions
|
|
@ -12,7 +12,11 @@ import scala.concurrent.Await
|
|||
import scala.concurrent.Future
|
||||
import com.typesafe.config.ConfigFactory
|
||||
|
||||
class PerformanceSpec extends TypedSpec {
|
||||
class PerformanceSpec extends TypedSpec(
|
||||
ConfigFactory.parseString("""
|
||||
# increase this if you do real benchmarking
|
||||
akka.typed.PerformanceSpec.iterations=100000
|
||||
""")) {
|
||||
|
||||
object `A static behavior` {
|
||||
|
||||
|
|
@ -56,15 +60,17 @@ class PerformanceSpec extends TypedSpec {
|
|||
}
|
||||
}
|
||||
|
||||
def `01 when warming up`(): Unit = sync(runTest("01")(behavior(1, 1, 1000000, "dispatcher-1")))
|
||||
def `02 when using a single message on a single thread`(): Unit = sync(runTest("02")(behavior(1, 1, 1000000, "dispatcher-1")))
|
||||
def `03 when using a 10 messages on a single thread`(): Unit = sync(runTest("03")(behavior(1, 10, 1000000, "dispatcher-1")))
|
||||
def `04 when using a single message on two threads`(): Unit = sync(runTest("04")(behavior(1, 1, 1000000, "dispatcher-2")))
|
||||
def `05 when using a 10 messages on two threads`(): Unit = sync(runTest("05")(behavior(1, 10, 1000000, "dispatcher-2")))
|
||||
def `06 when using 4 pairs with a single message`(): Unit = sync(runTest("06")(behavior(4, 1, 1000000, "dispatcher-8")))
|
||||
def `07 when using 4 pairs with 10 messages`(): Unit = sync(runTest("07")(behavior(4, 10, 1000000, "dispatcher-8")))
|
||||
def `08 when using 8 pairs with a single message`(): Unit = sync(runTest("08")(behavior(8, 1, 1000000, "dispatcher-8")))
|
||||
def `09 when using 8 pairs with 10 messages`(): Unit = sync(runTest("09")(behavior(8, 10, 1000000, "dispatcher-8")))
|
||||
val iterations = system.settings.config.getInt("akka.typed.PerformanceSpec.iterations")
|
||||
|
||||
def `01 when warming up`(): Unit = sync(runTest("01")(behavior(1, 1, iterations, "dispatcher-1")))
|
||||
def `02 when using a single message on a single thread`(): Unit = sync(runTest("02")(behavior(1, 1, iterations, "dispatcher-1")))
|
||||
def `03 when using a 10 messages on a single thread`(): Unit = sync(runTest("03")(behavior(1, 10, iterations, "dispatcher-1")))
|
||||
def `04 when using a single message on two threads`(): Unit = sync(runTest("04")(behavior(1, 1, iterations, "dispatcher-2")))
|
||||
def `05 when using a 10 messages on two threads`(): Unit = sync(runTest("05")(behavior(1, 10, iterations, "dispatcher-2")))
|
||||
def `06 when using 4 pairs with a single message`(): Unit = sync(runTest("06")(behavior(4, 1, iterations, "dispatcher-8")))
|
||||
def `07 when using 4 pairs with 10 messages`(): Unit = sync(runTest("07")(behavior(4, 10, iterations, "dispatcher-8")))
|
||||
def `08 when using 8 pairs with a single message`(): Unit = sync(runTest("08")(behavior(8, 1, iterations, "dispatcher-8")))
|
||||
def `09 when using 8 pairs with 10 messages`(): Unit = sync(runTest("09")(behavior(8, 10, iterations, "dispatcher-8")))
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue