Package org.h2.test.bench
Class BenchB
- java.lang.Object
-
- org.h2.test.bench.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.StringgetName()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)
-
-
-
Method Detail
-
init
public void init(org.h2.test.bench.Database db, int size) throws java.sql.SQLExceptionDescription copied from interface:BenchInitialize the database. This includes creating tables and inserting data.
-
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:
runin interfacejava.lang.Runnable
-
runTest
public void runTest() throws java.lang.ExceptionDescription copied from interface:BenchRun the test.
-
getName
public java.lang.String getName()
Description copied from interface:BenchGet the name of the test.
-
setThreadCount
public void setThreadCount(int threadCount)
-
-