|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.sourceforge.javacpt.impl.ComparativePerformanceTestImpl
public class ComparativePerformanceTestImpl
ComparativePerformanceTestImpl
Field Summary | |
---|---|
static int |
DEFAULT_EXECUTE_TIMES
default execute times |
Constructor Summary | |
---|---|
ComparativePerformanceTestImpl()
Default Constructor |
|
ComparativePerformanceTestImpl(String testName)
Constructor |
Method Summary | |
---|---|
void |
errorPrint(String str)
Print in ERROR level |
long |
execute(int executeTimes,
Object instance,
Method executeMethod,
Object... args)
Execute loop test. |
long |
execute(Method execuMethod,
Object... args)
Execute loop test. |
Method |
getExecuteMethod(String methodName,
Class<?>[] methodParamTypes)
Get Execute Method |
int |
getExecuteTimes()
Get execute times |
Logger |
getLogger()
Get Logger |
long |
getResult()
Get result value |
Object |
getTarget()
Get target instance or class. |
String |
getTestName()
Get test name. |
void |
printResult()
Print result value |
void |
recordTestEnd()
Record test end time(millisec) |
void |
recordTestStart()
Record test start time(millisec) |
void |
repeat(int executeTimes,
Object target,
Method executeMethod,
Object... args)
Execute loop |
ComparativePerformanceTest |
setExecuteTimes(int executeTimes)
Set execute times |
ComparativePerformanceTest |
setLogger(Logger logger)
Set Logger |
ComparativePerformanceTest |
setPrintResultFlag(boolean printResultFlag)
Set printResultFlag |
ComparativePerformanceTest |
setTarget(Object target)
Set target instance or class. |
ComparativePerformanceTest |
setTestName(String testName)
Set test name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_EXECUTE_TIMES
Constructor Detail |
---|
public ComparativePerformanceTestImpl()
public ComparativePerformanceTestImpl(String testName)
testName
- test nameMethod Detail |
---|
public void recordTestStart()
recordTestStart
in interface ComparativePerformanceTest
public void recordTestEnd()
recordTestEnd
in interface ComparativePerformanceTest
public long getResult()
getResult
in interface ComparativePerformanceTest
public ComparativePerformanceTest setPrintResultFlag(boolean printResultFlag)
setPrintResultFlag
in interface ComparativePerformanceTest
public void printResult()
printResult
in interface ComparativePerformanceTest
PrinterImpl
public void errorPrint(String str)
errorPrint
in interface ComparativePerformanceTest
str
- String message to printpublic void repeat(int executeTimes, Object target, Method executeMethod, Object... args)
repeat
in interface ComparativePerformanceTest
executeTimes
- loop execute timestarget
- target instance or classexecuteMethod
- execute method objectargs
- method parameterspublic long execute(int executeTimes, Object instance, Method executeMethod, Object... args)
execute
in interface ComparativePerformanceTest
executeTimes
- loop execute timesinstance
- target instance(if execute instance method)executeMethod
- execute method objectargs
- method parameters
public long execute(Method execuMethod, Object... args)
execute
in interface ComparativePerformanceTest
executeMethod
- execute method objectargs
- method parameters
public Logger getLogger()
getLogger
in interface ComparativePerformanceTest
public ComparativePerformanceTest setLogger(Logger logger)
setLogger
in interface ComparativePerformanceTest
logger
- public int getExecuteTimes()
getExecuteTimes
in interface ComparativePerformanceTest
public ComparativePerformanceTest setExecuteTimes(int executeTimes)
setExecuteTimes
in interface ComparativePerformanceTest
executeTimes
- execute timespublic Object getTarget()
getTarget
in interface ComparativePerformanceTest
public ComparativePerformanceTest setTarget(Object target)
setTarget
in interface ComparativePerformanceTest
targetInstance
- target instancepublic String getTestName()
getTestName
in interface ComparativePerformanceTest
public ComparativePerformanceTest setTestName(String testName)
setTestName
in interface ComparativePerformanceTest
testName
- test namepublic Method getExecuteMethod(String methodName, Class<?>[] methodParamTypes) throws NoSuchMethodException, IllegalStateException
getExecuteMethod
in interface ComparativePerformanceTest
targetInstance
- methodName
- methodParamTypes
-
NoSuchMethodException
IllegalStateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |