uk.org.skeet.jbench
Class EventWriter

java.lang.Object
  |
  +--uk.org.skeet.jbench.EventWriter
All Implemented Interfaces:
java.util.EventListener, JBenchEventListener

public class EventWriter
extends java.lang.Object
implements JBenchEventListener

Simple class to implement JBenchEventListener by writing results out to a PrintWriter.


Constructor Summary
EventWriter(java.io.PrintWriter out, boolean closeOnFinish)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventWriter

public EventWriter(java.io.PrintWriter out,
                   boolean closeOnFinish)
Method Detail

runStarting

public void runStarting()
Description copied from interface: JBenchEventListener
Called when a JBench run is starting
Specified by:
runStarting in interface JBenchEventListener
See Also:
JBenchEventListener.runStarting()

runAborted

public void runAborted(java.lang.String reason)
Description copied from interface: JBenchEventListener
Called when the run has been aborted due to a failure
Specified by:
runAborted in interface JBenchEventListener
See Also:
JBenchEventListener.runAborted(String)

taskConfigurationSuccess

public void taskConfigurationSuccess(BenchTask task,
                                     int taskNumber)
Description copied from interface: JBenchEventListener
Called when a task has successfully been configured
Specified by:
taskConfigurationSuccess in interface JBenchEventListener
See Also:
JBenchEventListener.taskConfigurationSuccess(BenchTask, int)

taskConfigurationFailure

public void taskConfigurationFailure(java.lang.String taskClass,
                                     int taskNumber,
                                     java.lang.String reason)
Description copied from interface: JBenchEventListener
Called when a task has failed to be configured
Specified by:
taskConfigurationFailure in interface JBenchEventListener
See Also:
JBenchEventListener.taskConfigurationFailure(String, int, String)

noTasks

public void noTasks()
Description copied from interface: JBenchEventListener
Called when there are no successfully configured tasks (just before a runAbort)
Specified by:
noTasks in interface JBenchEventListener
See Also:
JBenchEventListener.noTasks()

taskStarting

public void taskStarting(BenchTask task,
                         int taskNumber,
                         int taskTotal)
Description copied from interface: JBenchEventListener
Called to report that a set of tests are about to be run on a task
Specified by:
taskStarting in interface JBenchEventListener
See Also:
JBenchEventListener.taskStarting(BenchTask, int, int)

testStarting

public void testStarting(BenchTask task,
                         int taskNumber,
                         int taskTotal,
                         int testNumber,
                         int testTotal)
Description copied from interface: JBenchEventListener
Called to report that a single test is about to be run
Specified by:
testStarting in interface JBenchEventListener
See Also:
JBenchEventListener.testStarting(BenchTask, int, int, int, int)

testFailed

public void testFailed(BenchTask task,
                       int taskNumber,
                       int taskTotal,
                       int testNumber,
                       int testTotal,
                       java.lang.String reason)
Description copied from interface: JBenchEventListener
Called to report that a test has failed
Specified by:
testFailed in interface JBenchEventListener
See Also:
JBenchEventListener.testFailed(BenchTask, int, int, int, int, String)

taskAborted

public void taskAborted(BenchTask task,
                        int taskNumber,
                        int taskTotal,
                        java.lang.String reason)
Description copied from interface: JBenchEventListener
Called to report that a task has been aborted
Specified by:
taskAborted in interface JBenchEventListener
See Also:
JBenchEventListener.taskAborted(BenchTask, int, int, String)

taskCompleted

public void taskCompleted(BenchTask task,
                          int taskNumber,
                          int taskTotal,
                          TaskResults results)
Description copied from interface: JBenchEventListener
Called to report that a task has been completed
Specified by:
taskCompleted in interface JBenchEventListener
See Also:
JBenchEventListener.taskCompleted(BenchTask, int, int, TaskResults)

runCompleted

public void runCompleted()
Description copied from interface: JBenchEventListener
Called to report that a JBench run has been completed
Specified by:
runCompleted in interface JBenchEventListener
See Also:
JBenchEventListener.runCompleted()

globalConfigurationFailure

public void globalConfigurationFailure(java.lang.String reason)
Description copied from interface: JBenchEventListener
Called to report that global (general) configuration has failed
Specified by:
globalConfigurationFailure in interface JBenchEventListener
See Also:
JBenchEventListener.globalConfigurationFailure(String)

globalConfigurationSuccess

public void globalConfigurationSuccess(BenchSuite config)
Description copied from interface: JBenchEventListener
Called to report that global (general) configuration has succeeded
Specified by:
globalConfigurationSuccess in interface JBenchEventListener
See Also:
JBenchEventListener.globalConfigurationSuccess(BenchSuite)

allConfigurationSuccess

public void allConfigurationSuccess(BenchSuite config)
Description copied from interface: JBenchEventListener
Called when all tasks have been configured
Specified by:
allConfigurationSuccess in interface JBenchEventListener
See Also:
JBenchEventListener.allConfigurationSuccess(BenchSuite)

suiteConfigurationFailure

public void suiteConfigurationFailure(java.lang.String description,
                                      java.lang.String reason)
Description copied from interface: JBenchEventListener
Called when a subsidiary suite has failed to be configured
Specified by:
suiteConfigurationFailure in interface JBenchEventListener
See Also:
JBenchEventListener.suiteConfigurationFailure(String, String)

suiteConfigurationStart

public void suiteConfigurationStart(java.lang.String description)
Description copied from interface: JBenchEventListener
Called when a subsidiary suite is about to be configured
Specified by:
suiteConfigurationStart in interface JBenchEventListener
See Also:
JBenchEventListener.suiteConfigurationStart(String)

suiteConfigurationSuccess

public void suiteConfigurationSuccess(java.lang.String description)
Description copied from interface: JBenchEventListener
Called when a subsidiary suite has successfully been configured
Specified by:
suiteConfigurationSuccess in interface JBenchEventListener
See Also:
JBenchEventListener.suiteConfigurationSuccess(String)