org.apache.ojb.performance
Class PerfTest

java.lang.Object
  extended byorg.apache.ojb.performance.PerfTest
Direct Known Subclasses:
OJBPerfTest.JdbcPerfTest, OJBPerfTest.ODMGPerfTest, OJBPerfTest.OTMPerfTest, OJBPerfTest.PBPerfTest

public abstract class PerfTest
extends java.lang.Object

Derivate this class to implement a test instance for the performance test.

Version:
$Id: PerfTest.java,v 1.8 2003/11/03 09:53:36 arminw Exp $
Author:
Armin Waibel.

Constructor Summary
PerfTest()
           
 
Method Summary
 void addTime(int position, long time)
           
abstract  int articleCount()
          Returns the count of all found PerfArticle in database.
 long getPerfTestId()
           
 java.lang.ThreadGroup getThreadGroup()
           
protected  void interruptThreads()
          Interrupt the running threads.
abstract  PerfHandle newPerfHandle(PerfTest test)
          Returns a new instance of a PerfHandle implementation.
 void performTest()
           
 void registerException(java.lang.String causer, java.lang.Exception e)
           
 void registerPerfMain(PerfMain aPerfMain)
           
protected  void runTestHandles(PerfHandle[] runnables)
          Run the threads.
abstract  java.lang.String testName()
          Returns the name of the test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfTest

public PerfTest()
Method Detail

testName

public abstract java.lang.String testName()
Returns the name of the test


newPerfHandle

public abstract PerfHandle newPerfHandle(PerfTest test)
Returns a new instance of a PerfHandle implementation.


articleCount

public abstract int articleCount()
Returns the count of all found PerfArticle in database. Do not use the cache to get the count! This method is not involved in the performance test methods, thus it's not mandatory to use the api-methods for implementation.


interruptThreads

protected void interruptThreads()
Interrupt the running threads.


runTestHandles

protected void runTestHandles(PerfHandle[] runnables)
Run the threads.


performTest

public void performTest()

registerException

public void registerException(java.lang.String causer,
                              java.lang.Exception e)

addTime

public void addTime(int position,
                    long time)

registerPerfMain

public void registerPerfMain(PerfMain aPerfMain)

getThreadGroup

public java.lang.ThreadGroup getThreadGroup()

getPerfTestId

public long getPerfTestId()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14