Package org.apache.logging.log4j.core

Examples of org.apache.logging.log4j.core.Timer


    }


    @Test
    public void createObjects() throws Exception {
        Timer timer = new Timer("NewObject", COUNT);
        timer.start();
        Message msg;
        for (int i = 0; i < COUNT; ++i) {
            msg = new StringFormattedMessage("Hello %1", i);
        }
        timer.stop();
        System.out.println(timer.toString());
        Class<? extends Message> clazz = StringFormattedMessage.class;

        timer = new Timer("ReflectionObject", COUNT);
        timer.start();

        for (int i = 0; i < COUNT; ++i) {
            createMessage(clazz, "Hello %1", i);
        }
        timer.stop();
        System.out.println(timer.toString());
    }
View Full Code Here


        }
    }

    @Test
    public void test1() {
        Timer timer = new Timer("Reflection", COUNT);
        timer.start();
        Object[] arr = new Object[1];
        arr[0] = 3;
        for (int i= 0; i < COUNT; ++i) {
            getCallerClass(arr);
        }
        timer.stop();
        System.out.println(timer.toString());
    }
View Full Code Here

    }


    @Test
    public void test2() {
        Timer timer = new Timer("Reflection", COUNT);
        timer.start();
        for (int i= 0; i < COUNT; ++i) {

            Reflection.getCallerClass(3);
        }
        timer.stop();
        System.out.println(timer.toString());
    }
View Full Code Here

    }


    @Test
    public void createObjects() throws Exception {
        Timer timer = new Timer("NewObject", COUNT);
        timer.start();
        Message msg;
        for (int i = 0; i < COUNT; ++i) {
            msg = new StringFormattedMessage("Hello %1", i);
        }
        timer.stop();
        System.out.println(timer.toString());
        Class<? extends Message> clazz = StringFormattedMessage.class;

        timer = new Timer("ReflectionObject", COUNT);
        timer.start();

        for (int i = 0; i < COUNT; ++i) {
            createMessage(clazz, "Hello %1", i);
        }
        timer.stop();
        System.out.println(timer.toString());
    }
View Full Code Here

        }
    }

    @Test
    public void test1() {
        Timer timer = new Timer("Reflection", COUNT);
        timer.start();
        Object[] arr = new Object[1];
        arr[0] = 3;
        for (int i= 0; i < COUNT; ++i) {
            getCallerClass(arr);
        }
        timer.stop();
        System.out.println(timer.toString());
    }
View Full Code Here

    }


    @Test
    public void test2() {
        Timer timer = new Timer("Reflection", COUNT);
        timer.start();
        for (int i= 0; i < COUNT; ++i) {

            Reflection.getCallerClass(3);
        }
        timer.stop();
        System.out.println(timer.toString());
    }
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.Timer

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.