uk.org.skeet.jbench
Interface JBenchEventListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
EventWriter

public interface JBenchEventListener
extends java.util.EventListener

Interface used for the output of all results. Note that currently all reasons etc are in English - this is not internationalisable (yet).

It should be possible to implement this interface in a way that is stateless in reference to JBench itself, only maintaining any state relating to the output itself (eg which Writer to write to).

The order in which these methods are called in a normal invocation of JBench is:

([] indicates that a method may not be called at all; * indicates that a method may be called more than once.)


Method Summary
 void allConfigurationSuccess(BenchSuite config)
          Called when all tasks have been configured
 void globalConfigurationFailure(java.lang.String reason)
          Called to report that global (general) configuration has failed
 void globalConfigurationSuccess(BenchSuite config)
          Called to report that global (general) configuration has succeeded
 void noTasks()
          Called when there are no successfully configured tasks (just before a runAbort)
 void runAborted(java.lang.String reason)
          Called when the run has been aborted due to a failure
 void runCompleted()
          Called to report that a JBench run has been completed
 void runStarting()
          Called when a JBench run is starting
 void suiteConfigurationFailure(java.lang.String description, java.lang.String reason)
          Called when a subsidiary suite has failed to be configured
 void suiteConfigurationStart(java.lang.String description)
          Called when a subsidiary suite is about to be configured
 void suiteConfigurationSuccess(java.lang.String description)
          Called when a subsidiary suite has successfully been configured
 void taskAborted(BenchTask task, int taskNumber, int taskTotal, java.lang.String reason)
          Called to report that a task has been aborted
 void taskCompleted(BenchTask task, int taskNumber, int taskTotal, TaskResults results)
          Called to report that a task has been completed
 void taskConfigurationFailure(java.lang.String taskClass, int taskNumber, java.lang.String reason)
          Called when a task has failed to be configured
 void taskConfigurationSuccess(BenchTask task, int taskNumber)
          Called when a task has successfully been configured
 void taskStarting(BenchTask task, int taskNumber, int taskTotal)
          Called to report that a set of tests are about to be run on a task
 void testFailed(BenchTask task, int taskNumber, int taskTotal, int testNumber, int testTotal, java.lang.String reason)
          Called to report that a test has failed
 void testStarting(BenchTask task, int taskNumber, int taskTotal, int testNumber, int testTotal)
          Called to report that a single test is about to be run
 

Method Detail

runStarting

public void runStarting()
Called when a JBench run is starting

runAborted

public void runAborted(java.lang.String reason)
Called when the run has been aborted due to a failure

globalConfigurationFailure

public void globalConfigurationFailure(java.lang.String reason)
Called to report that global (general) configuration has failed

globalConfigurationSuccess

public void globalConfigurationSuccess(BenchSuite config)
Called to report that global (general) configuration has succeeded

taskConfigurationSuccess

public void taskConfigurationSuccess(BenchTask task,
                                     int taskNumber)
Called when a task has successfully been configured

taskConfigurationFailure

public void taskConfigurationFailure(java.lang.String taskClass,
                                     int taskNumber,
                                     java.lang.String reason)
Called when a task has failed to be configured

suiteConfigurationSuccess

public void suiteConfigurationSuccess(java.lang.String description)
Called when a subsidiary suite has successfully been configured

suiteConfigurationFailure

public void suiteConfigurationFailure(java.lang.String description,
                                      java.lang.String reason)
Called when a subsidiary suite has failed to be configured

suiteConfigurationStart

public void suiteConfigurationStart(java.lang.String description)
Called when a subsidiary suite is about to be configured

noTasks

public void noTasks()
Called when there are no successfully configured tasks (just before a runAbort)

allConfigurationSuccess

public void allConfigurationSuccess(BenchSuite config)
Called when all tasks have been configured
Parameters:
tasks - all successfully configured BenchTasks

taskStarting

public void taskStarting(BenchTask task,
                         int taskNumber,
                         int taskTotal)
Called to report that a set of tests are about to be run on a task
Parameters:
task - task to be run
taskNumber - number of the task to be run (from 1)
taskTotal - total number of tasks to be run

testStarting

public void testStarting(BenchTask task,
                         int taskNumber,
                         int taskTotal,
                         int testNumber,
                         int testTotal)
Called to report that a single test is about to be run
Parameters:
task - task to be run
taskNumber - number of the task to be run (from 1)
taskTotal - total number of tasks to be run
testNumber - number of the test to be run (from 1)
testTotal - total number of tests to be run for this task

testFailed

public void testFailed(BenchTask task,
                       int taskNumber,
                       int taskTotal,
                       int testNumber,
                       int testTotal,
                       java.lang.String reason)
Called to report that a test has failed

taskAborted

public void taskAborted(BenchTask task,
                        int taskNumber,
                        int taskTotal,
                        java.lang.String reason)
Called to report that a task has been aborted

taskCompleted

public void taskCompleted(BenchTask task,
                          int taskNumber,
                          int taskTotal,
                          TaskResults results)
Called to report that a task has been completed

runCompleted

public void runCompleted()
Called to report that a JBench run has been completed