PCJ API
Version 1.2

bak.pcj.benchmark
Class BenchmarkRunner

java.lang.Object
  extended bybak.pcj.benchmark.BenchmarkRunner

public class BenchmarkRunner
extends Object

Controls the execution of benchmarks. The runner automatically discovers benchmark tasks in benchmark classes using the reflection mechanism. This procedure is inspired by the way that JUnit works.

Since:
1.0

Constructor Summary
BenchmarkRunner()
          Creates a new benchmark runner with an empty report.
 
Method Summary
 Report getReport()
          Returns the report produced by this benchmark runner.
static void main(String[] args)
          Runs the a benchmark from the command line.
 void runBenchmark(Benchmark bm, DataSet dataSet)
          Runs a specified benchmark on a specified data set.
 void setVerbose(boolean verbose)
          Enables or disables verbose output to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BenchmarkRunner

public BenchmarkRunner()
Creates a new benchmark runner with an empty report.

Method Detail

setVerbose

public void setVerbose(boolean verbose)
Enables or disables verbose output to System.out. Verbose output is enabled by default.

Parameters:
verbose - true if verbose output should be enabled; false otherwise.

getReport

public Report getReport()
Returns the report produced by this benchmark runner. Note that the returned report is mutable and can be modified before formatting.

Returns:
the report produced by this benchmark runner.

runBenchmark

public void runBenchmark(Benchmark bm,
                         DataSet dataSet)
Runs a specified benchmark on a specified data set. The results are collected in the runner's report.

Parameters:
bm - the benchmark to run.
dataSet - the data set on which to run the benchmark.
See Also:
getReport()

main

public static void main(String[] args)
Runs the a benchmark from the command line.
The first parameter is the name of the data set class to use.
The second parameter is the size of the data sets to use.
The third parameter is the name of the benchmark class to use.
The fourth parameter is name of file on which to write the results.

Parameters:
args - as specified above.

PCJ API
Version 1.2

Report a bug or request a feature.
Further information on the development and latest release of PCJ can be found at the project homepage.

Primitive Collections for Java is released under the GNU Lesser General Public License.
Copyright © 2002, 2003 Søren Bak. All Rights Reserved.

Hosted by SourceForge.net
SourceForge.net Logo