org.apache.ojb.performance
Class PerfMain
java.lang.Object
org.apache.ojb.performance.PerfMain
- public class PerfMain
- extends java.lang.Object
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
bin/build.sh perf-test
or
bin\build.bat 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
- Version:
- $Id: PerfMain.java,v 1.6 2003/06/27 20:47:30 arminw Exp $
- Author:
- Armin Waibel
Field Summary |
protected static java.lang.String |
EOL
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EOL
protected static final java.lang.String EOL
PerfMain
public PerfMain()
main
public static void main(java.lang.String[] args)
startPerfTest
public void startPerfTest(java.lang.String[] args)
throws java.lang.Exception
- Call this to begin the performance test.
- Throws:
java.lang.Exception
printResult
public void printResult(java.io.OutputStream out)
addPeriodResult
public 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
addConsistentResult
public void addConsistentResult(java.lang.String testName,
int objectsBefore,
int objectsAfter)
registerException
public void registerException(java.lang.String causer,
java.lang.Exception e)
getExceptionMap
public java.util.Map getExceptionMap()
getResultList
public java.util.Collection getResultList()
getIterationsPerThread
public static int getIterationsPerThread()
getConcurrentThreads
public static int getConcurrentThreads()
isUseStressMode
public static boolean isUseStressMode()
getTestLoops
public static int getTestLoops()
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