net.sf.jbenchmark
Class FixedThroughputTest

java.lang.Object
  extended bynet.sf.jbenchmark.TestFeature
      extended bynet.sf.jbenchmark.Test
          extended bynet.sf.jbenchmark.FixedThroughputTest
All Implemented Interfaces:
java.lang.Runnable

public class FixedThroughputTest
extends Test

A test that adds delays to ensure a constant throughput. TODO - change the algorithm to deal with tests that run longer than that required for constant throughput

Version:
$Id: FixedThroughputTest.java,v 1.2 2004/02/05 09:25:23 dcotterill Exp $
Author:
Adam Murdoch

Constructor Summary
FixedThroughputTest()
           
 
Method Summary
protected  TestResult doRun()
          Executes the test.
 void setThroughput(int throughtput)
          Sets the throughtput (tests/second).
 
Methods inherited from class net.sf.jbenchmark.Test
addAssertion, addFeature, addResource, doCleanup, doInitialise, finish, getFeatureContext, getResource, run, setContext
 
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
 

Constructor Detail

FixedThroughputTest

public FixedThroughputTest()
Method Detail

setThroughput

public void setThroughput(int throughtput)
Sets the throughtput (tests/second).


doRun

protected TestResult doRun()
                    throws java.lang.Exception
Executes the test. This method may be called more than once, and from more than one thread.

Specified by:
doRun in class Test
Throws:
java.lang.Exception