public abstract class BenchmarkTask extends Object
| Constructor and Description |
|---|
BenchmarkTask(String name)
Creates a new instance of BenchmarkTask with specified name
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public BenchmarkTask(String name)
name - benchmark task namepublic 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()
Copyright © 2019 Neuroph Project. All rights reserved.