|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.performance.PerfMain
The OJB stress/performance test - a simple performance test framework for testing multi-threaded environments.
You have two possibilities to run this test:
- use the build script and call
ant perf-test
- or perform the test class by yourself
java -classpath CLASSPATH org.apache.ojb.performance.PerfMain
[comma separated list of PerfTest implementation classes, no blanks!]
[number of test loops]
[number of threads]
[number of insert/fetch/delete loops per thread]
[boolean - run in stress mode if set true, run in performance mode if set false, default false]
For example:
java -classpath CLASSPATH my.MyPerfTest,myMyPerfTest2 3 10 2000 false
Constructor Summary | |
PerfMain()
|
Method Summary | |
void |
addConsistentResult(java.lang.String testName,
int objectsBefore,
int objectsAfter)
|
void |
addPeriodResult(java.lang.String testName,
long[] resultArr)
resultArr[0] startTime/test length resultArr[1] inserting times resultArr[2] fetching times resultArr[3] updating times resultArr[4] deleting times |
static int |
getConcurrentThreads()
|
java.util.Map |
getExceptionMap()
|
static int |
getIterationsPerThread()
|
java.util.Collection |
getResultList()
|
static int |
getTestLoops()
|
static boolean |
isUseStressMode()
|
static void |
main(java.lang.String[] args)
|
void |
printResult(java.io.OutputStream out)
|
void |
registerException(java.lang.String causer,
java.lang.Exception e)
|
void |
startPerfTest(java.lang.String[] args)
Call this to begin the performance test. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PerfMain()
Method Detail |
public static void main(java.lang.String[] args)
public void startPerfTest(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void printResult(java.io.OutputStream out)
public void addPeriodResult(java.lang.String testName, long[] resultArr)
public void addConsistentResult(java.lang.String testName, int objectsBefore, int objectsAfter)
public void registerException(java.lang.String causer, java.lang.Exception e)
public java.util.Map getExceptionMap()
public java.util.Collection getResultList()
public static int getIterationsPerThread()
public static int getConcurrentThreads()
public static boolean isUseStressMode()
public static int getTestLoops()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |