Class PerformanceFixture
- java.lang.Object
-
- com.spotify.apollo.test.experimental.PerformanceFixture
-
public final class PerformanceFixture extends Object
-
-
Field Summary
Fields Modifier and Type Field Description StubClientclientScheduledExecutorServiceexecutor
-
Constructor Summary
Constructors Constructor Description PerformanceFixture()PerformanceFixture(int threads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> com.google.common.util.concurrent.ListenableFuture<T>call()Dummy implementation that should be overriden if doing perf tests with pump.voidclear()ResponseTimeMetriccreateMetric()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.
-
-
-
Field Detail
-
executor
public final ScheduledExecutorService executor
-
client
public final StubClient client
-
-
Method Detail
-
createMetric
public ResponseTimeMetric createMetric()
Create a metric for tracking load tests.
-
pump
public com.google.common.util.concurrent.ListenableFuture<Void> pump(int rps, int runtime, ResponseTimeMetric metric)
Run a load test with the given parameters.- Parameters:
rps- Request per second when at full rate.runtime- Number of seconds to run.metric- A ResponseTimeMetric to use for tracking requests.- Returns:
- A Future that will be finished when 'runtime' seconds has passed.
-
call
protected <T> com.google.common.util.concurrent.ListenableFuture<T> call()
Dummy implementation that should be overriden if doing perf tests with pump.
-
clear
public void clear()
-
-