uk.org.skeet.jbench
Class JBenchConfiguration

java.lang.Object
  |
  +--uk.org.skeet.jbench.JBenchConfiguration

public class JBenchConfiguration
extends java.lang.Object

Class encapsulating general configuration and containing references to configured tasks. This class is now responsible for much of the work of JBench.


Inner Class Summary
static interface JBenchConfiguration.Defaults
          Interface for the default configuration values
static interface JBenchConfiguration.PropertyNames
          Interface for the property names appearing in the configuration file.
 
Constructor Summary
JBenchConfiguration()
          Constructor.
 
Method Summary
 void configure(java.util.Properties props)
          Configures this object from a set of properties.
 JBenchEventListener getEventListener()
           
 int getExcludeBest()
           
 int getExcludeWorst()
           
 java.util.List getPackages()
           
 int getRunsPerTask()
           
 java.util.List getSystemInformation()
           
 java.util.List getTaskList()
           
 BenchTimer getTimer()
           
 boolean isFailFast()
           
 void runTests()
          Runs the tests themselves.
 void setEventListener(JBenchEventListener eventListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBenchConfiguration

public JBenchConfiguration()
Constructor. After creation, a JBenchConfiguration may have its event listener specified before being otherwise configured, but cannot be used in other ways.
Method Detail

runTests

public void runTests()
Runs the tests themselves. Note that after each task is run, it is removed from the list so they may be garbage collected.

configure

public void configure(java.util.Properties props)
               throws ConfigurationException
Configures this object from a set of properties. Any exceptions are passed back and reported to the appropriate event listener, unless they occur before an event listener is configured, in which case they are reported to System.err.

getEventListener

public JBenchEventListener getEventListener()

setEventListener

public void setEventListener(JBenchEventListener eventListener)

getRunsPerTask

public int getRunsPerTask()

getSystemInformation

public java.util.List getSystemInformation()

getExcludeBest

public int getExcludeBest()

getExcludeWorst

public int getExcludeWorst()

getTimer

public BenchTimer getTimer()

getPackages

public java.util.List getPackages()

isFailFast

public boolean isFailFast()

getTaskList

public java.util.List getTaskList()