| java.lang.Object bak.pcj.benchmark.Benchmark
All known Subclasses: bak.pcj.benchmark.MapBenchmark, bak.pcj.benchmark.IntKeyIntMapBenchmark, bak.pcj.benchmark.CollectionBenchmark, bak.pcj.benchmark.IntCollectionBenchmark, bak.pcj.benchmark.IntKeyMapBenchmark,
Benchmark | abstract public class Benchmark (Code) | | 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 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";
}
author: Søren Bak version: 1.0 2003/4/1 since: 1.0 |
Method Summary | |
abstract public String | getClassId() Returns the name of the class that is benchmarked. | public 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. |
getClassId | abstract public String getClassId()(Code) | | Returns the name of the class that is benchmarked.
the name of the class that is benchmarked. |
readTimer | public long readTimer()(Code) | | Returns the last timing result. If no timing result is
available, the return value is undefined.
the last timing result. |
startTimer | protected void startTimer()(Code) | | Starts the timer to measure operations.
|
stopTimer | protected void stopTimer()(Code) | | Starts the timer to measure operations.
|
|
|