public void testStatisticsReporting() {
final NormalExecutionJobDispatcher dispatcher = new NormalExecutionJobDispatcher();
final PlanExecutor executor = new PlanExecutor(createCycle(dispatcher), createPlan());
final GraphExecutorStatisticsGatherer statsGatherer = executor.getCycle().getViewProcessContext().getGraphExecutorStatisticsGathererProvider().getStatisticsGatherer(UniqueId.of("View", "Test"));
final GraphExecutionStatistics stats = ((Statistics) statsGatherer).getExecutionStatistics().get(0);
assertEquals(stats.getCalcConfigName(), "Default");
assertEquals(stats.getProcessedGraphs(), 1L);
assertEquals(stats.getAverageJobSize(), 2d);
assertEquals(stats.getAverageJobCycleCost(), 10d);
assertEquals(stats.getAverageJobDataCost(), 20d);
dispatcher.execute(executor);
assertEquals(stats.getExecutedGraphs(), 1L);
assertEquals(stats.getExecutedNodes(), 6L);
assertEquals(stats.getExecutionTime(), 30L);
}