Package com.opengamma.engine.calcnode.stats

Examples of com.opengamma.engine.calcnode.stats.InMemoryFunctionCostsMaster.load()


    doc2.setDataInputCost(20.2);
    doc2.setDataOutputCost(30.3);
   
    // check empty
    InMemoryFunctionCostsMaster test = new InMemoryFunctionCostsMaster();
    assertNull(test.load("Conf1", "Func1", null));
    assertNull(test.load("Conf2", "Func2", null));
   
    // store1
    FunctionCostsDocument stored1 = test.store(doc1);
    assertNotNull(stored1);
View Full Code Here


    doc2.setDataOutputCost(30.3);
   
    // check empty
    InMemoryFunctionCostsMaster test = new InMemoryFunctionCostsMaster();
    assertNull(test.load("Conf1", "Func1", null));
    assertNull(test.load("Conf2", "Func2", null));
   
    // store1
    FunctionCostsDocument stored1 = test.store(doc1);
    assertNotNull(stored1);
    assertNotNull(stored1.getVersion());
View Full Code Here

    assertEquals("Func1", stored1.getFunctionId());
    assertEquals(1.1, stored1.getInvocationCost(), 0.001);
    assertEquals(2.2, stored1.getDataInputCost(), 0.001);
    assertEquals(3.3, stored1.getDataOutputCost(), 0.001);
   
    FunctionCostsDocument loaded1 = test.load("Conf1", "Func1", null);
    assertNotSame(stored1, loaded1);
    assertEquals(stored1.getVersion(), loaded1.getVersion());
    assertEquals("Conf1", loaded1.getConfigurationName());
    assertEquals("Func1", loaded1.getFunctionId());
    assertEquals(1.1, loaded1.getInvocationCost(), 0.001);
View Full Code Here

    assertEquals("Func2", stored2.getFunctionId());
    assertEquals(10.1, stored2.getInvocationCost(), 0.001);
    assertEquals(20.2, stored2.getDataInputCost(), 0.001);
    assertEquals(30.3, stored2.getDataOutputCost(), 0.001);
   
    FunctionCostsDocument loaded2 = test.load("Conf2", "Func2", null);
    assertNotSame(stored2, loaded2);
    assertEquals(stored2.getVersion(), loaded2.getVersion());
    assertEquals("Conf2", loaded2.getConfigurationName());
    assertEquals("Func2", loaded2.getFunctionId());
    assertEquals(10.1, loaded2.getInvocationCost(), 0.001);
View Full Code Here

    assertEquals(20.2, loaded2.getDataInputCost(), 0.001);
    assertEquals(30.3, loaded2.getDataOutputCost(), 0.001);
   
    // safe from external modify
    doc1.setInvocationCost(0);
    FunctionCostsDocument loaded1b = test.load("Conf1", "Func1", null);
    assertNotSame(loaded1, loaded1b);
    assertEquals(loaded1, loaded1b);
  }

}
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.