Class BenchmarkGroupBuilder
java.lang.Object
com.codingchili.core.benchmarking.BenchmarkGroupBuilder
- All Implemented Interfaces:
BenchmarkGroup
"Abstract" implementation of a map group.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BenchmarkImplementation implementation)Get the implementations enlisted for benchmarking in this group.intNumber of iterations that the benchmark operation is to be executed.getName()The handler of the benchmark group, for example "networking" or "storage".intReturn the number of iterations to complete before calling a listeners progress listener.implementation(String implementationName)Adds a new implementation to the benchmark group.setImplementations(Map<String,BenchmarkImplementation> implementations)Sets the implementations in the group to the given list.
-
Constructor Details
-
BenchmarkGroupBuilder
- Parameters:
name- the name of the group.iterations- number of iterations to perform for each benchmark.
-
-
Method Details
-
getName
Description copied from interface:BenchmarkGroupThe handler of the benchmark group, for example "networking" or "storage". Benchmarks are grouped under this in the reports.- Specified by:
getNamein interfaceBenchmarkGroup- Returns:
- a string that identifies a group of benchmarks.
-
getIterations
public int getIterations()Description copied from interface:BenchmarkGroupNumber of iterations that the benchmark operation is to be executed.- Specified by:
getIterationsin interfaceBenchmarkGroup- Returns:
- a integer indicating the number of operation iterations.
-
getImplementations
Description copied from interface:BenchmarkGroupGet the implementations enlisted for benchmarking in this group.- Specified by:
getImplementationsin interfaceBenchmarkGroup- Returns:
- a list of implementations to benchmark.
-
setImplementations
Description copied from interface:BenchmarkGroupSets the implementations in the group to the given list. May be used when creating reports.- Specified by:
setImplementationsin interfaceBenchmarkGroup- Parameters:
implementations- the implementations to set.- Returns:
- fluent
-
implementation
Description copied from interface:BenchmarkGroupAdds a new implementation to the benchmark group.- Specified by:
implementationin interfaceBenchmarkGroup- Parameters:
implementationName- the name of the implementation to add.- Returns:
- an implementation
-
getProgressInterval
public int getProgressInterval()Description copied from interface:BenchmarkGroupReturn the number of iterations to complete before calling a listeners progress listener.- Specified by:
getProgressIntervalin interfaceBenchmarkGroup- Returns:
- the number of iterations.
-
add
- Specified by:
addin interfaceBenchmarkGroup- Parameters:
implementation- the benchmark implementation to add.
-