juju.reattore.perfcap.tester.impl
Class ABTester

java.lang.Object
  |
  +--juju.reattore.perfcap.tester.impl.ABTester
All Implemented Interfaces:
Tester

public class ABTester
extends java.lang.Object
implements Tester

Tests a HTTP server using ApacheBench.


Constructor Summary
ABTester()
           
 
Method Summary
 Results go()
          Run the test and return the results.
 void setCmd(java.lang.String cmd)
          The command to use to run ApacheBench, in Message format form.
 void setConcurrent(int argConcurrent)
          The number of concurrent connections to use with the server.
 void setKeepAlive(boolean argKeepAlive)
          Enable using HTTP keep-alive during the test.
 void setKeepAlive(int val)
          Alternative way of enabling keep-alive.
 void setTimeLimit(int argTimeLimit)
          Time in seconds to run the test for.
 void setUrl(java.lang.String argUrl)
          The URL to test against.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ABTester

public ABTester()
Method Detail

setKeepAlive

public void setKeepAlive(boolean argKeepAlive)
Enable using HTTP keep-alive during the test.

Parameters:
argKeepAlive - Value to assign to this.keepAlive

setKeepAlive

public void setKeepAlive(int val)
Alternative way of enabling keep-alive. Use with an integer variable that changes between 0 and non-zero.

Parameters:
val - 0 for off, non-zero for on.

setConcurrent

public void setConcurrent(int argConcurrent)
The number of concurrent connections to use with the server.

Parameters:
argConcurrent - Value to assign to this.concurrent

setTimeLimit

public void setTimeLimit(int argTimeLimit)
Time in seconds to run the test for.

Parameters:
argTimeLimit - Value to assign to this.timeLimit

setUrl

public void setUrl(java.lang.String argUrl)
The URL to test against.

Parameters:
argUrl - Value to assign to this.url

setCmd

public void setCmd(java.lang.String cmd)
The command to use to run ApacheBench, in Message format form. The arguments are:

Parameters:
cmd - The command to run.

go

public Results go()
           throws java.lang.Exception
Description copied from interface: Tester
Run the test and return the results.

Specified by:
go in interface Tester
Returns:
The results of the test.
Throws:
java.lang.Exception - on fatal error.
See Also:
Tester


Copyright © 2002-2003 Michael Hope. All Rights Reserved.