Package org.apache.geronimo.kernel

Examples of org.apache.geronimo.kernel.MockGBean


        Method myMethod = MockGBean.class.getMethod("doNothing", null);

        FastClass myFastClass = FastClass.create(MockGBean.class);
        int myMethodIndex = myFastClass.getIndex("doNothing", new Class[0]);

        MockGBean instance = new MockGBean("foo", 12);

        // normal invoke
        int iterations = 100000000;
        String msg = "hhhh";
        for (int j=0 ; j < 10; j++) {
            for (int i = 0; i < iterations; i++) {
                msg= instance.echo(msg);
            }
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            instance.doNothing();
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here


        int myMethodIndex = myFastClass.getIndex("echo", new Class[]{String.class});
        String msg = "Some message";
        Object[] args = new Object[]{msg};
        String result;

        MockGBean instance = new MockGBean("foo", 12);


        // normal invoke
        int iterations = 100000000;
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        Method myMethod = MockGBean.class.getMethod("doNothing", null);

        FastClass myFastClass = FastClass.create(MockGBean.class);
        int myMethodIndex = myFastClass.getIndex("doNothing", new Class[0]);

        MockGBean instance = new MockGBean("foo", 12);

        // normal invoke
        int iterations = 100000000;
        String msg = "hhhh";
        for (int j=0 ; j < 10; j++) {
            for (int i = 0; i < iterations; i++) {
                msg= instance.echo(msg);
            }
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            instance.doNothing();
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        int myMethodIndex = myFastClass.getIndex("echo", new Class[]{String.class});
        String msg = "Some message";
        Object[] args = new Object[]{msg};
        String result;

        MockGBean instance = new MockGBean("foo", 12);


        // normal invoke
        int iterations = 100000000;
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        Method myMethod = MockGBean.class.getMethod("doNothing", (Class[])null);

        FastClass myFastClass = FastClass.create(MockGBean.class);
        int myMethodIndex = myFastClass.getIndex("doNothing", new Class[0]);

        MockGBean instance = new MockGBean("foo", 12);

        // normal invoke
        int iterations = 100000000;
        String msg = "hhhh";
        for (int j=0 ; j < 10; j++) {
            for (int i = 0; i < iterations; i++) {
                msg= instance.echo(msg);
            }
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            instance.doNothing();
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        int myMethodIndex = myFastClass.getIndex("echo", new Class[]{String.class});
        String msg = "Some message";
        Object[] args = new Object[]{msg};
        String result;

        MockGBean instance = new MockGBean("foo", 12);


        // normal invoke
        int iterations = 100000000;
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        Method myMethod = MockGBean.class.getMethod("doNothing", null);

        FastClass myFastClass = FastClass.create(MockGBean.class);
        int myMethodIndex = myFastClass.getIndex("doNothing", new Class[0]);

        MockGBean instance = new MockGBean("foo", 12);

        // normal invoke
        int iterations = 100000000;
        String msg = "hhhh";
        for (int j=0 ; j < 10; j++) {
            for (int i = 0; i < iterations; i++) {
                msg= instance.echo(msg);
            }
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            instance.doNothing();
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        int myMethodIndex = myFastClass.getIndex("echo", new Class[]{String.class});
        String msg = "Some message";
        Object[] args = new Object[]{msg};
        String result;

        MockGBean instance = new MockGBean("foo", 12);


        // normal invoke
        int iterations = 100000000;
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        Method myMethod = MockGBean.class.getMethod("doNothing", null);

        FastClass myFastClass = FastClass.create(MockGBean.class);
        int myMethodIndex = myFastClass.getIndex("doNothing", new Class[0]);

        MockGBean instance = new MockGBean("foo", 12);

        // normal invoke
        int iterations = 100000000;
        String msg = "hhhh";
        for (int j=0 ; j < 10; j++) {
            for (int i = 0; i < iterations; i++) {
                msg= instance.echo(msg);
            }
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            instance.doNothing();
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

        int myMethodIndex = myFastClass.getIndex("echo", new Class[]{String.class});
        String msg = "Some message";
        Object[] args = new Object[]{msg};
        String result;

        MockGBean instance = new MockGBean("foo", 12);


        // normal invoke
        int iterations = 100000000;
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            result = instance.echo(msg);
        }
        long end = System.currentTimeMillis();
        printResults("Normal", end, start, iterations);

        // reflection
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.MockGBean

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.