Modifier and Type | Class and Description |
---|---|
protected static class |
Runner.TestClass |
Modifier and Type | Field and Description |
---|---|
protected List<Runner.TestClass> |
benchmarks |
protected int |
count |
protected CSVWriter |
csv |
protected PrintStream |
out |
Constructor and Description |
---|
Runner()
Construct a Runner with logging to System.out.
|
Runner(PrintStream out)
Construct a Runner with logging to the given stream.
|
Modifier and Type | Method and Description |
---|---|
void |
addCase(String className)
Add all
Benchmark s from the given class. |
static void |
main(String[] args)
Main method that runs all benchmarks from the classes given as
arguments.
|
protected double[] |
measure(Object object,
Method method)
Run a single benchmark.
|
void |
run()
Run all benchmarks and report results.
|
void |
setCount(int count)
Set number of measurements done for each test.
|
void |
setCSV(CSVWriter writer)
Log results to a CSV file.
|
protected int count
protected final List<Runner.TestClass> benchmarks
protected final PrintStream out
protected CSVWriter csv
public Runner()
public Runner(PrintStream out)
out
- public static void main(String[] args) throws IOException
IOException
public void setCount(int count)
count
- must be > 0public void setCSV(CSVWriter writer) throws IOException
run()
returns.writer
- IOException
public void addCase(String className)
Benchmark
s from the given class.className
- fully qualified class namepublic void run() throws IOException
IOException