| |
|
| org.apache.ojb.compare.PerformanceBaseTest org.apache.ojb.compare.PerformanceODMGTest
PerformanceODMGTest | public class PerformanceODMGTest extends PerformanceBaseTest (Code) | | This TestCase contains the OJB performance benchmarks for the
ODMG API.
author: Matthew Baird, borrowing heavily from Thomas Mahler |
Method Summary | |
protected void | deleteArticles() deletes all PerformanceArticle created by insertNewArticles . | protected void | insertNewArticles() create new PerformanceArticle objects and insert them into the RDBMS. | public static void | main(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() . | public void | setUp() | public void | tearDown() | public void | testBenchmark() | protected void | updateExistingArticles() updates all PerformanceArticles inserted by insertNewArticles() . |
PerformanceODMGTest | public PerformanceODMGTest(String name)(Code) | | |
deleteArticles | protected void deleteArticles() throws Exception(Code) | | deletes all PerformanceArticle created by insertNewArticles .
|
insertNewArticles | protected void insertNewArticles() throws Exception(Code) | | create new PerformanceArticle objects and insert them into the RDBMS.
The number of objects to create is defined by articleCount .
|
main | public static void main(String[] args)(Code) | | launches the TestCase.
The number of Objects to work with and the number of iterations
to be performed can be adjusted by setting them as commandline parameters.
Parameters: args - the String[] holding the commandline parameters. |
readArticles | protected void readArticles() throws Exception(Code) | | read in all the PerformanceArticles from the RDBMS that have
been inserted by insertNewArticles() .
The lookup is done one by one, that is: a primary key based lookup is used.
|
readArticlesByCursor | protected void readArticlesByCursor() throws Exception(Code) | | read in all the PerformanceArticles from the RDBMS that have
been inserted by 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).
|
updateExistingArticles | protected void updateExistingArticles() throws Exception(Code) | | updates all PerformanceArticles inserted by insertNewArticles() .
All objects are modified and changes are written to the RDBMS with an UPDATE.
|
|
|
|