Package org.optaplanner.benchmark.impl
Class DefaultPlannerBenchmarkFactory
- java.lang.Object
-
- org.optaplanner.benchmark.api.PlannerBenchmarkFactory
-
- org.optaplanner.benchmark.impl.DefaultPlannerBenchmarkFactory
-
public class DefaultPlannerBenchmarkFactory extends PlannerBenchmarkFactory
- See Also:
PlannerBenchmarkFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected PlannerBenchmarkConfig
plannerBenchmarkConfig
static Pattern
VALID_NAME_PATTERN
-
Constructor Summary
Constructors Constructor Description DefaultPlannerBenchmarkFactory(PlannerBenchmarkConfig plannerBenchmarkConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<SolverBenchmarkConfig>
buildEffectiveSolverBenchmarkConfigList()
PlannerBenchmark
buildPlannerBenchmark()
Creates a newPlannerBenchmark
instance.<Solution_>
PlannerBenchmarkbuildPlannerBenchmark(Solution_... problems)
Creates a newPlannerBenchmark
instance for datasets that are already in memory.protected Long
calculateWarmUpTimeMillisSpentLimit()
protected void
generateSolverBenchmarkConfigNames()
protected int
resolveParallelBenchmarkCount()
protected int
resolveParallelBenchmarkCountAutomatically(int availableProcessorCount)
protected void
validate()
-
Methods inherited from class org.optaplanner.benchmark.api.PlannerBenchmarkFactory
buildPlannerBenchmark, create, createFromFreemarkerXmlFile, createFromFreemarkerXmlFile, createFromFreemarkerXmlFile, createFromFreemarkerXmlFile, createFromFreemarkerXmlResource, createFromFreemarkerXmlResource, createFromFreemarkerXmlResource, createFromFreemarkerXmlResource, createFromSolverConfigXmlResource, createFromSolverConfigXmlResource, createFromSolverConfigXmlResource, createFromSolverConfigXmlResource, createFromXmlFile, createFromXmlFile, createFromXmlResource, createFromXmlResource
-
-
-
-
Field Detail
-
VALID_NAME_PATTERN
public static final Pattern VALID_NAME_PATTERN
-
plannerBenchmarkConfig
protected final PlannerBenchmarkConfig plannerBenchmarkConfig
-
-
Constructor Detail
-
DefaultPlannerBenchmarkFactory
public DefaultPlannerBenchmarkFactory(PlannerBenchmarkConfig plannerBenchmarkConfig)
-
-
Method Detail
-
buildPlannerBenchmark
public PlannerBenchmark buildPlannerBenchmark()
Description copied from class:PlannerBenchmarkFactory
Creates a newPlannerBenchmark
instance.- Specified by:
buildPlannerBenchmark
in classPlannerBenchmarkFactory
- Returns:
- never null
-
buildPlannerBenchmark
@SafeVarargs public final <Solution_> PlannerBenchmark buildPlannerBenchmark(Solution_... problems)
Description copied from class:PlannerBenchmarkFactory
Creates a newPlannerBenchmark
instance for datasets that are already in memory.- Specified by:
buildPlannerBenchmark
in classPlannerBenchmarkFactory
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation- Parameters:
problems
- never null, can be none- Returns:
- never null
-
validate
protected void validate()
-
generateSolverBenchmarkConfigNames
protected void generateSolverBenchmarkConfigNames()
-
buildEffectiveSolverBenchmarkConfigList
protected List<SolverBenchmarkConfig> buildEffectiveSolverBenchmarkConfigList()
-
resolveParallelBenchmarkCount
protected int resolveParallelBenchmarkCount()
-
resolveParallelBenchmarkCountAutomatically
protected int resolveParallelBenchmarkCountAutomatically(int availableProcessorCount)
-
calculateWarmUpTimeMillisSpentLimit
protected Long calculateWarmUpTimeMillisSpentLimit()
-
-