akka.persistence.japi.journal
Class JavaJournalPerfSpec

java.lang.Object
  extended by akka.persistence.japi.journal.JavaJournalPerfSpec
All Implemented Interfaces:
JournalPerfSpec, JournalSpec, PluginSpec, TestKitBase

public class JavaJournalPerfSpec
extends java.lang.Object
implements JournalSpec, JournalPerfSpec

JAVA API

Java / JUnit consumable equivalent of JournalPerfSpec and JournalSpec.

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.

The measurements are by default printed to System.out, if you want to customise this please override the info() method.

The benchmark iteration and message counts are easily customisable by overriding these methods:


   @Override
   public long awaitDurationMillis() { return 10000; }

   @Override
   public int eventsCount() { return 10 * 1000; }

   @Override
   public int measurementIterations { return 10; }
 

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).

See Also:
JournalSpec, param: config configures the Journal plugin to be tested

Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.persistence.journal.JournalSpec
JournalSpec.Confirmation, JournalSpec.Confirmation$
 
Nested classes/interfaces inherited from interface akka.persistence.journal.JournalPerfSpec
JournalPerfSpec.BenchActor, JournalPerfSpec.Cmd, JournalPerfSpec.Cmd$, JournalPerfSpec.ResetCounter$
 
Constructor Summary
JavaJournalPerfSpec(com.typesafe.config.Config config)
           
 
Method Summary
 com.typesafe.config.Config config()
           
protected  org.scalatest.Informer info()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.persistence.journal.JournalSpec
beforeEach, journal, receiverProbe, replayedMessage, senderProbe, system, writeMessages
 
Methods inherited from interface akka.persistence.journal.JournalPerfSpec
awaitDuration, awaitDurationMillis, benchActor, commands, eventsCount, feedAndExpectLast, measure, measurementIterations, testProbe
 
Methods inherited from interface akka.persistence.PluginSpec
_extension, _pid, actorInstanceId, afterAll, beforeAll, 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, testActor, testKitSettings, unwatch, watch, within, within
 

Constructor Detail

JavaJournalPerfSpec

public JavaJournalPerfSpec(com.typesafe.config.Config config)
Method Detail

config

public com.typesafe.config.Config config()
Specified by:
config in interface PluginSpec

info

protected org.scalatest.Informer info()