Package com.opengamma.engine.exec.stats

Examples of com.opengamma.engine.exec.stats.GraphExecutionStatistics


  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);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.exec.stats.GraphExecutionStatistics

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.