Created
April 22, 2016 20:24
-
-
Save WilliamParker/c93eef9cf4522b29f430c9445f7855da to your computer and use it in GitHub Desktop.
See clara-rules issue 182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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