Package org.apache.niolex.commons.test

Examples of org.apache.niolex.commons.test.Performance


    @Test
    public void testSetUseFasterAccess() throws Exception {
        System.out.print("Slower ");
        setUseFasterAccess(false);
        clearMethodsCache();
        Performance pf = new Performance(3000, 100) {

            @Override
            protected void run() {
                Person e = parseOne(single_p_data, Person.class);
                assertEquals(e.getId(), 45 + i);
            }
        };
        pf.start();
        System.out.print("Faster ");
        setUseFasterAccess(true);
        clearMethodsCache();
        pf = new Performance(3000, 100) {

            @Override
            protected void run() {
                Person e = parseOne(single_p_data, Person.class);
                assertEquals(e.getId(), 45 + i);
            }
        };
        pf.start();
    }
View Full Code Here

TOP

Related Classes of org.apache.niolex.commons.test.Performance

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.