org.apache.derbyTesting.perf.clients
Class BackToBackLoadGenerator

java.lang.Object
  extended by org.apache.derbyTesting.perf.clients.BackToBackLoadGenerator
All Implemented Interfaces:
LoadGenerator

public class BackToBackLoadGenerator
extends java.lang.Object
implements LoadGenerator

Load generator which creates back-to-back load. This means that you have a number of threads running in parallel, where each thread continuously performs operations with no pauses in between.


Nested Class Summary
private  class BackToBackLoadGenerator.ClientThread
          Thread class which runs a single client and collects results.
 
Field Summary
private  boolean collect
          Flag which tells the generator to collect results.
private  long startTime
          Start time for steady-state phase.
private  boolean stop
          Flag which tells the generator to stop.
private  long stopTime
          Stop time for steady-state phase.
private  BackToBackLoadGenerator.ClientThread[] threads
          The threads executing.
 
Constructor Summary
BackToBackLoadGenerator()
           
 
Method Summary
 void init(Client[] clients)
          Initialize the load generator.
 void printReport(java.io.PrintStream out)
          Print average number of transactions per second.
 void startSteadyState()
          Start steady state.
 void startWarmup()
          Start warmup.
 void stop()
          Stop the load generator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threads

private BackToBackLoadGenerator.ClientThread[] threads
The threads executing.


stop

private volatile boolean stop
Flag which tells the generator to stop.


collect

private volatile boolean collect
Flag which tells the generator to collect results.


startTime

private long startTime
Start time for steady-state phase.


stopTime

private long stopTime
Stop time for steady-state phase.

Constructor Detail

BackToBackLoadGenerator

public BackToBackLoadGenerator()
Method Detail

init

public void init(Client[] clients)
Initialize the load generator.

Specified by:
init in interface LoadGenerator
Parameters:
clients - the test clients to use

startWarmup

public void startWarmup()
Start warmup.

Specified by:
startWarmup in interface LoadGenerator

startSteadyState

public void startSteadyState()
Start steady state.

Specified by:
startSteadyState in interface LoadGenerator

stop

public void stop()
Stop the load generator.

Specified by:
stop in interface LoadGenerator

printReport

public void printReport(java.io.PrintStream out)
Print average number of transactions per second.

Specified by:
printReport in interface LoadGenerator
Parameters:
out - stream to print the report to

Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.