akka.persistence.journal
Interface JournalPerfSpec

All Superinterfaces:
PluginSpec, TestKitBase
All Known Implementing Classes:
JavaJournalPerfSpec

public interface JournalPerfSpec
extends PluginSpec

This spec measures execution times of the basic operations that an PersistentActor provides, using the provided Journal (plugin).

It is *NOT* meant to be a comprehensive benchmark, but rather aims to help plugin developers to easily determine if their plugin's performance is roughly as expected. It also validates the plugin still works under "more messages" scenarios.

In case your journal plugin needs some kind of setup or teardown, override the beforeAll or afterAll methods (don't forget to call super in your overriden methods).

For a Java and JUnit consumable version of the TCK please refer to JavaJournalPerfSpec.

See Also:
JournalSpec

Nested Class Summary
static class JournalPerfSpec.BenchActor
           
static class JournalPerfSpec.Cmd
           
static class JournalPerfSpec.Cmd$
           
static class JournalPerfSpec.ResetCounter$
           
 
Method Summary
 scala.concurrent.duration.FiniteDuration awaitDuration()
          Override in order to customize timeouts used for expectMsg, in order to tune the awaits to your journal's perf
 long awaitDurationMillis()
          Override in order to customize timeouts used for expectMsg, in order to tune the awaits to your journal's perf
 ActorRef benchActor(int replyAfter)
           
 scala.collection.immutable.Vector<java.lang.Object> commands()
           
 int eventsCount()
          Numbe of messages sent to the PersistentActor under test for each test iteration
 void feedAndExpectLast(ActorRef actor, java.lang.String mode, scala.collection.immutable.Seq<java.lang.Object> cmnds)
           
 void measure(scala.Function1<scala.concurrent.duration.Duration,java.lang.String> msg, scala.Function0<scala.runtime.BoxedUnit> block)
          Executes a block of code multiple times (no warmup)
 int measurementIterations()
          Number of measurement iterations each test will be run.
 TestProbe testProbe()
           
 
Methods inherited from interface akka.persistence.PluginSpec
_extension, _pid, actorInstanceId, afterAll, beforeAll, beforeEach, config, counter, extension, pid, subscribe
 
Methods inherited from interface akka.testkit.TestKitBase
awaitAssert, awaitCond, checkMissingAndUnexpected, end, expectMsg_internal, expectMsg, expectMsg, expectMsg, expectMsgAllClassOf, expectMsgAllClassOf, expectMsgAllConformingOf, expectMsgAllConformingOf, expectMsgAllOf_internal, expectMsgAllOf, expectMsgAllOf, expectMsgAnyClassOf_internal, expectMsgAnyClassOf, expectMsgAnyClassOf, expectMsgAnyOf_internal, expectMsgAnyOf, expectMsgAnyOf, expectMsgClass_internal, expectMsgClass, expectMsgClass, expectMsgPF, expectMsgType, expectMsgType, expectNoMsg_internal, expectNoMsg, expectNoMsg, expectTerminated, fishForMessage, format, ignoreMsg, ignoreNoMsg, internalExpectMsgAllClassOf, internalExpectMsgAllConformingOf, lastMessage, lastSender, lastWasNoMsg, msgAvailable, now, queue, receiveN_internal, receiveN, receiveN, receiveOne, receiveWhile, remaining, remainingOr, remainingOrDilated, setAutoPilot, shutdown, system, testActor, testKitSettings, unwatch, watch, within, within
 

Method Detail

testProbe

TestProbe testProbe()

benchActor

ActorRef benchActor(int replyAfter)

feedAndExpectLast

void feedAndExpectLast(ActorRef actor,
                       java.lang.String mode,
                       scala.collection.immutable.Seq<java.lang.Object> cmnds)

measure

void measure(scala.Function1<scala.concurrent.duration.Duration,java.lang.String> msg,
             scala.Function0<scala.runtime.BoxedUnit> block)
Executes a block of code multiple times (no warmup)


awaitDurationMillis

long awaitDurationMillis()
Override in order to customize timeouts used for expectMsg, in order to tune the awaits to your journal's perf


awaitDuration

scala.concurrent.duration.FiniteDuration awaitDuration()
Override in order to customize timeouts used for expectMsg, in order to tune the awaits to your journal's perf


eventsCount

int eventsCount()
Numbe of messages sent to the PersistentActor under test for each test iteration


measurementIterations

int measurementIterations()
Number of measurement iterations each test will be run.


commands

scala.collection.immutable.Vector<java.lang.Object> commands()