|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neuroph.util.benchmark.BenchmarkTask
public abstract class BenchmarkTask
This class is an abstract base class for specific microbenchmarking tasks
| Constructor Summary | |
|---|---|
BenchmarkTask(String name)
Creates a new instance of BenchmarkTask with specified name |
|
| Method Summary | |
|---|---|
String |
getName()
Gets task name |
int |
getTestIterations()
Gets number of test (benchmarking) iterations |
int |
getWarmupIterations()
Gets number of warmup iterations. |
abstract void |
prepareTest()
Any initialization before running performance test (benchmark) goes here |
abstract void |
runTest()
This method should hold the code to benchmark |
void |
setName(String name)
Sets task name |
void |
setTestIterations(int testIterations)
Sets number of test (benchmarking) iterations |
void |
setWarmupIterations(int warmupIterations)
Sets the number of warmup iterations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BenchmarkTask(String name)
name - benchmark task name| Method Detail |
|---|
public String getName()
public void setName(String name)
name - task namepublic int getTestIterations()
public void setTestIterations(int testIterations)
testIterations - number of test iterationspublic int getWarmupIterations()
public void setWarmupIterations(int warmupIterations)
warmupIterations - number of warmup iterations
Warmup iterations are used to run test for some time to stabilize JVM (compiling, optimizations, gc)public abstract void prepareTest()
public abstract void runTest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||