Interface BenchmarkImplementation

All Known Implementing Classes:
BenchmarkImplementationBuilder, MapBenchmarkImplementation

public interface BenchmarkImplementation
Groups benchmarks of the same implementation together.
  • Method Details

    • initialize

      void initialize(CoreContext core, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> future)
      Prepares an implementation for testing.
      Parameters:
      core - the context to use for the benchmark
      future - called when the setup is complete.
    • next

      void next(io.vertx.core.Promise<Void> future)
      Called before each benchmark is executed.
      Parameters:
      future - callback
    • reset

      void reset(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> future)
      Called after the warmup phase has completed.
      Parameters:
      future - callback
    • shutdown

      void shutdown(io.vertx.core.Promise<Void> future)
      Called after the benchmarking has completed.
      Parameters:
      future - callback
    • add

      Adds a new benchmark created from an operation and name.
      Parameters:
      name - the name of the operation/benchmark.
      operation - the operation to execute as a benchmark.
      Returns:
      fluent
    • getBenchmarks

      List<Benchmark> getBenchmarks()
      Returns:
      a listof benchmarks that should be executed for the given implementation.
    • setBenchmarks

      BenchmarkImplementation setBenchmarks(List<Benchmark> benchmarks)
      Sets the benchmarks to a list of benchmarks, may be used when creating reports.
      Parameters:
      benchmarks - the benchmarks to set
      Returns:
      fluent
    • getName

      String getName()
      Name of the implementation that is used within a benchmark. A good choice is Class.getSimpleName().
      Returns:
      a string that identifies the implementation tested.
    • setName

      BenchmarkImplementation setName(String name)
      May be used in the reporting phase to restructure results.
      Parameters:
      name - the name of the implementation
      Returns:
      fluent.
    • setProperty

      BenchmarkImplementation setProperty(String key, Object value)
      Set a property of the benchmark implementation.
      Parameters:
      key - the key to identify the value.
      value - the value to be inserted.
      Returns:
      fluent
    • getProperties

      Map<String,​Object> getProperties()
      get all properties added to the implementation.
      Returns:
      a map of all the properties that has been set.
    • setGroup

      Parameters:
      group - the group the implementation is part of.
      Returns:
      fluent