Skip to content

Instantly share code, notes, and snippets.

@WilliamParker
Created April 22, 2016 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WilliamParker/c93eef9cf4522b29f430c9445f7855da to your computer and use it in GitHub Desktop.
Save WilliamParker/c93eef9cf4522b29f430c9445f7855da to your computer and use it in GitHub Desktop.
See clara-rules issue 182
package clara.benchmark;
import java.util.Iterator;
/**
* Benchmark interface.
*/
public interface IBenchmark<T, E> {
/**
* Returns the benchmark name.
*/
public String getName();
/**
* Returns the state used to setup the benchmark.
*/
public T getSession() throws Exception;
/**
* Returns a sequence of facts to be used in the benchmark.
*/
public Iterable<E> getFacts() throws Exception;
/**
* Runs an iteration of the benchmark.
*/
public void run(T session, Iterable<E> facts) throws Exception;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment