0

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?

Amr Qamar
  • 99
  • 6

1 Answers1

2

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);
Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • I have CommonBenchmarkApp the same as the one in the examples, and MyProblemApp is as follows: public static void main(String[] args) { new MaxGainBenchmarkApp().buildAndBenchmark(args); } public MaxGainBenchmarkApp() { super( new ArgOption("default", "org/optaplanner/examples/customertask/benchmark/maxGainBenchmarkConfig.xml") );} – Amr Qamar Nov 19 '15 at 08:01
  • How can I insert what you tell me to do in such case? – Amr Qamar Nov 19 '15 at 08:01
  • CommonBenchmarkApp is part of the examples, it's not part of our feature set. – Geoffrey De Smet Nov 19 '15 at 08:57