configures the Journal plugin to be tested
Override in order to customize timeouts used for expectMsg, in order to tune the awaits to your journal's perf
Override in order to customize timeouts used for expectMsg, in order to tune the awaits to your journal's perf
Implicitly converts an object of type String
to a StringMayWrapper
,
to enable may
methods to be invokable on that object.
Implicitly converts an object of type String
to a StringMayWrapper
,
to enable may
methods to be invokable on that object.
Number of messages sent to the PersistentActor under test for each test iteration
Number of messages sent to the PersistentActor under test for each test iteration
Configurable number of frames to be shown when a MAY test fails (is canceled).
Configurable number of frames to be shown when a MAY test fails (is canceled).
Defaults to 3
.
Must be geater than 0
.
Executes a block of code multiple times (no warm-up)
Executes a block of code multiple times (no warm-up)
Number of measurement iterations each test will be run.
Number of measurement iterations each test will be run.
Overridable hook that is called before populating the journal for the next test case.
Overridable hook that is called before populating the journal for the next
test case. pid
is the persistenceId
that will be used in the test.
This method may be needed to clean pre-existing events from the log.
Implementation may override and return false if it does not
support atomic writes of several events, as emitted by persistAll
.
Implementation may override and return false if it does not
support atomic writes of several events, as emitted by persistAll
.
When true
enables tests which check if the Journal properly rejects
writes of objects which are not java.lang.Serializable
.
When true
enables tests which check if the Journal properly rejects
writes of objects which are not java.lang.Serializable
.
When true
enables tests which check if the Journal properly serialize and
deserialize events.
When true
enables tests which check if the Journal properly serialize and
deserialize events.
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).!==(literalNull)
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).!==(spread)
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).!==(rightSide)(equality)
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).!==(literalNull)
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).!==(spread)
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).!==(rightSide)(equality)
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).!==(literalNull)
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).!==(spread)
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).!==(rightSide)(equality)
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).===(literalNull)
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).===(spread)
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).===(rightSide)(equality)
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).===(literalNull)
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).===(spread)
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).===(rightSide)(equality)
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).===(literalNull)
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).===(spread)
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).===(rightSide)(equality)
(javaJournalPerfSpec: org.scalatest.Assertions.Equalizer[JavaJournalPerfSpec]).leftSide
(javaJournalPerfSpec: org.scalactic.TripleEquals.Equalizer[JavaJournalPerfSpec]).leftSide
(javaJournalPerfSpec: org.scalatest.Matchers.Equalizer[JavaJournalPerfSpec]).leftSide
The parameterless execute method has been deprecated and will be removed in a future version of ScalaTest. Please invoke execute with empty parens instead: execute().
(Since version 2.5.5) Use expectNoMessage instead
(Since version 2.5.5) Use expectNoMessage instead
The trap method is no longer needed for demos in the REPL, which now abreviates stack traces, and will be removed in a future version of ScalaTest
JAVA API
Java / JUnit consumable equivalent of akka.persistence.journal.JournalPerfSpec and akka.persistence.journal.JournalSpec.
This spec measures execution times of the basic operations that an akka.persistence.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 customize this please override the #info method.The benchmark iteration and message counts are easily customisable by overriding these methods:
In case your journal plugin needs some kind of setup or teardown, override the
beforeAll
orafterAll
methods (don't forget to callsuper
in your overridden methods).akka.persistence.journal.JournalPerfSpec
akka.persistence.journal.JournalSpec