|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni.leipzig.IR15.Benchmark.Benchmark
public abstract class Benchmark
This abstract base class must be extended by any benchmark in the suite. It defines some simple methods which are used during benchmark processing.
Constructor Summary | |
---|---|
Benchmark()
|
Method Summary | |
---|---|
abstract void |
afterRun()
This method is called after each single call of run() |
abstract void |
beforeRun()
This method is called before each single call of run() |
int |
getCurrentRun()
Returns the number of current benchmark run |
abstract java.lang.String |
getName()
Returns the Benchmarks name |
java.util.Map<java.lang.String,java.lang.Object> |
getResults(long[] runtimes)
This method calculates some default measurement results: average, standard deviation, minimum and maximum value. |
int |
getRuns()
Returns the number of benchmarks to run |
abstract void |
run()
This method runs the benchmark |
void |
setCurrentRun(int currentRun)
Set the number of current benchmark run |
void |
setRuns(int runs)
Sets the number of benchmarks to run |
abstract void |
setUp()
This method is called once before run() is invoked for the
first time. |
abstract void |
tearDown()
This method is called once after the last call of run() |
abstract void |
warmup()
This method is called once before the benchmark starts |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Benchmark()
Method Detail |
---|
public void setRuns(int runs)
runs
- number of benchmarkspublic int getRuns()
public void setCurrentRun(int currentRun)
currentRun
- public int getCurrentRun()
public abstract void setUp()
run()
is invoked for the
first time.
public abstract void run()
public abstract void tearDown()
run()
public abstract void beforeRun()
run()
public abstract void afterRun()
run()
public abstract void warmup()
public abstract java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.Object> getResults(long[] runtimes)
runtimes
- an array with all benchmark results
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |