Examples of recordInvocation()


Examples of com.opengamma.engine.calcnode.stats.FunctionInvocationStatistics.recordInvocation()

  }

  public void testPersistence() {
    FunctionInvocationStatistics stats = _costs.getStatistics("Default", "Foo");
    assertNotNull(stats);
    stats.recordInvocation(1, 1.0, 2.0, 3.0);
    final Runnable writer = _costs.createPersistenceWriter();
    assertNotNull(writer);
    // First run of the writer will write the new function to store (+ the mean document)
    writer.run();
    assertEquals(2, _master.size());
View Full Code Here

Examples of com.opengamma.engine.calcnode.stats.FunctionInvocationStatistics.recordInvocation()

    assertEquals(2, _master.size());
    // Second run will do nothing as stats and averages haven't changed
    writer.run();
    assertEquals(2, _master.size());
    // Update stats and check the document updates (and the average)
    stats.recordInvocation(100, 500.0, 600.0, 700.0);
    writer.run();
    assertEquals(2, _master.size());
    // Create a new repository and check the values were preserved
    FunctionCosts costs = new FunctionCosts(_master);
    stats = costs.getStatistics("Default", "Foo");
View Full Code Here

Examples of com.opengamma.engine.calcnode.stats.FunctionInvocationStatistics.recordInvocation()

  public void testInitialMean() {
    FunctionInvocationStatistics stats = _costs.getStatistics("Default", "Foo");
    assertEquals(1.0, stats.getInvocationCost(), 1e-5);
    assertEquals(1.0, stats.getDataInputCost(), 1e-5);
    assertEquals(1.0, stats.getDataOutputCost(), 1e-5);
    stats.recordInvocation(1, 2.0, 3.0, 4.0);
    // Nothing will have updated the average
    stats = _costs.getStatistics("Default", "Bar");
    assertEquals(1.0, stats.getInvocationCost(), 1e-5);
    assertEquals(1.0, stats.getDataInputCost(), 1e-5);
    assertEquals(1.0, stats.getDataOutputCost(), 1e-5);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.