|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjigcell.compare.tests.Benchmark
jigcell.compare.tests.ElementBenchmark
public class ElementBenchmark
A collection of tests for evaluating element performance.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Field Summary | |
|---|---|
protected static int[][] |
SIZES
Parameter sizes for benchmarks |
protected IReadableDataSource |
source
Source to load from |
protected static java.lang.String[] |
TESTS
Tests for the time series format |
protected IDataEditorTab |
view
View to load in |
| Fields inherited from class jigcell.compare.tests.Benchmark |
|---|
benchmarkRunnable, compare |
| Constructor Summary | |
|---|---|
ElementBenchmark(Compare compare)
Creates a new tester for element creation performance. |
|
| Method Summary | |
|---|---|
double[] |
benchmark(java.lang.Class clazz,
int max,
int size)
Runs a creation benchmark on an element type. |
static double[] |
benchmarkType(java.lang.Class clazz,
int max,
int size)
Runs a creation benchmark for an element type. |
protected static void |
fillPrint(java.lang.String text,
int width)
Prints a right aligned string. |
static void |
main(java.lang.String[] args)
Compares the performance of two implemetations of IEditableDataElement. |
protected static double[] |
medianBenchmark(java.lang.Class clazz,
int max,
int size)
Runs benchmarks on an element type and reports the median speed and memory results. |
protected void |
runOffEventThread()
Performs the tester computations that do not interact with the interface. |
protected void |
runOnEventThread(int state)
Performs an operation that interacts with the interface. |
static void |
test(java.lang.Class clazz)
Performs validation tests on an element type. |
static void |
test(Compare compare)
Runs a creation benchmark on all known element types. |
| Methods inherited from class jigcell.compare.tests.Benchmark |
|---|
createBenchmarkReport, currentTime, loadInView, reset, runState, timeRunState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String[] TESTS
protected static final int[][] SIZES
protected IDataEditorTab view
protected IReadableDataSource source
| Constructor Detail |
|---|
public ElementBenchmark(Compare compare)
compare - Comparator to abuse| Method Detail |
|---|
public static double[] benchmarkType(java.lang.Class clazz,
int max,
int size)
throws java.lang.Exception
clazz - Implementation to testmax - Number of elements to createsize - Size of the elements
java.lang.Exceptionpublic static void main(java.lang.String[] args)
args - The first two arguments are the names of the classes to testpublic static void test(Compare compare)
compare - Comparator to abuse
public static void test(java.lang.Class clazz)
throws java.lang.Exception
clazz - Implementation to test
java.lang.Exception
protected static void fillPrint(java.lang.String text,
int width)
text - Textwidth - Amount of space to fill
protected static double[] medianBenchmark(java.lang.Class clazz,
int max,
int size)
throws java.lang.Exception
clazz - Implementation to testmax - Number of elements to createsize - Size of the elements
java.lang.Exception
public double[] benchmark(java.lang.Class clazz,
int max,
int size)
throws java.lang.Exception
clazz - Implementation to testmax - Number of elements to createsize - Size of the elements
java.lang.Exception
protected void runOffEventThread()
throws java.lang.Exception
runOffEventThread in class Benchmarkjava.lang.Exception
protected void runOnEventThread(int state)
throws java.lang.Exception
runOnEventThread in class Benchmarkstate - Indicates which interface operation is next
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||