Package org.h2.test.bench
Class BenchB
java.lang.Object
org.h2.test.bench.BenchB
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 -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of the test.protected intgetTransactionsPerClient(int size) Get the number of transactions per client.voidinit(org.h2.test.bench.Database db, int size) Initialize the database.voidrun()voidrunTest()Run the test.voidsetThreadCount(int threadCount)
-
Constructor Details
-
BenchB
public BenchB()
-
-
Method Details
-
init
Description copied from interface:BenchInitialize the database. This includes creating tables and inserting data.- Specified by:
initin interfaceBench- Parameters:
db- the database objectsize- the amount of data- Throws:
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() -
runTest
Description copied from interface:BenchRun the test. -
getName
Description copied from interface:BenchGet the name of the test. -
setThreadCount
public void setThreadCount(int threadCount)
-