Amr Qamar
Amr Qamar

Reputation: 109

Optaplanner benchmarkAggregator can run with benchmark simultaneously?

I did run the bench marking successfully without aggregator, and I did run the aggregator alone.

Can I run the bench marking and obtain the aggregator gui simultaneously?

Upvotes: 0

Views: 50

Answers (1)

Geoffrey De Smet
Geoffrey De Smet

Reputation: 27312

Yes, it's possible, just write a main() that does both in sequence:

    PlannerBenchmarkFactory plannerBenchmarkFactory = PlannerBenchmarkFactory.createFromXmlResource(
            "org/optaplanner/examples/nqueens/benchmark/nqueensBenchmarkConfig.xml");
    PlannerBenchmark plannerBenchmark = benchmarkFactory.buildPlannerBenchmark();
    plannerBenchmark.benchmark();
    PlannerBenchmarkFactory plannerBenchmarkFactory2 = PlannerBenchmarkFactory.createFromXmlResource(
            "org/optaplanner/examples/nqueens/benchmark/nqueensBenchmarkConfig.xml");
    BenchmarkAggregatorFrame.createAndDisplay(plannerBenchmarkFactory2);

Upvotes: 2

Related Questions