net.sf.jbenchmark
Class TestThreadGroup

java.lang.Object
  extended bynet.sf.jbenchmark.TestFeature
      extended bynet.sf.jbenchmark.Test
          extended bynet.sf.jbenchmark.TestGroup
              extended bynet.sf.jbenchmark.TestThreadGroup
All Implemented Interfaces:
java.lang.Runnable, TestContext, TestListener

public class TestThreadGroup
extends TestGroup

A test that runs a test in several threads.

Version:
$Id: TestThreadGroup.java,v 1.4 2004/06/28 01:15:37 bdargan Exp $
Author:
Adam Murdoch

Constructor Summary
TestThreadGroup()
           
 
Method Summary
protected  TestResult doRun()
          Executes the test.
 int getThreadCount()
          The thread group test creates a fixed number of threads per containing thread.
 void setRampup(int rampUp)
          Sets the ramp up time in seconds.
 void setThreads(int numThreads)
          Sets the number of threads.
 
Methods inherited from class net.sf.jbenchmark.TestGroup
addListener, addTest, getAttribute, getExternalResource, getFeatureContext, getListener, getTests, setAttribute, setContext, testFailed, testFinished, testStart
 
Methods inherited from class net.sf.jbenchmark.Test
addAssertion, addFeature, addResource, doCleanup, doInitialise, finish, getResource, run
 
Methods inherited from class net.sf.jbenchmark.TestFeature
getContext, getName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.jbenchmark.TestContext
getResource
 

Constructor Detail

TestThreadGroup

public TestThreadGroup()
Method Detail

setThreads

public void setThreads(int numThreads)
Sets the number of threads.


getThreadCount

public int getThreadCount()
The thread group test creates a fixed number of threads per containing thread.

Specified by:
getThreadCount in interface TestContext
Overrides:
getThreadCount in class TestGroup

setRampup

public void setRampup(int rampUp)
Sets the ramp up time in seconds.


doRun

protected TestResult doRun()
                    throws java.lang.Exception
Executes the test.

Overrides:
doRun in class TestGroup
Throws:
java.lang.Exception