Class JavaJournalPerfSpec

  • All Implemented Interfaces:
    CapabilityFlags, JournalCapabilityFlags, MayVerb, OptionalTests, TestKitBase, java.io.Serializable, org.scalactic.Explicitly, org.scalactic.Tolerance, org.scalactic.TripleEquals, org.scalactic.TripleEqualsSupport, org.scalatest.Alerting, org.scalatest.Assertions, org.scalatest.BeforeAndAfterAll, org.scalatest.BeforeAndAfterEach, org.scalatest.Documenting, org.scalatest.Informing, org.scalatest.matchers.dsl.MatcherWords, org.scalatest.matchers.should.Matchers, org.scalatest.Notifying, org.scalatest.Suite, org.scalatest.SuiteMixin, org.scalatest.TestRegistration, org.scalatest.TestSuite, org.scalatest.verbs.CanVerb, org.scalatest.verbs.MustVerb, org.scalatest.verbs.ShouldVerb, org.scalatest.wordspec.AnyWordSpecLike

    public class JavaJournalPerfSpec
    extends 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 customize 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 overridden methods).

    See Also:
    JournalSpec, param: config configures the Journal plugin to be tested, Serialized Form
    • Constructor Detail

      • JavaJournalPerfSpec

        public JavaJournalPerfSpec​(com.typesafe.config.Config config)