Package org.optaplanner.benchmark.impl.report

Examples of org.optaplanner.benchmark.impl.report.BenchmarkReport


public class WorstScoreSolverRankingComparatorTest extends AbstractSolverRankingComparatorTest {

    @Test
    public void normal() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        WorstScoreSolverRankingComparator comparator = new WorstScoreSolverRankingComparator();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -100, -30, -2001);
        addSingleBenchmark(aSingleBenchmarkResultList, -2001, -30, -2001);
View Full Code Here


        assertEquals(1, comparator.compare(b, a));
    }

    @Test
    public void worstIsEqual() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        WorstScoreSolverRankingComparator comparator = new WorstScoreSolverRankingComparator();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -101, -30, -2000);
        addSingleBenchmark(aSingleBenchmarkResultList, -2000, -30, -2000);
View Full Code Here

        assertEquals(1, comparator.compare(b, a));
    }

    @Test
    public void differentScoreDefinitions() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        WorstScoreSolverRankingComparator comparator = new WorstScoreSolverRankingComparator();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -1000, -30, -1000);
        addSingleBenchmark(aSingleBenchmarkResultList, -400, -30, -1000);
View Full Code Here

public class TotalRankSolverRankingWeightFactoryTest extends AbstractSolverRankingComparatorTest {

    @Test
    public void normal() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        TotalRankSolverRankingWeightFactory factory = new TotalRankSolverRankingWeightFactory();
        List<SolverBenchmarkResult> solverBenchmarkResultList = new ArrayList<SolverBenchmarkResult>();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -1000, -40, -1000);
View Full Code Here

        assertEquals(1, bWeight.compareTo(aWeight));
    }

    @Test
    public void equalCount() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        TotalRankSolverRankingWeightFactory factory = new TotalRankSolverRankingWeightFactory();
        List<SolverBenchmarkResult> solverBenchmarkResultList = new ArrayList<SolverBenchmarkResult>();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -5000, -90, -5000);
View Full Code Here

public class TotalScoreSolverRankingComparatorTest extends AbstractSolverRankingComparatorTest {

    @Test
    public void normal() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        TotalScoreSolverRankingComparator comparator = new TotalScoreSolverRankingComparator();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -1000, -30, -1000);
        addSingleBenchmark(aSingleBenchmarkResultList, -400, -30, -1000);
View Full Code Here

        assertEquals(1, comparator.compare(b, a));
    }

    @Test
    public void totalIsEqual() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        TotalScoreSolverRankingComparator comparator = new TotalScoreSolverRankingComparator();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -1005, -30, -1005);
        addSingleBenchmark(aSingleBenchmarkResultList, -200, -30, -1005);
View Full Code Here

        assertEquals(1, comparator.compare(b, a));
    }

    @Test
    public void differentScoreDefinitions() {
        BenchmarkReport benchmarkReport = mock(BenchmarkReport.class);
        TotalScoreSolverRankingComparator comparator = new TotalScoreSolverRankingComparator();
        SolverBenchmarkResult a = new SolverBenchmarkResult(null);
        List<SingleBenchmarkResult> aSingleBenchmarkResultList = new ArrayList<SingleBenchmarkResult>();
        addSingleBenchmark(aSingleBenchmarkResultList, -1000, -30, -1000);
        addSingleBenchmark(aSingleBenchmarkResultList, -400, -30, -1000);
View Full Code Here

    // ************************************************************************
    // Builder methods
    // ************************************************************************

    public BenchmarkReport buildBenchmarkReport(PlannerBenchmarkResult plannerBenchmark) {
        BenchmarkReport benchmarkReport = new BenchmarkReport(plannerBenchmark);
        benchmarkReport.setLocale(determineLocale());
        supplySolverRanking(benchmarkReport);
        return benchmarkReport;
    }
View Full Code Here

        PlannerBenchmarkResult plannerBenchmarkResult = PlannerBenchmarkResult.createMergedResult(singleBenchmarkResultList);
        plannerBenchmarkResult.setStartingTimestamp(startingTimestamp);
        plannerBenchmarkResult.initBenchmarkReportDirectory(benchmarkDirectory);

        BenchmarkReport benchmarkReport = benchmarkReportConfig.buildBenchmarkReport(plannerBenchmarkResult);
        plannerBenchmarkResult.accumulateResults(benchmarkReport);
        benchmarkReport.writeReport();

        logger.info("Aggregation ended: statistic html overview ({}).",
                benchmarkReport.getHtmlOverviewFile().getAbsolutePath());
        return benchmarkReport.getHtmlOverviewFile().getAbsoluteFile();
    }
View Full Code Here

TOP

Related Classes of org.optaplanner.benchmark.impl.report.BenchmarkReport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.