|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.pcj.benchmark.Benchmark
This class represents benchmark tests. All benchmarks should
inherit this class. When writing a benchmark, create public
methods starting with "benchmark" and taking one argument of
class DataSet
. After invoking each of these
methods, the benchmark runner will read the benchmark's timer
to produce a result. Within such a benchmark method, the timer
should be started when initialization is done and stopped when
the operations are done. The pattern is this:
public String benchmarkXXXXX(DataSet dataSet) { <initialize> startTimer(); <operations to benchmark> stopTimer(); <clean up> return "description of task"; }
Constructor Summary | |
Benchmark()
|
Method Summary | |
abstract String |
getClassId()
Returns the name of the class that is benchmarked. |
long |
readTimer()
Returns the last timing result. |
protected void |
startTimer()
Starts the timer to measure operations. |
protected void |
stopTimer()
Starts the timer to measure operations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Benchmark()
Method Detail |
protected void startTimer()
protected void stopTimer()
public long readTimer()
public abstract String getClassId()
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |