Class BenchmarkGroupBuilder
java.lang.Object
com.codingchili.core.benchmarking.BenchmarkGroupBuilder
- All Implemented Interfaces:
BenchmarkGroup
"Abstract" implementation of a map group.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(BenchmarkImplementation implementation)
Get the implementations enlisted for benchmarking in this group.int
Number of iterations that the benchmark operation is to be executed.getName()
The handler of the benchmark group, for example "networking" or "storage".int
Return 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:BenchmarkGroup
The handler of the benchmark group, for example "networking" or "storage". Benchmarks are grouped under this in the reports.- Specified by:
getName
in interfaceBenchmarkGroup
- Returns:
- a string that identifies a group of benchmarks.
-
getIterations
public int getIterations()Description copied from interface:BenchmarkGroup
Number of iterations that the benchmark operation is to be executed.- Specified by:
getIterations
in interfaceBenchmarkGroup
- Returns:
- a integer indicating the number of operation iterations.
-
getImplementations
Description copied from interface:BenchmarkGroup
Get the implementations enlisted for benchmarking in this group.- Specified by:
getImplementations
in interfaceBenchmarkGroup
- Returns:
- a list of implementations to benchmark.
-
setImplementations
Description copied from interface:BenchmarkGroup
Sets the implementations in the group to the given list. May be used when creating reports.- Specified by:
setImplementations
in interfaceBenchmarkGroup
- Parameters:
implementations
- the implementations to set.- Returns:
- fluent
-
implementation
Description copied from interface:BenchmarkGroup
Adds a new implementation to the benchmark group.- Specified by:
implementation
in interfaceBenchmarkGroup
- Parameters:
implementationName
- the name of the implementation to add.- Returns:
- an implementation
-
getProgressInterval
public int getProgressInterval()Description copied from interface:BenchmarkGroup
Return the number of iterations to complete before calling a listeners progress listener.- Specified by:
getProgressInterval
in interfaceBenchmarkGroup
- Returns:
- the number of iterations.
-
add
- Specified by:
add
in interfaceBenchmarkGroup
- Parameters:
implementation
- the benchmark implementation to add.
-