tests
Class TestDriver

java.lang.Object
  extended by tests.TestDriver
All Implemented Interfaces:
GlobalConst
Direct Known Subclasses:
BMTest, DMTest, HFTest, IXTest, ROTest

 class TestDriver
extends java.lang.Object
implements GlobalConst

Minibase Test Driver

This base class contains common code to each layer's test suite.


Nested Class Summary
protected  class TestDriver.CountData
          Counter values saved with a particular description.
 
Field Summary
protected  java.lang.String BUF_POLICY
          Default buffer pool replacement policy
protected  int BUF_SIZE
          Default buffer pool size (in pages)
protected  java.util.ArrayList<TestDriver.CountData> counts
          Incremental history of the performance counters; odd elements are snapshots before the tests, and even elements are after.
protected  java.lang.String DB_PATH
          Default database file name.
protected  int DB_SIZE
          Default database size (in pages).
protected static boolean FAIL
          Failure value, for readability.
protected static boolean PASS
          Success value, for readability.
protected  java.util.Random random
          Random generator; use the same seed to make tests deterministic.
 
Fields inherited from interface global.GlobalConst
EMPTY_SLOT, FIRST_PAGEID, INVALID_PAGEID, MAX_COLSIZE, MAX_TUPSIZE, NAME_MAXLEN, PAGE_SIZE, PIN_DISKIO, PIN_MEMCPY, UNPIN_CLEAN, UNPIN_DIRTY
 
Constructor Summary
TestDriver()
           
 
Method Summary
protected  void create_minibase()
          Creates a new database on the disk.
protected  void delete_minibase()
          Deletes the database files from the disk.
protected  void initCounts()
          Resets the performance counter history.
protected  void initRandom()
          Resets the random generator to the default seed.
protected  void load_minibase()
          Loads an existing database from the disk.
protected  void printCounters()
          Prints the performance counters (i.e.
protected  void printSummary(int sepcnt)
          Prints the complete history of the performance counters.
protected  void saveCounts(java.lang.String desc)
          Saves the current performance counters, given the description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PASS

protected static final boolean PASS
Success value, for readability.

See Also:
Constant Field Values

FAIL

protected static final boolean FAIL
Failure value, for readability.

See Also:
Constant Field Values

DB_PATH

protected java.lang.String DB_PATH
Default database file name.


DB_SIZE

protected int DB_SIZE
Default database size (in pages).


BUF_SIZE

protected int BUF_SIZE
Default buffer pool size (in pages)


BUF_POLICY

protected java.lang.String BUF_POLICY
Default buffer pool replacement policy


random

protected java.util.Random random
Random generator; use the same seed to make tests deterministic.


counts

protected java.util.ArrayList<TestDriver.CountData> counts
Incremental history of the performance counters; odd elements are snapshots before the tests, and even elements are after.

Constructor Detail

TestDriver

TestDriver()
Method Detail

delete_minibase

protected void delete_minibase()
Deletes the database files from the disk.


create_minibase

protected void create_minibase()
Creates a new database on the disk.


load_minibase

protected void load_minibase()
Loads an existing database from the disk.


initRandom

protected void initRandom()
Resets the random generator to the default seed.


initCounts

protected void initCounts()
Resets the performance counter history.


saveCounts

protected void saveCounts(java.lang.String desc)
Saves the current performance counters, given the description.


printCounters

protected void printCounters()
Prints the performance counters (i.e. for the current test).


printSummary

protected void printSummary(int sepcnt)
Prints the complete history of the performance counters.

Parameters:
sepcnt - how many lines to print before each separator