Examples of perfWire


Examples of fr.imag.adele.apam.mainApam.perfWire

        Implementation implW = CST.apamResolver.findImplByName(null,"W");

        Instance instW = implW.createInstance(null,null);
        Assert.assertNotNull("W instance not created", instW);

        perfWire serviceObject = (perfWire) instW.getServiceObject();
        Assert.assertNotNull("perfWire service object created successfully", serviceObject);

        return serviceObject;
    }
View Full Code Here

Examples of fr.imag.adele.apam.mainApam.perfWire

    public void testReaction_tct041() {
        waitForApam();

        System.out.println("=========== start testReaction test");

        perfWire perfWire = initperfWireInstance();

        System.out.println("creating 2 instances");
        Implementation implS1 = CST.apamResolver.findImplByName(null,"S1ImplEmpty");
        Instance s1 = implS1.createInstance(null, null);
        Instance s2 = implS1.createInstance(null, null);


        S1 testReaction = perfWire.getFieldTestReaction();
        Assert.assertNotNull("S1 field testReaction not resoved", testReaction);

        Instance test = CST.componentBroker.getInstService(testReaction) ;
        System.out.println("connected to " + test.getName());
        if (test == s1)
            s2.setProperty("debit", 100) ;
        else
            s1.setProperty("debit", 100) ;

        Instance thisInstance = perfWire.getFieldThisInstance();
        Assert.assertNotNull("thisInstance field testReaction not resoved", thisInstance);

        thisInstance.setProperty("need", 20) ;
        test = CST.componentBroker.getInstService(testReaction) ;
        System.out.println("connected to " + test.getName());
View Full Code Here

Examples of fr.imag.adele.apam.mainApam.perfWire

    @Test
    public void testPerfLink () {

        System.out.println("=========== start testPerfLink test");
        waitForApam();
        perfWire perfWire = initperfWireInstance();


        Implementation impl = CST.apamResolver.findImplByName(null, "S2Impl");

        long overHead = 0;
        long fin;
        long duree;
        long deb;
        int nb = 1000;
        int nbInst = 0;

        System.out.println("creating 2 instances");
        Implementation implS1 = CST.apamResolver.findImplByName(null, "S1ImplEmpty");
        implS1.createInstance(null, null);
        nbInst++;
        implS1.createInstance(null, null);
        nbInst++;

        Instance test = null;

        String s;
        Link l;
        deb = System.nanoTime();
        for (int i = 0; i < nb; i++) {
            test = CST.componentBroker.getInstService(perfWire.getFieldSimpleDep());
            test.setProperty("debit", 2);
            s = perfWire.getFieldSimpleDep().getName();
            test.setProperty("debit", 10);
        }
        fin = System.nanoTime();
        duree = (fin - deb - overHead);
        System.out.println("Nombre d'instances " + nbInst + " : duree de " + nb + " appels avec contrainte et changement de dep : " + duree / 1000000 + " milli secondes");
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.