|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--test.ojb.broker.PerformanceJdbcReferenceTest
This TestCase contains the OJB performance benchmarks for the JDBC API. This is the reference for other benchmarks.
Field Summary | |
(package private) static int |
articleCount
the number of PerformanceArticle objects to work with. |
(package private) PersistenceBroker |
broker
|
(package private) static int |
iterations
the number of iterations to perform. |
(package private) int |
offsetId
the offset value for PerformanceArticle primary keys |
Constructor Summary | |
PerformanceJdbcReferenceTest(java.lang.String name)
BrokerTests constructor comment. |
Method Summary | |
protected void |
deleteArticles()
deletes all PerformanceArticle created by insertNewArticles . |
protected void |
insertNewArticles()
create new PerformanceArticle objects and insert them into the RDBMS. |
static void |
main(java.lang.String[] args)
launches the TestCase. |
protected void |
readArticles()
read in all the PerformanceArticles from the RDBMS that have been inserted by insertNewArticles() .
|
protected void |
readArticlesByCursor()
read in all the PerformanceArticles from the RDBMS that have been inserted by insertNewArticles() .
|
void |
setUp()
setting up the test fixture. |
void |
tearDown()
tearing down the test fixture. |
void |
testBenchmark()
this method is the driver for the complete Benchmark. |
protected void |
updateExistingArticles()
updates all PerformanceArticles inserted by insertNewArticles() .
|
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
PersistenceBroker broker
static int articleCount
static int iterations
int offsetId
Constructor Detail |
public PerformanceJdbcReferenceTest(java.lang.String name)
name
- java.lang.StringMethod Detail |
public static void main(java.lang.String[] args)
args
- the String[] holding the commandline parameters.public void setUp()
setUp
in class junit.framework.TestCase
public void tearDown()
tearDown
in class junit.framework.TestCase
protected void deleteArticles() throws PersistenceBrokerException
insertNewArticles
.
PersistenceBrokerException
protected void insertNewArticles() throws PersistenceBrokerException
articleCount
.
PersistenceBrokerException
protected void readArticles() throws PersistenceBrokerException
insertNewArticles()
.
The lookup is done one by one, that is: a primary key based lookup is used.
PersistenceBrokerException
protected void readArticlesByCursor() throws PersistenceBrokerException
insertNewArticles()
.
The lookup is done with a cursor fetch,
that is: a between Statement is used to select all inserted PerformanceArticles
and Objects are read in by fetching from the cursor (JDBC ResultSet).
PersistenceBrokerException
protected void updateExistingArticles() throws PersistenceBrokerException
insertNewArticles()
.
All objects are modified and changes are written to the RDBMS with an UPDATE.
PersistenceBrokerException
public void testBenchmark()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |