org.optaplanner.benchmark.impl.result
Class ProblemBenchmarkResult
java.lang.Object
org.optaplanner.benchmark.impl.result.ProblemBenchmarkResult
public class ProblemBenchmarkResult
- extends Object
Represents 1 problem instance (data set) benchmarked on multiple Solver
configurations.
Field Summary |
protected org.slf4j.Logger |
logger
|
logger
protected final transient org.slf4j.Logger logger
ProblemBenchmarkResult
public ProblemBenchmarkResult(PlannerBenchmarkResult plannerBenchmarkResult)
getPlannerBenchmarkResult
public PlannerBenchmarkResult getPlannerBenchmarkResult()
setPlannerBenchmarkResult
public void setPlannerBenchmarkResult(PlannerBenchmarkResult plannerBenchmarkResult)
getName
public String getName()
- Returns:
- never null, filename safe
setName
public void setName(String name)
getSolutionFileIO
public SolutionFileIO getSolutionFileIO()
setSolutionFileIO
public void setSolutionFileIO(SolutionFileIO solutionFileIO)
isWriteOutputSolutionEnabled
public boolean isWriteOutputSolutionEnabled()
setWriteOutputSolutionEnabled
public void setWriteOutputSolutionEnabled(boolean writeOutputSolutionEnabled)
getInputSolutionFile
public File getInputSolutionFile()
setInputSolutionFile
public void setInputSolutionFile(File inputSolutionFile)
getProblemStatisticList
public List<ProblemStatistic> getProblemStatisticList()
setProblemStatisticList
public void setProblemStatisticList(List<ProblemStatistic> problemStatisticList)
getSingleBenchmarkResultList
public List<SingleBenchmarkResult> getSingleBenchmarkResultList()
setSingleBenchmarkResultList
public void setSingleBenchmarkResultList(List<SingleBenchmarkResult> singleBenchmarkResultList)
getEntityCount
public Long getEntityCount()
getVariableCount
public Long getVariableCount()
getProblemScale
public Long getProblemScale()
getAverageUsedMemoryAfterInputSolution
public Long getAverageUsedMemoryAfterInputSolution()
getFailureCount
public Integer getFailureCount()
getWinningSingleBenchmarkResult
public SingleBenchmarkResult getWinningSingleBenchmarkResult()
getWorstSingleBenchmarkResult
public SingleBenchmarkResult getWorstSingleBenchmarkResult()
getAnchorId
public String getAnchorId()
getBenchmarkReportDirectory
public File getBenchmarkReportDirectory()
hasAnyFailure
public boolean hasAnyFailure()
hasAnySuccess
public boolean hasAnySuccess()
hasAnyStatistic
public boolean hasAnyStatistic()
hasProblemStatisticType
public boolean hasProblemStatisticType(ProblemStatisticType problemStatisticType)
extractSingleStatisticTypeList
public Collection<SingleStatisticType> extractSingleStatisticTypeList()
extractPureSingleStatisticList
public List<PureSingleStatistic> extractPureSingleStatisticList(SingleStatisticType singleStatisticType)
getProblemReportDirectoryPath
public String getProblemReportDirectoryPath()
getProblemReportDirectory
public File getProblemReportDirectory()
makeDirs
public void makeDirs(File benchmarkReportDirectory)
warmUp
public long warmUp(long startingTimeMillis,
long warmUpTimeMillisSpentLimit,
long timeLeft)
readPlanningProblem
public Solution readPlanningProblem()
writeOutputSolution
public void writeOutputSolution(SingleBenchmarkResult singleBenchmarkResult,
Solution outputSolution)
accumulateResults
public void accumulateResults(BenchmarkReport benchmarkReport)
registerScale
public void registerScale(long registeringEntityCount,
long registeringVariableCount,
long registeringProblemScale)
- HACK to avoid loading the planningProblem just to extract it's problemScale.
Called multiple times, for every
SingleBenchmarkResult
of this ProblemBenchmarkResult
.
- Parameters:
registeringEntityCount
- >= 0registeringVariableCount
- >= 0registeringProblemScale
- >= 0
equals
public boolean equals(Object o)
- Used by
ProblemBenchmarksConfig.buildProblemBenchmarkList(SolverBenchmarkResult)
.
- Overrides:
equals
in class Object
- Parameters:
o
- sometimes null
- Returns:
- true if equal
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
createMergeMap
protected static Map<ProblemBenchmarkResult,ProblemBenchmarkResult> createMergeMap(PlannerBenchmarkResult newPlannerBenchmarkResult,
List<SingleBenchmarkResult> singleBenchmarkResultList)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.