public final class PerformanceFixture extends Object
Modifier and Type | Field and Description |
---|---|
StubClient |
client |
ScheduledExecutorService |
executor |
Constructor and Description |
---|
PerformanceFixture() |
PerformanceFixture(int threads) |
Modifier and Type | Method and Description |
---|---|
protected <T> com.google.common.util.concurrent.ListenableFuture<T> |
call()
Dummy implementation that should be overriden if doing perf tests with pump.
|
void |
clear() |
ResponseTimeMetric |
createMetric()
Create a metric for tracking load tests.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
pump(int rps,
int runtime,
ResponseTimeMetric metric)
Run a load test with the given parameters.
|
public final ScheduledExecutorService executor
public final StubClient client
public PerformanceFixture()
public PerformanceFixture(int threads)
public ResponseTimeMetric createMetric()
public com.google.common.util.concurrent.ListenableFuture<Void> pump(int rps, int runtime, ResponseTimeMetric metric)
rps
- Request per second when at full rate.runtime
- Number of seconds to run.metric
- A ResponseTimeMetric to use for tracking requests.protected <T> com.google.common.util.concurrent.ListenableFuture<T> call()
public void clear()
Copyright © 2016. All rights reserved.