|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to be implemented by all tasks. All implementations should have a public no-arg constructor, as this is what JBench will call to create an instance. Configuration parameters will be set using setXXX methods supplied by the implementation - these are detected automatically by JBench, which attempts to find an appropriate method for each configuration parameter specified.
Note that instance variables should be used to store configuration information, as a task may be configured in two different ways for two different sets of tests within the same benchmark.
After the configuration has been set, checkConfiguration
is called. If that doesn't throw an exception, the following sequence of
events happens for as many iterations as the global JBench configuration states:
prepareTest
is called to prepare for the next test run.
The time is checked.
runTest
is called to run the test itself.
The length of time taken is calculated.
checkResults
is called to make sure that the test has
actually done what it should have done.
If checkConfiguration throws an exception, the entire benchmark may or may not be abandoned, depending on how JBench itself has been configured.
If checkResults ever fails (ie throws an exception), the entire set of test results for this task are discarded, and the exception message is reported.
Method Summary | |
void |
checkConfiguration()
Checks that the configuration supplied is valid. |
void |
checkResults()
Checks that the test completed successfully. |
java.lang.String |
getDescription()
Returns a detailed description of the task, including any pertinent configuration information. |
void |
prepareTest()
Prepares the task for a test. |
void |
runTest()
Runs a test. |
Method Detail |
public void checkConfiguration() throws ConfigurationException
ConfigurationException
- if the configuration specified is incomplete
or invalid.public void prepareTest() throws TaskException
TaskException
- if the preparation failed.public void runTest() throws TaskException
TaskException
- if the test failed to complete normally.public void checkResults() throws TaskException
TaskException
- if the test failed.public java.lang.String getDescription()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |