public class PoissonLoadGenerator extends java.lang.Object implements LoadGenerator
Modifier and Type | Class and Description |
---|---|
private class |
PoissonLoadGenerator.ClientThread
Thread class which runs a single client and collects results.
|
Modifier and Type | Field and Description |
---|---|
private double |
avgWaitTime
The average time (in milliseconds) between each request from a client.
|
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 PoissonLoadGenerator.ClientThread[] |
threads
The client threads used to generate load.
|
Constructor and Description |
---|
PoissonLoadGenerator(double avgWaitTime)
Construct a
PoissonLoadGenerator instance. |
Modifier and Type | Method and Description |
---|---|
void |
init(Client[] clients)
Initialize the load generator.
|
void |
printReport(java.io.PrintStream out)
Print average transaction injection rate and response times.
|
void |
startSteadyState()
Start steady-state phase.
|
void |
startWarmup()
Start warmup phase.
|
void |
stop()
Stop the load generator.
|
private final double avgWaitTime
private PoissonLoadGenerator.ClientThread[] threads
private volatile boolean stop
private volatile boolean collect
private long startTime
private long stopTime
public PoissonLoadGenerator(double avgWaitTime)
PoissonLoadGenerator
instance.avgWaitTime
- the time (in millisecond) between each request from
a clientpublic void init(Client[] clients)
init
in interface LoadGenerator
clients
- the test clients to usepublic void startWarmup()
startWarmup
in interface LoadGenerator
public void startSteadyState()
startSteadyState
in interface LoadGenerator
public void stop()
stop
in interface LoadGenerator
public void printReport(java.io.PrintStream out)
printReport
in interface LoadGenerator
out
- stream to print the report toApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.