Class BenchB

  • All Implemented Interfaces:
    java.lang.Runnable, Bench

    public class BenchB
    extends java.lang.Object
    implements Bench, java.lang.Runnable
    This test is similar to the TPC-B test of the Transaction Processing Council (TPC). Multiple threads are used (one thread per connection). Referential integrity is not implemented.

    See also http://www.tpc.org/tpcb

    • Constructor Summary

      Constructors 
      Constructor Description
      BenchB()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Get the name of the test.
      protected int getTransactionsPerClient​(int size)
      Get the number of transactions per client.
      void init​(org.h2.test.bench.Database db, int size)
      Initialize the database.
      void run()  
      void runTest()
      Run the test.
      void setThreadCount​(int threadCount)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BenchB

        public BenchB()
    • Method Detail

      • init

        public void init​(org.h2.test.bench.Database db,
                         int size)
                  throws java.sql.SQLException
        Description copied from interface: Bench
        Initialize the database. This includes creating tables and inserting data.
        Specified by:
        init in interface Bench
        Parameters:
        db - the database object
        size - the amount of data
        Throws:
        java.sql.SQLException
      • getTransactionsPerClient

        protected int getTransactionsPerClient​(int size)
        Get the number of transactions per client.
        Parameters:
        size - test size
        Returns:
        the transactions per client
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • runTest

        public void runTest()
                     throws java.lang.Exception
        Description copied from interface: Bench
        Run the test.
        Specified by:
        runTest in interface Bench
        Throws:
        java.lang.Exception
      • getName

        public java.lang.String getName()
        Description copied from interface: Bench
        Get the name of the test.
        Specified by:
        getName in interface Bench
        Returns:
        the test name
      • setThreadCount

        public void setThreadCount​(int threadCount)