Class PerformanceFixture


  • public final class PerformanceFixture
    extends Object
    • Constructor Detail

      • PerformanceFixture

        public PerformanceFixture()
      • PerformanceFixture

        public PerformanceFixture​(int threads)
    • 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()