public class PlannerBenchmarkConfig extends Object
createFromXmlResource(String)
.
To build a PlannerBenchmarkFactory
with it, use PlannerBenchmarkFactory.create(PlannerBenchmarkConfig)
.Modifier and Type | Field and Description |
---|---|
static String |
PARALLEL_BENCHMARK_COUNT_AUTO |
static Pattern |
VALID_NAME_PATTERN |
Constructor and Description |
---|
PlannerBenchmarkConfig()
Create an empty benchmark config.
|
PlannerBenchmarkConfig(ClassLoader classLoader) |
public static final String PARALLEL_BENCHMARK_COUNT_AUTO
public static final Pattern VALID_NAME_PATTERN
public PlannerBenchmarkConfig()
public PlannerBenchmarkConfig(ClassLoader classLoader)
classLoader
- sometimes nullpublic static PlannerBenchmarkConfig createFromSolverConfig(SolverConfig solverConfig)
solverConfig
- never nullpublic static PlannerBenchmarkConfig createFromSolverConfig(SolverConfig solverConfig, File benchmarkDirectory)
solverConfig
- never nullbenchmarkDirectory
- never nullpublic static PlannerBenchmarkConfig createFromXmlResource(String benchmarkConfigResource)
benchmarkConfigResource
- never null, a classpath resource
as defined by ClassLoader.getResource(String)
public static PlannerBenchmarkConfig createFromXmlResource(String benchmarkConfigResource, ClassLoader classLoader)
createFromXmlResource(String)
.benchmarkConfigResource
- never null, a classpath resource
as defined by ClassLoader.getResource(String)
classLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromXmlFile(File benchmarkConfigFile)
Warning: this leads to platform dependent code,
it's recommend to use createFromXmlResource(String)
instead.
benchmarkConfigFile
- never nullpublic static PlannerBenchmarkConfig createFromXmlFile(File benchmarkConfigFile, ClassLoader classLoader)
createFromXmlFile(File)
.benchmarkConfigFile
- never nullclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromXmlInputStream(InputStream in)
in
- never null, gets closedpublic static PlannerBenchmarkConfig createFromXmlInputStream(InputStream in, ClassLoader classLoader)
in
- never null, gets closedclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromXmlReader(Reader reader)
reader
- never null, gets closedpublic static PlannerBenchmarkConfig createFromXmlReader(Reader reader, ClassLoader classLoader)
reader
- never null, gets closedclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlResource(String templateResource)
templateResource
- never null, a classpath resource as defined by ClassLoader.getResource(String)
public static PlannerBenchmarkConfig createFromFreemarkerXmlResource(String templateResource, ClassLoader classLoader)
createFromFreemarkerXmlResource(String)
.templateResource
- never null, a classpath resource as defined by ClassLoader.getResource(String)
classLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlResource(String templateResource, Object model)
createFromFreemarkerXmlResource(String)
.templateResource
- never null, a classpath resource as defined by ClassLoader.getResource(String)
model
- sometimes nullpublic static PlannerBenchmarkConfig createFromFreemarkerXmlResource(String templateResource, Object model, ClassLoader classLoader)
createFromFreemarkerXmlResource(String)
.templateResource
- never null, a classpath resource as defined by ClassLoader.getResource(String)
model
- sometimes nullclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlFile(File templateFile)
Warning: this leads to platform dependent code,
it's recommend to use createFromFreemarkerXmlResource(String)
instead.
templateFile
- never nullpublic static PlannerBenchmarkConfig createFromFreemarkerXmlFile(File templateFile, ClassLoader classLoader)
createFromFreemarkerXmlFile(File)
.templateFile
- never nullclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlFile(File templateFile, Object model)
createFromFreemarkerXmlFile(File)
.templateFile
- never nullmodel
- sometimes nullpublic static PlannerBenchmarkConfig createFromFreemarkerXmlFile(File templateFile, Object model, ClassLoader classLoader)
createFromFreemarkerXmlFile(File)
.templateFile
- never nullmodel
- sometimes nullclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlInputStream(InputStream templateIn)
templateIn
- never null, gets closedpublic static PlannerBenchmarkConfig createFromFreemarkerXmlInputStream(InputStream templateIn, ClassLoader classLoader)
createFromFreemarkerXmlInputStream(InputStream)
.templateIn
- never null, gets closedclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlInputStream(InputStream templateIn, Object model)
createFromFreemarkerXmlInputStream(InputStream)
.templateIn
- never null, gets closedmodel
- sometimes nullpublic static PlannerBenchmarkConfig createFromFreemarkerXmlInputStream(InputStream templateIn, Object model, ClassLoader classLoader)
createFromFreemarkerXmlInputStream(InputStream)
.templateIn
- never null, gets closedmodel
- sometimes nullclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlReader(Reader templateReader)
templateReader
- never null, gets closedpublic static PlannerBenchmarkConfig createFromFreemarkerXmlReader(Reader templateReader, ClassLoader classLoader)
createFromFreemarkerXmlReader(Reader)
.templateReader
- never null, gets closedclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public static PlannerBenchmarkConfig createFromFreemarkerXmlReader(Reader templateReader, Object model)
createFromFreemarkerXmlReader(Reader)
.templateReader
- never null, gets closedmodel
- sometimes nullpublic static PlannerBenchmarkConfig createFromFreemarkerXmlReader(Reader templateReader, Object model, ClassLoader classLoader)
createFromFreemarkerXmlReader(Reader)
.templateReader
- never null, gets closedmodel
- sometimes nullclassLoader
- sometimes null, the ClassLoader
to use for loading all resources and Class
es,
null to use the default ClassLoader
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public String getName()
public void setName(String name)
public File getBenchmarkDirectory()
public void setBenchmarkDirectory(File benchmarkDirectory)
public Class<? extends ThreadFactory> getThreadFactoryClass()
public void setThreadFactoryClass(Class<? extends ThreadFactory> threadFactoryClass)
public String getParallelBenchmarkCount()
If there aren't enough processors available, it will be decreased.
public void setParallelBenchmarkCount(String parallelBenchmarkCount)
public Long getWarmUpMillisecondsSpentLimit()
public void setWarmUpMillisecondsSpentLimit(Long warmUpMillisecondsSpentLimit)
public Long getWarmUpSecondsSpentLimit()
public void setWarmUpSecondsSpentLimit(Long warmUpSecondsSpentLimit)
public Long getWarmUpMinutesSpentLimit()
public void setWarmUpMinutesSpentLimit(Long warmUpMinutesSpentLimit)
public Long getWarmUpHoursSpentLimit()
public void setWarmUpHoursSpentLimit(Long warmUpHoursSpentLimit)
public Long getWarmUpDaysSpentLimit()
public void setWarmUpDaysSpentLimit(Long warmUpDaysSpentLimit)
public BenchmarkReportConfig getBenchmarkReportConfig()
public void setBenchmarkReportConfig(BenchmarkReportConfig benchmarkReportConfig)
public SolverBenchmarkConfig getInheritedSolverBenchmarkConfig()
public void setInheritedSolverBenchmarkConfig(SolverBenchmarkConfig inheritedSolverBenchmarkConfig)
public List<SolverBenchmarkBluePrintConfig> getSolverBenchmarkBluePrintConfigList()
public void setSolverBenchmarkBluePrintConfigList(List<SolverBenchmarkBluePrintConfig> solverBenchmarkBluePrintConfigList)
public List<SolverBenchmarkConfig> getSolverBenchmarkConfigList()
public void setSolverBenchmarkConfigList(List<SolverBenchmarkConfig> solverBenchmarkConfigList)
public PlannerBenchmark buildPlannerBenchmark(SolverConfigContext solverConfigContext)
PlannerBenchmarkFactory.buildPlannerBenchmark()
instead.
Will be removed in 8.0.
solverConfigContext
- never nullpublic <Solution_> PlannerBenchmark buildPlannerBenchmark(SolverConfigContext solverConfigContext, Solution_[] extraProblems)
PlannerBenchmarkFactory.buildPlannerBenchmark(Object[])
instead.
Will be removed in 8.0.
solverConfigContext
- never nullextraProblems
- never nullprotected void validate()
protected void generateSolverBenchmarkConfigNames()
protected List<SolverBenchmarkConfig> buildEffectiveSolverBenchmarkConfigList()
protected int resolveParallelBenchmarkCount()
protected int resolveParallelBenchmarkCountAutomatically(int availableProcessorCount)
protected Long calculateWarmUpTimeMillisSpentLimit()
Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.