Class ComparisonBenchmark
java.lang.Object
org.episteme.benchmarks.benchmark.ComparisonBenchmark
- All Implemented Interfaces:
RunnableBenchmark
A benchmark that compares multiple implementations of the same algorithm.
-
Constructor Summary
ConstructorsConstructorDescriptionComparisonBenchmark(String id, String name, String description, String domain) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImplementation(String name, RunnableBenchmark impl) getId()getName()intvoidrun()The core action to measure.voidsetImplementation(String name) voidsetup()Setup method called once before the benchmark runs.voidteardown()Cleanup method called once after the benchmark completes.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RunnableBenchmark
getAlgorithmProvider, getAlgorithmProviderInstance, getAlgorithmType, getPrecisionMode, isAvailable, isDryRun, setDryRun, setPrecisionMode
-
Constructor Details
-
ComparisonBenchmark
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceRunnableBenchmark- Returns:
- A unique stable identifier for this benchmark (e.g. "ga-tsp-50")
-
getName
- Specified by:
getNamein interfaceRunnableBenchmark- Returns:
- Unique human-readable name of the benchmark
-
getDescription
- Specified by:
getDescriptionin interfaceRunnableBenchmark- Returns:
- A detailed description of what the benchmark measures
-
getDomain
- Specified by:
getDomainin interfaceRunnableBenchmark- Returns:
- The domain of this benchmark (e.g. "Linear Algebra", "Physics")
-
addImplementation
-
setImplementation
-
getImplementations
-
setup
public void setup()Description copied from interface:RunnableBenchmarkSetup method called once before the benchmark runs. Use this to initialize data structures.- Specified by:
setupin interfaceRunnableBenchmark
-
run
public void run()Description copied from interface:RunnableBenchmarkThe core action to measure. This method will be called repeatedly in a loop.- Specified by:
runin interfaceRunnableBenchmark
-
teardown
public void teardown()Description copied from interface:RunnableBenchmarkCleanup method called once after the benchmark completes.- Specified by:
teardownin interfaceRunnableBenchmark
-
getSuggestedIterations
public int getSuggestedIterations()- Specified by:
getSuggestedIterationsin interfaceRunnableBenchmark- Returns:
- Estimated number of iterations required for a stable result
-
getMetadata
- Specified by:
getMetadatain interfaceRunnableBenchmark- Returns:
- Metadata about the benchmark configuration
-